Uploaded image for project: 'Grails Maven Plugin'
  1. Grails Maven Plugin
  2. MAVEN-157

Multi-module projects, grails plugins and set-version


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Environment:
      Grails 1.3.7, Maven 2.2.1, Fedora
    • Testcase included:


      I have 2 grails plugins as maven modules under a parent POM, when I run "mvn grails:set-version" from the parent, I get:

      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] Unable to start Grails
      Embedded error: java.lang.reflect.InvocationTargetException
      PluginAGrailsPlugin.groovy (No such file or directory)

      Looking at the SetVersion script, the flow for a plugin is different to an application and it tries to access the Plugin.groovy file without any supplied relative path.

      That's the problem, I can't speak to the fix, I'm also waiting on the solution MAVEN-154 which is another multi-module problem.

      FYI, Overall it's the release process I'm trying to setup, but the issue is visible using set-version alone.

      Steps to reproduce:

      mkdir mvnGrailsTest
      cd mvnGrailsTest
      grails create-plugin PluginA
      grails create-plugin PluginB
      cd PluginA
      mvn org.grails:grails-maven-plugin:1.3.7:create-pom -DgroupId=com.mycompany
      cd ../PluginB
      mvn org.grails:grails-maven-plugin:1.3.7:create-pom -DgroupId=com.mycompany

      Attached are the changes to the plugin POMs and the root POM. You can run

      mvn grails:set-version

      From within the plugins without problems, but when you run it from the parent, either as is or with the -pl switch, it fails with the above error message.

      1. a-pom.xml
        9 kB
        Michael Gallagher
      2. b-pom.xml
        9 kB
        Michael Gallagher
      3. root-pom.xml
        9 kB
        Michael Gallagher


        There are no comments yet on this issue.


          • Assignee:
            Graeme Rocher
            Michael Gallagher
          • Votes:
            1 Vote for this issue
            1 Start watching this issue


            • Created: