Are you using a pluginManagement section in your parent POM?  The following 
works for me (I'm using Maven 2.2.1):

...
   <build>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-release-plugin</artifactId>
               <version>2.1</version>
               <configuration>
                  <preparationGoals>clean install</preparationGoals>
                  <goals>deploy site-deploy</goals>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>
...

Good luck.
Craig


-----Original Message-----
From: Michael Remijan [mailto:mjremi...@yahoo.com] 
Sent: Tuesday, February 15, 2011 9:23 PM
To: users@maven.apache.org
Subject: Using release plugin with multi-module project



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?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to