I'm trying to use the release plugin for the first time on a multi-module
project. Given that my project looks like this:
/Parent
/Project-A
/Project-B (had a dependency on Project-A)
the problem I'm having is when the release plugin goes to build Project-B it
fails with an error saying it can't find Project-A. The release plugin will
successfully take the version of Project-A and remove the "-SNAPSHOT" so that's
OK. Also, the release plugin will successfully alter the pom of Project-B and
remove the "-SNAPSHOT" on the dependency to Project-A. However Project-B still
can't find Project-A when it the release plugin tries to build it.
I've posted before and received a suggestion to use the following:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>clean install</preparationGoals>
</configuration>
</plugin>
I've put this into the top level <packaging>pom</packaging> of my multi-module
project. I've also put this into the sub modules as well. When I run
release:prepare, I see on the console the top level pom gets clean install....
[INFO] [INFO]
------------------------------------------------------------------------
[INFO] [INFO] Building Project Parent
[INFO] [INFO] task-segment: [clean, install]
[INFO] [INFO]
------------------------------------------------------------------------
however sub modules aren't doing this too. For sub modules I only see comple,
not install...
[INFO] [INFO]
------------------------------------------------------------------------
[INFO] [INFO] Building Project A
[INFO] [INFO]
------------------------------------------------------------------------
[INFO] [INFO] [buildnumber:create {execution: default}]
[INFO] [INFO] Storing buildNumber: Tuesday, February 15, 2011 8:15:25 PM CST at
timestamp: 1297822525811
[INFO] [INFO] [resources:resources {execution: default-resources}]
[INFO] [INFO] [compiler:compile {execution: default-compile}]
[INFO] [INFO] Compiling 5 source files to C:\Parent\Project-A\target\classes
Suggestions?