Based on the description of the issue I assume you're using Maven 2.x? Maven
3.0 has been improved (issues fixed) with regards to resolving artifacts
within a multi-module build. So if possible I would suggest you upgrade and
you will not run into these issues.

If you can't upgrade for some reason, try putting the release plugin
configuration in the pluginManagement section of the parent. Or do you have
it there already?
Then, in the module you're having issues execute:
mvn help:effective-pom
and check that the configuration really is present or if it overwritten by
some other configuration.

/Anders

On Wed, Feb 16, 2011 at 03:23, Michael Remijan <[email protected]> wrote:

>
>
> 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?

Reply via email to