16 messages in org.codehaus.grails.userRe: [grails-user] Maven integration -...
FromSent OnAttachments
Peter LedbrookJun 11, 2008 5:57 am 
Tomas LinJun 11, 2008 7:13 am 
Raphaël PiéroniJun 11, 2008 7:57 am 
philippoJun 11, 2008 8:08 am 
Peter LedbrookJun 11, 2008 8:10 am 
Tomas LinJun 11, 2008 8:50 am 
Peter LedbrookJun 11, 2008 9:00 am 
Luke DaleyJun 18, 2008 4:42 pm 
Michael MalleteJun 19, 2008 11:09 pm 
crowneJun 22, 2008 2:42 pm 
Brian GuanJun 24, 2008 1:24 am 
Graeme RocherJun 24, 2008 1:33 am 
crowneJun 24, 2008 3:54 am 
Luke DaleyJun 24, 2008 4:05 am 
Graeme RocherJun 24, 2008 6:24 am 
Gregory PierceJun 24, 2008 10:27 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [grails-user] Maven integration - feedback wantedActions...
From:crowne (crow@gmail.com)
Date:Jun 22, 2008 2:42:05 pm
List:org.codehaus.grails.user

Hi Peter,

Sorry for the late reply. First of all, I am thrilled that the grails team is going to include the MTG plugin for 1.1 Secondly, I am positively blown-away that changes to the directory structure are being done to support co-existance with maven - thanks a whole bunch.

For skipping tests, see this link http://www.nabble.com/Maven-integration---feedback-wanted-to17776961.html It basically states that -Dmaven.test.skip is honored by both surefire and the compiler plugin, and that -DskipTests or the equivalent pom configuration is a surefire only option.

More importantly, and I hope that I'm not too late here, wrt the location of the "grails-app" stuff. I would suggest that you follow the groovy source file location used by GMaven. http://groovy.codehaus.org/GMaven+-+Building+Groovy+Projects

I believe that this should be done whether or not gmaven is used to compile the groovy classes. Even if mtg is invoked to wrap the grails commands, those that want to use gmaven at a later stage would have an easier migration path.

The general maven convention when it comes to location of source files is to separate main and test into two distinct directories under src and then group by type, java, groovy, ruby, resources etc. You typically would have the ability to override the location of the compiled output, so that you could once again build up a binary image of groovy-app under the target folder. The resulting structure would then look something like the below: src \main \groovy \java \resources \ruby \scala \web-app \test \groovy \java \resources \ruby \scala \web-app target \groovy-app . . .

OK, so I wouldn't expect to see ruby and scala sources in a default grails-app, its mostly for demonstration purposes.

I do anticipate a gotcha, when we want to disable compilation of the groovy classes for debugging and hot-code changes, this needs some thought - I don't have an answer off-hand, there may already be a gmaven option, I haven't looked.

Good luck, and thanks some more!

Cheers, Neil Crow.

Peter Ledbrook-2 wrote:

good idea - we'd desperately need the ability to run mvn site (generate groovydoc?javadoc?) and would like to switch off test run (via -Dmaven.test.skip).

Do you know whether this is an option handled by the Surefire plugin, or does Maven simply skip the "test" phase?

Complying to the maven directory file structure is another plus.

The "grails-app" directory makes this difficult, which is why I'm suggesting "src/main/grails" in its place. Other suggestions are welcome (such as "src/main/resources/grails-app") particularly as my Maven experience is limited.

Cheers,