- Tried to get "Getting Started with Grails" from InfoQ, but could not.
- 6/9/09: Downloaded grails-1.1.1 and put it in c:\grails-1.1.1 directory.
- Set up GRAILS_HOME as "c:grails-1.1.1". (6/9/09: Done)
- Tried "grails" and it worked.
- Ran "grails create-app" and named app "addressBook" and got 91 file/directories.
- Moved to longer "Introduction to Grails" article and ran "grails create-app testapp" (p.2) and it worked (i think).
- Then I moved into "testapp" directory and ran "grails create-domain-class Person" (p.2)
- Added 3 lines to grails-app/domain/Person.groovy file. (p.3)
- Then ran " grails create-controller Person" (p.3)
- Then add "def scaffold = true" to grails-app/controllers/PersonController.groovy file. (p.3)
- Then ran "grails run-app" and opened "localhost:8080/testapp" and it worked. (p.4)
- Then ran "grails generate-all Person" and it appears to work. (p.4)
- Added listYoungPeople action to controller. (p.6)
- Then ran 'grails create-tag-lib TestApp" to create TagLib. (p.6)
- Had to add "myTestTag" to grails-app/taglib/TestAppLib.groovy file (p.6)
- NO LOG FILES.
- Fixed a typo in TestAppLib.groovy and reRan it. Worked (p.7)
- Now tried the test-related grails options (create-integration-test, grails create-unit-test, grails test-app). They worked. Example: $ grails test-app
Welcome to Grails 1.1.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: c:/grails-1.1.1
Base Directory: C:\cygwin\home\jasnow\GROOVY\GRAILS\testapp
Running script c:\grails-1.1.1\scripts\TestApp.groovy
Environment set to test
[groovyc] Compiling 1 source file to C:\Users\jasnow\.grails\1.1.1\projects\testapp\classes
[mkdir] Created dir: C:\cygwin\home\jasnow\GROOVY\GRAILS\testapp\test\reports
[mkdir] Created dir: C:\cygwin\home\jasnow\GROOVY\GRAILS\testapp\test\reports\html
[mkdir] Created dir: C:\cygwin\home\jasnow\GROOVY\GRAILS\testapp\test\reports\plain
Starting unit tests ...
Running tests of type 'unit'
[mkdir] Created dir: C:\Users\jasnow\.grails\1.1.1\projects\testapp\test-classes\unit
[groovyc] Compiling 4 source files to C:\Users\jasnow\.grails\1.1.1\projects\testapp\test-classes\unit
-------------------------------------------------------
Running 4 unit tests...
Running test PersonControllerTests...PASSED
Running test PersonTests...PASSED
Running test TestAppTagLibTests...PASSED
Running test UtTestTests...PASSED
Tests Completed in 705ms ...
-------------------------------------------------------
Tests passed: 4
Tests failed: 0
-------------------------------------------------------
Starting integration tests ...
[copy] Copying 1 file to C:\Users\jasnow\.grails\1.1.1\projects\testapp\test-classes\integration
[copy] Copying 1 file to C:\Users\jasnow\.grails\1.1.1\projects\testapp\test-classes
[groovyc] Compiling 1 source file to C:\Users\jasnow\.grails\1.1.1\projects\testapp\classes
[groovyc] Compiling 1 source file to C:\Users\jasnow\.grails\1.1.1\projects\testapp\classes
Running tests of type 'integration'
[groovyc] Compiling 1 source file to C:\Users\jasnow\.grails\1.1.1\projects\testapp\test-classes\integration
-------------------------------------------------------
Running 1 integration test...
Running test ItTestTests...PASSED
Tests Completed in 35ms ...
-------------------------------------------------------
Tests passed: 1
Tests failed: 0
-------------------------------------------------------
[junitreport] Processing C:\cygwin\home\jasnow\GROOVY\GRAILS\testapp\test\reports\TESTS-TestSuites.xml to c:\Users\jasnow\AppData\Local\Temp\null1060012370
[junitreport] Loading stylesheet jar:file:/c:/grails-1.1.1/lib/ant-junit-1.7.0.jar/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 974ms
[junitreport] Deleting: c:\Users\jasnow\AppData\Local\Temp\null1060012370
Tests PASSED - view reports in C:\cygwin\home\jasnow\GROOVY\GRAILS\testapp\test\reports. - Started up Netbeans and opened testapp inside netbeans. Ran the tests and they worked.
- Found Google E-group for Grails: http://groups.google.com/group/grails/web/getting-started-with-grails
- Watched the grails and webtest screencast (Very Good). Then tried to install webtest (grails install-plugin webtest), then "grails create-webtest", then "grails run-webtest".
- Watched the "Intro to Grails with RESTful Web Services" (6/9/09: done/Very Good)
- Ran this; "grails install-plugin testing-labs", then "grails create-controller-integration-test Person".
Tuesday, June 9, 2009
Day 1 - Looking at Grails
Day 1 - Looking at Griffon (GRails for Swing Apps)
- Download the latest Griffon release. (6/9/09: Done)
- Extract the archive into an appropriate location; typically C:\griffon on Windows or ~/griffon on Unix. (6/9/09: Installed in c:/griffon-0.0.1 directory)
- Create a GRIFFON_HOME environment variable that points to the path where you extracted the archive (eg C:\griffon on Windows or ~/griffon on Unix). (6/9/09: Set up system variable "GRIFFON_HOME=c:\griffon-0.0.1".
- If you have not set the JAVA_HOME environment variable yet, create JAVA_HOME environment variable that points to the path where you have installed Java. (6/9/09: Set up system variable "JAVA_HOME=C:\Program Files (x86)\Java\jre6".
- Append a reference to the "bin" directory within the Griffon directory to your PATH variable (eg %GRIFFON_HOME%\bin on Windows or $GRIFFON_HOME/bin on Unix). Note that, for Windows, both PATH and GRIFFON_HOME must be defined at the same environment variable level (eg. 'System variables') rather than across environment variable levels (eg. PATH under 'System variables' and GRIFFON_HOME under 'User variables'). (6/9/09: Done)
- Type "griffon" at the command line, if a help message is displayed you are ready to start using Griffon! (6/9/09: Tried/Worked)
- If you get an error message, try to chmod +x the griffon script inside the bin directory. (6/9/09: Step 6 so skipped this line)
- Then I added this: "export PATH=$PATH:/cygdrive/c/griffon-0.0.1/bin" to $HOME/.bash_profile file and tried griffon and it did not work. I had to do griffon.bat.
- Tried "griffon.bat run-app" and got an error that I think is caused by setting JAVA_HOME to JRE instead of JDK, so I updated my JDK and changed my $JAVA_HOME to "c:\Program Files\Java\jdk1.6.0_14" (64-bit version). (6/9/09: Ran "griffon.bat runapp" and the small window came up. ) (see page 2 of Griffon: Riding the Griffon article)
- Tried "griffon.bat stats" and scripts were not found. Check scripts directory and they was no scripts.
- Tried to use "tree \a" and it is a "cmd" command, not a cygwin command, so I used "find . -type d" and found that "out" and "staging" and "test" directories were gone.
- NO TEST directories.
Subscribe to:
Posts (Atom)