i have a problem in my maven build process. there is a pom file which uses the maven-invoker-plugin to execute different tasks:
<execution>
<id>createWebstartApps</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<projectsDirectory>.</projectsDirectory>
<streamLogs>true</streamLogs>
<pomIncludes>
<pomInclude>pom1.xml</pomInclude>
</pomIncludes>
....
but when i use the maven release plugin "mvn release:prepare" the install goal will not be executed on the child pom dependencies. For example the pom1.xml has the following dependency:
<dependency>
<groupId>com.qnamic.dis</groupId>
<artifactId>DisAdminToolWithPlugins</artifactId>
<version>${project.parent.version}</version>
<type>pom</type>
<scope>runtime</scope>
.....
But this dependency (in this case the pom file) will not be installed in my local maven repo and therefore not be found:
[INFO] [INFO] Building: pomWebstartDisAdminTool.xml
[INFO] [INFO] [INFO] Scanning for projects...
[INFO] [INFO] [INFO]
[INFO] [INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [INFO] Building RailOpt DIS Admin Tool 4.9.12
[INFO] [INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [WARNING] The POM for com.qnamic.dis:DisAdminToolWithPlugins:pom:4.9.12 is missing, no dependency information available
[INFO] [INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [INFO] BUILD FAILURE
[INFO] [INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [INFO] Total time: 0.203s
[INFO] [INFO] [INFO] Finished at: Tue Feb 05 13:00:04 CET 2013
[INFO] [INFO] [INFO] Final Memory: 4M/15M
[INFO] [INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] [ERROR] Failed to execute goal on project DisAdminToolWebstart: Could not resolve dependencies for project com.qnamic.dis:DisAdminToolWebstart:pom:4.9.12: Failure to find com.qnamic.dis:DisAdminToolWithPlugins:pom:4.9.12 in http://maven.ad.bls.ch/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of bls-public has elapsed or updates are forced -> [Help 1]
any ideas?
regards
Try adding install before run. Eg.
<execution>
<id>createWebstartApps</id>
<phase>process-resources</phase>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
...
For more information: http://maven.apache.org/plugins/maven-invoker-plugin/install-mojo.html & http://maven.apache.org/plugins/maven-invoker-plugin/usage.html
HTH, Jamie