Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Ubuntu Linux, Grails 1.3.1
Description
The latest archetype for Grails can generate only 1.2.2 based apps. Trying to solve this I created project manually with grails create-app using Grails 1.3.1. Then created pom.xml with mvn grails:create-pom. Generated pom contained dependencies to grails 1.2.2 (grails, grails-gorm). I changed them to 1.3.1 as I found such artefacts in repo.
Then runned mvn grails:run-app and received missing dependencies for grails-gorm (hibernate-commons-annotations 3.4.0.GA instead of 3.3.0.ga), fixed them locally in pom.
Runned mvn grails:run-app again. Everything works fine, but hibernate-1.3.1 and tomcat 1.3.1 plugins claimed that I'm using wrong grails version:
linx@ubuntu:~/projects/tmp/test$ mvn grails:run-app
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - org.test:test:war:0.1
[INFO] task-segment: [grails:run-app]
[INFO] ------------------------------------------------------------------------
[INFO] [grails:run-app {execution: default-cli}]
[INFO] Using Grails 1.3.1
Running pre-compiled script
Environment set to development
Plugin [tomcat-1.3.1] not installed. ...
Plugin [hibernate-1.3.1] not installed. ...
Resolving new plugins. Please wait... ...
Installing zip /home/linx/.ivy2/cache/org.grails.plugins/hibernate/zips/hibernate-1.3.1.zip... ...
[mkdir] Created dir: /home/linx/projects/tmp/test/plugins/hibernate-1.3.1
[unzip] Expanding: /home/linx/.ivy2/cache/org.grails.plugins/hibernate/zips/hibernate-1.3.1.zip into /home/linx/projects/tmp/test/plugins/hibernate-1.3.1
Installed plugin hibernate-1.3.1 to location /home/linx/projects/tmp/test/plugins/hibernate-1.3.1. ...
Plugin hibernate-1.3.1 requires version [1.3 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails.
[delete] Deleting directory /home/linx/projects/tmp/test/plugins/hibernate-1.3.1
linx@ubuntu:~/projects/tmp/test$
Just to add a bit more detail based on my own experience:
1) non-existent hibernate-annotations - it should be 3.4.0.ga not 3.4.0.GA
2) non-existent hibernate-commons-annotations - should be 3.1.0.GA (or possibly 3.3.0.ga), not 3.4.0.ga
3) you get version 1.5.8 of most slf4j artifacts, but 1.5.2 of the slf4j-api because that's what hibernate-ehcache includes. Might be helpful to have a <dependencyManagement> entry in the auto-generated POM with the proper version
4) Wrong version of grails reported to plugins, so their minimum-version checks fail (as listed below)