Configure you release plugin to make install to you local repository first, then release:prepare success.

     <plugin>
       <artifactId>maven-release-plugin</artifactId>
       <inherited>true</inherited>
       <configuration>
         <preparationGoals>clean install</preparationGoals>
       </configuration>
     </plugin>

- markku

Randy L. Ringeisen wrote:
Hi.  I have a question about the release plugin (Maven 2 release plug-in
2.0 beta 4).  I have a multi-level project as follows
Parent - artifact type is POM
   -- Ejb - creates an EJB JAR
   -- Ear - creates an EAR that includes the EJB jar
The Ear project depends on the Ejb jar that is created (because it has
to include it in the ear).  This works great until I run mvn
release:prepare.  The problem is that the release plugin modifies the
version number in the POM files from the snapshot version (e.g.
1.0-SNAPSHOT) to the release version (e.g. 1.0).  It then builds the EJB
project but does not install it into the local repository (which makes
sense, since this is the prepare step).  Then it tries to build the EAR
project and fails because the EJB jar which it depends on is not found.
The workaround I have been using is to run "mvn release:prepare" until
it fails  By that time it has modified the version number in the POM
files.  Then I run "mvn install" to get the Ejb jar into the local
repository.  Then I can run "mvn release:prepare" again.  It will pick
up where it left off and finish successfully.  After that I can run "mvn
release:perform" and all is right with the world.
Does anyone have a more elegant way to solve this problem?

Randy Ringeisen

PS.  Have only been using Maven for a few months and it is great.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to