I have a simple maven parent project containing
<modules>
<module>myGrailsPlugin<module>
<module>someVanillaMavenProject<module>
</modules>
Folder structure is straightforward.
parent
|_ myGrailsPlugin
|_ pom.xml
|_ MyGrailsPlugin.groovy
|_ someVanillaMavenProject
|_ pom.xml
|_ pom.xml
Both modules, can be build sucessfully, when built individually. However when I run
mvn compile
on the parent project I get the following error.
Embedded Error: java.lang.reflect.InvocationTargetException
MyGrailsPlugin.groovy (The system cannot find the file specified.)
The file myGrailsPlugin.groovy exist in the top level of the myGrailsPlugin folder and is the grails plugin descriptor. Seems maven does not look up the file in this folder.
Any idea how do fix this?
The pom.xml of the GrailsPlugin looks like that.
...
<build>
...
<pluginManagement />
<plugins>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>set-version</id>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<command>set-version</command>
<args>${project.version}</args>
</configuration>
</execution>
<execution>
<id>package-plugin</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<command>package-plugin</command>
</configuration>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
...
Regards, Will