Grails Maven Plugin

Maven support?

Details

  • Type: Sub-task Sub-task
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

I must confess I am a fan of maven and also like the concept of Groovy on Grails very much and would like to use both in my next project.

However, the current grails project directory layout (as generated by grails create-app) is not very compatible with a typical maven project.

Will you consider supporting this layout - either by using maven project structure by default or having an option to create-app to generate maven compatible structure?

Activity

Hide
Graeme Rocher added a comment -

Hi Brian,

I appreciate there are many Maven fans out there, but to be honest I'm not one of them
The only feature I would likely be interested in from Maven is the dependency resolution via downloading from ibiblio, but even then i would probably choose Ivy instead.

Having said that the Grails build file (located at %GRAILS_HOME%\src\grails\build.xml) is just an ant build so if you want to contribute a mavenised equivalent please feel free.

Graeme

Show
Graeme Rocher added a comment - Hi Brian, I appreciate there are many Maven fans out there, but to be honest I'm not one of them The only feature I would likely be interested in from Maven is the dependency resolution via downloading from ibiblio, but even then i would probably choose Ivy instead. Having said that the Grails build file (located at %GRAILS_HOME%\src\grails\build.xml) is just an ant build so if you want to contribute a mavenised equivalent please feel free. Graeme
Hide
Graeme Rocher added a comment -

Unless there is some outcry of people wanting this I'm going to close this one.

Show
Graeme Rocher added a comment - Unless there is some outcry of people wanting this I'm going to close this one.
Hide
Dave Syer added a comment -

I am interested (as you know). Arnaud Heritier has started to work on some Maven integration. I am hacking away with a load of not very good ant goals. The directory layout is certainly an issue - mainly for me because it is not clear which code is generated and which is created by the developer (and some is a mix - yeuch).

Some links:

http://blog.ithron.be/?p=5 A good start but with some problems

http://forge.octo.com/confluence/display/MTG/Home - currently empty, but Arnaud says he is starting work on it now

Show
Dave Syer added a comment - I am interested (as you know). Arnaud Heritier has started to work on some Maven integration. I am hacking away with a load of not very good ant goals. The directory layout is certainly an issue - mainly for me because it is not clear which code is generated and which is created by the developer (and some is a mix - yeuch). Some links: http://blog.ithron.be/?p=5 A good start but with some problems http://forge.octo.com/confluence/display/MTG/Home - currently empty, but Arnaud says he is starting work on it now
Hide
Stig Lau added a comment -

What is the current status of Maven 2 support by the Grails team, for building Grails based projects?

Can you reopen the Maven/Grails discussion so that we are informed of the current status, what the issues are, so we can express its importance for us?

I believe it would require storing the knowledge of how Grails is built, in a pom, and perhaps some plugins for the specialities. Not an entire rewrite of the ant build system, and replace it, to get the required functionality.
Grails is a great product, but not having support is a blocker for adopting Grails, for those who have standardized Maven.

Grails-maven-plugin, http://forge.octo.com/confluence/display/MTG/Home, is a wrapper around the ant tasks.
It is able to build Grails projects as part of a larger Maven build.It can be downloaded in version 0.3-SNAPSHOT.

Show
Stig Lau added a comment - What is the current status of Maven 2 support by the Grails team, for building Grails based projects? Can you reopen the Maven/Grails discussion so that we are informed of the current status, what the issues are, so we can express its importance for us? I believe it would require storing the knowledge of how Grails is built, in a pom, and perhaps some plugins for the specialities. Not an entire rewrite of the ant build system, and replace it, to get the required functionality. Grails is a great product, but not having support is a blocker for adopting Grails, for those who have standardized Maven. Grails-maven-plugin, http://forge.octo.com/confluence/display/MTG/Home, is a wrapper around the ant tasks. It is able to build Grails projects as part of a larger Maven build.It can be downloaded in version 0.3-SNAPSHOT.
Hide
Graeme Rocher added a comment -

The current status is that we are working on Maven integration for 1.1 and will likely migrate the grails maven plugin code to grails core

Show
Graeme Rocher added a comment - The current status is that we are working on Maven integration for 1.1 and will likely migrate the grails maven plugin code to grails core
Hide
Peter Ledbrook added a comment -

As mentioned on the mailing list, you can now create a Grails project from a Maven archetype and use the standard build cycle:

mvn archetype:generate -DarchetypeGroupId=org.grails \
    -DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.0-SNAPSHOT \
    -DarchetypeRepository=http://snapshots.repository.codehaus.org \
    -DgroupId=example -DartifactId=my-app

Once you have created an app, just from "mvn package" from the root of the project and watch as a WAR file is created for you.

Show
Peter Ledbrook added a comment - As mentioned on the mailing list, you can now create a Grails project from a Maven archetype and use the standard build cycle:
mvn archetype:generate -DarchetypeGroupId=org.grails \
    -DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.0-SNAPSHOT \
    -DarchetypeRepository=http://snapshots.repository.codehaus.org \
    -DgroupId=example -DartifactId=my-app
Once you have created an app, just from "mvn package" from the root of the project and watch as a WAR file is created for you.
Hide
Peter Ledbrook added a comment -

Closing this because Maven support is now available. Specific problems or requests should be raised as new issues.

Show
Peter Ledbrook added a comment - Closing this because Maven support is now available. Specific problems or requests should be raised as new issues.
Hide
Stig Lau added a comment -

Great to have a Maven platform to work on. X-mas joy to you all!

Show
Stig Lau added a comment - Great to have a Maven platform to work on. X-mas joy to you all!

People

Vote (5)
Watch (5)

Dates

  • Created:
    Updated:
    Resolved: