Hi all,
I came late to this discussion this time round but I must claim credit
to be the first one asking for tighter maven support (Feb 06):
https://fisheye.codehaus.org/browse/GRAILS-38Like many previous posts, I really appreciate the fact that the grails
team is FINALLY considering support maven for real eventhough they
have been resisting it for the longest time... but finally I guess
succumbed to popular demand :-)
Here's my $0.02 for a more mavenish directory layout for Grails... how
about something like this:
For most subdirs (and then some) under current grails project/grails-app...
* src/main/grails-conf
* src/main/grails-controllers
* src/main/grails-command?
* src/main/grails-domain
* src/main/grails-filters?
* src/main/grails-services
* src/main/grails-taglib
* src/main/grails-util
(The reason for this seaming verbose layout is that immediately under
these directories, there is nothing but packages and code)
The rest:
* src/main/resources
* src/main/web-app
* src/main/groovy
* src/main/java
* src/main/grails-scripts
* src/main/grails-templates (for when you run grails install-templates)
Then
* src/test/grails-unit
* src/test/grails-integration
For plugins, they are really kind of weird. They combine source code,
scripts (that hooks into the build via events), resources, and
libraries. I think may be a scheme where upon calling install-plugin
XYZ, the project's pom.xml get modified to include the needed lib as
dependencies, then some entry is added to the improved
maven-grails-plugin section in the pom to record that this
grails-plugin is to be included, and essentially treat it like a code
generator.
Thus code+resources+scripts get downloaded to:
* target/generated-sources/grails-XYZ-plugin/...
and later the maven-grails-pluin will pick up stuff from there to
proceed with the build.
My wish is that a fully maven integrated grails project can be built
without a prior installed grails environment on disk... if this really
can't be avoided, it could be downloaded as embeded into
maven-grails-plugin, or just downloaded and put under
project/target/grails during build.
Possible? May be we can even engage the Maven team for help/suggestion?
- Brian
On Sun, Jun 22, 2008 at 2:42 PM, crowne <
crowneil@...> wrote:
>
> 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,
>>
>> Peter
>>
>> --
>> Software Engineer
>> G2One, Inc.
>>
http://www.g2one.com/>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>
http://xircles.codehaus.org/manage_email>>
>>
>>
>>
>
> --
> View this message in context:
http://www.nabble.com/Maven-integration---feedback-wanted-tp17776961p18059371.html> Sent from the grails - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>
http://xircles.codehaus.org/manage_email>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email