Grails Maven Plugin

Issues after testing grails.org/Maven+Integration

Details

  • Type: Sub-task Sub-task
  • Status: Resolved Resolved
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Win XP

Description

I tested out http://www.grails.org/Maven+Integration today, and thought I'd share the issues others may face when testing out Grails/Maven.

  • May have a problem running from Maven v2.0.6. "Ignoring available plugin update: 2.0-alpha-2 as it requires Maven version 2.0.7" Worked fine in 2.0.9
  • \'s are exluded from the "JUST DO IT" archetype snippet
  • No link to how to comment/report bug from webpage
  • Would be preferrable with short instructions.txt file at root of project with for example "mvn grails:...."
  • JTA dependency requires manual download process - could perhaps be exluded?
  • Had problems with running with Maven on my mac - may propably be relation to pollution of maven config / repo
  • Problem running grails commands after "mvn clean" - target/grails-lib not found. mvn package solves problem
  • Starting up jetty with "mvn grails:run-app" makes jetty answer, but http://localhost:8080/my-app returns 503. Starting the script is also peculiarly fast...
  • When running mvn grails:run-app-https, I got the message that the folder ~/.grails/1.1-SNAPSHOT/ssl couldn't be created. Creating the folder manually solved the problem.

Great Work on the Maven plugin BTW!
http://stigl.wordpress.com/grails-11-got-maven-support-so-what?

Activity

Hide
Peter Ledbrook added a comment -

Thanks for the feedback Stig.

1. The original plugin had a requirement of 2.0.7, so I haven't changed it. Is 2.0.6 a widely used version? If so, it may be worth downgrading the restriction to 2.0.4 say. I don't know what changed between the various patch releases
2. I'll work out a way of including them. The Wiki engine doesn't like them much.
3. Good point - I'll add one.
4. Okey-dokey
5. If you want GORM/Hibernate, I believe you need the JTA dependency.
6. Graeme seemed to have problems on his Mac - maybe there is an odd platform issue here
7. gngng! I thought I'd fixed that. I'll have to look again.
8. It's a bug
9. Ditto

In answer to your blog post, Maven isn't quite in control since the various phases execute the corresponding Gant scripts. So there is quite a bit of duplication. For example, in the "compile" phase the Maven compile plugin goes first, and then the Grails plugin executes the corresponding "Compile" Gant script. Since plugins can hook into the Grails build system and influence it (for example by adding to the compiler classpath), bypassing it means some things won't work. I'm interested to see just how well the current approach works and whether we need to change tack.

Show
Peter Ledbrook added a comment - Thanks for the feedback Stig. 1. The original plugin had a requirement of 2.0.7, so I haven't changed it. Is 2.0.6 a widely used version? If so, it may be worth downgrading the restriction to 2.0.4 say. I don't know what changed between the various patch releases 2. I'll work out a way of including them. The Wiki engine doesn't like them much. 3. Good point - I'll add one. 4. Okey-dokey 5. If you want GORM/Hibernate, I believe you need the JTA dependency. 6. Graeme seemed to have problems on his Mac - maybe there is an odd platform issue here 7. gngng! I thought I'd fixed that. I'll have to look again. 8. It's a bug 9. Ditto In answer to your blog post, Maven isn't quite in control since the various phases execute the corresponding Gant scripts. So there is quite a bit of duplication. For example, in the "compile" phase the Maven compile plugin goes first, and then the Grails plugin executes the corresponding "Compile" Gant script. Since plugins can hook into the Grails build system and influence it (for example by adding to the compiler classpath), bypassing it means some things won't work. I'm interested to see just how well the current approach works and whether we need to change tack.
Hide
Stig Lau added a comment -

1. A note somewhere on requirement on 2.0.7 will do
5. Downloading JTA via Maven can be a b*tch since it'll often end in a manual step where the user has to download a .zip from sun, rename it to .jar and place it correctly in their local repo. Might put non-maven-junkies off. Could JOTM be a viable replacement? http://repo2.maven.org/maven2/jotm/jotm/2.0.10
6. My issue on the mac was related to downloading the archetype snapshot. Propably just my problem if it doesn't reoccur. Log attached.
8. The only critical showstopper as far as I can tell

re: The blog post
My concern with Grails is finding out how it is woven together. Especially with the nifty GORM stuff. I believe supporting Maven plugins (testNG, site generation aso) would require knowledge of the Grails build process. Do you have any pointers to documentation on how weaving Grails works?

Show
Stig Lau added a comment - 1. A note somewhere on requirement on 2.0.7 will do 5. Downloading JTA via Maven can be a b*tch since it'll often end in a manual step where the user has to download a .zip from sun, rename it to .jar and place it correctly in their local repo. Might put non-maven-junkies off. Could JOTM be a viable replacement? http://repo2.maven.org/maven2/jotm/jotm/2.0.10 6. My issue on the mac was related to downloading the archetype snapshot. Propably just my problem if it doesn't reoccur. Log attached. 8. The only critical showstopper as far as I can tell re: The blog post My concern with Grails is finding out how it is woven together. Especially with the nifty GORM stuff. I believe supporting Maven plugins (testNG, site generation aso) would require knowledge of the Grails build process. Do you have any pointers to documentation on how weaving Grails works?
Hide
Chen Wang added a comment -

Just a minor comment on resolving dependency on JTA, java.net now has a Maven 2 repo which should be usable and the solution could be as easy as adding the xml below in the archetype for pom.xml so that the java.net repo is already available before running 'mvn initialize'.

...
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
... <!-- others like the codehaus one already there -->
</repositories/>
...

Show
Chen Wang added a comment - Just a minor comment on resolving dependency on JTA, java.net now has a Maven 2 repo which should be usable and the solution could be as easy as adding the xml below in the archetype for pom.xml so that the java.net repo is already available before running 'mvn initialize'. ... <repositories> <repository> <id>maven2-repository.dev.java.net</id> <name>Java.net Repository for Maven</name> <url>http://download.java.net/maven/2/</url> <layout>default</layout> </repository> ... <!-- others like the codehaus one already there --> </repositories/> ...
Hide
Peter Ledbrook added a comment -

Thanks Chen, I'll give that a try - it would certainly make everyone's life easier if it works!

Show
Peter Ledbrook added a comment - Thanks Chen, I'll give that a try - it would certainly make everyone's life easier if it works!
Hide
Stig Lau added a comment -

I guess the questions have been answered. Thanx!

Show
Stig Lau added a comment - I guess the questions have been answered. Thanx!

People

  • Assignee:
    Unassigned
    Reporter:
    Stig Lau
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: