15 October 2009 ~ 7 Comments

What is Right with Grails and Wrong with Maven

This just cracks me up.Here’s how to create a Grails app using the Grails command line:grails create-app demoAnd here’s how to create the app using the Maven command line:mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.grails -DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.1 -DgroupId=example -DartifactId=demo

Enjoyed this post? Click to get future articles delivered by email or get the RSS feed.

7 Responses to “What is Right with Grails and Wrong with Maven”

  1. jens 16 October 2009 at 3:45 am Permalink

    It is unclear to me how you would create a ‘JBoss Service Archive’ with grails. (Sorry for the sarcasm)

    Typically, you would type ‘mvn archetype:generate’ and choose a project type, then answert the questions about group and artifact ids.
    Read more at http://maven.apache.org/plugins/maven-archetype-plugin/usage.html

    IMHO, it’s not always a benefit for a tool like grails to run its own dependency reslution and build tool, because it does not integrate with a larger build, where the grails war is just a component. I have run in to that problem a couple of times and it’s a pain to have the grails project to deviate from all other project policies and procedures.

    Source project layout, for example; where 3rd party libs are stored within the project. Then you have to create exclude rules for the version control system to prevent the libs to checkin.

    Another problem is temp files and some status info, that are stored outside the project directory, which means you cannot simple delete a ./target dir (or similar) to start out fresh. The grails clean command do not always clean up everything and sometimes one has to manually clean up the grails cache.

    Well, … even the sun have spots.

  2. Nils Breunese 16 October 2009 at 7:29 am Permalink

    This is really comparing apples to eh… space ships. Or something.

  3. JS 16 October 2009 at 6:20 pm Permalink

    I’m a big fan of both technologies, but this is not a good comparison, and I mean it.

  4. Brian 16 October 2009 at 10:24 pm Permalink

    How about mvn archetype:generate ? You seem to have instructions from 2 years ago.

  5. jonchase 17 October 2009 at 12:37 am Permalink

    I’ll be the first to admit that maybe I’m missing something here WRT Maven. I pulled the Maven “create app” command line off of this page from the Grails.org site. Apparently that page points to this page on an external site, where “grails:create-app” is used to create a Maven based Grails project.

    I stand corrected!

    For the record, I still can’t stand Maven. :) Give me Ant any day!

  6. graham 18 October 2009 at 8:31 am Permalink

    maven was never integrated very well with grails because the main grails dev hates it. in my experience, ppl that hate maven haven’t used it. i’ve had loads more problems trying to work with distributed ant than i have *ever* had with maven and its not as tho ivy makes the dep prob any easier, in fact you’ll quickly have exactly the same probs.

    any each to their own, i can still use m-ant-p when i need it :)


Leave a Reply