Here is the reference.

http://www.sonatype.com/books/maven-book/reference/optimizing-sect-final-poms.html

---
Todd Thiessen
 

> -----Original Message-----
> From: Thiessen, Todd (BVW:9T16) 
> Sent: Thursday, March 05, 2009 1:17 PM
> To: 'Maven Users List'
> Subject: RE: RE: RE: Re: release:prepare cannot find artifacts
> 
> Ok. This is not what is recommended in the definitive guide 
> though. It is very clear in the optimzing POM section that 
> ${project.version} should be used when referencing sibling projects.
> 
> 
> ---
> Todd Thiessen
>  
> 
> > -----Original Message-----
> > From: news [mailto:[email protected]] On Behalf Of Jörg Schaible
> > Sent: Thursday, March 05, 2009 1:14 PM
> > To: [email protected]
> > Subject: RE: RE: Re: release:prepare cannot find artifacts
> > 
> > Hi Todd,
> > 
> > Todd Thiessen wrote at Donnerstag, 5. März 2009 16:21:
> > 
> > > 
> > >> > Getting back to the issue at hand though, what is the
> > proper way in
> > >> > Maven to do a build with the release plugin when you have
> > >> dependencies
> > >> > between modules?  Are you supposed to do something with the
> > >> dependency
> > >> > plugin to ensure that dependencies get properly resolved
> > during the
> > >> > prepare?
> > >> 
> > >> Use the proper version strings for all artifacts that are
> > part of the
> > >> multi-project, not properties, and let the release plugin handle 
> > >> this.
> > > 
> > > Perhaps you are referring to something I am not familiar
> > with but I am
> > > doing all that.  All module projects have the proper
> > version.  In this
> > > case ${project.version}.
> > > 
> > > However, when you have dependencies between modules, the release 
> > > prepare will fail by default since it doesn't do an
> > install. Without
> > > an install, one module doesn't have access to the artifacts
> > of another.
> > 
> > Exactly, therefore you should not use ${project.version} at all, 
> > because during release the value is simply wrong.
> > However, in this case release plugin cannot adjust the 
> value, because 
> > it is "hiding".
> > 
> > Working approach is:
> > 
> > Parent POM:
> > ===========
> > ...
> >  <groupId>group</groupId>
> >  <artifactId>parent</artifactId>
> >  <version>1.0-SNAPSHOT</version>
> > ...
> >  <dependencyManagement>
> >     <dependencies>
> >       <dependency>
> >         <groupId>group</groupId>
> >         <artifactId>childA</artifactId>
> >         <version>1.0-SNAPSHOT</version>
> >       </dependency>
> >       <dependency>
> >         <groupId>group</groupId>
> >         <artifactId>childB</artifactId>
> >         <version>1.0-SNAPSHOT</version>
> >       </dependency>
> >     </dependencies>
> >  </dependencyManagement>
> > 
> > 
> > ChildA POM:
> > ===========
> >  <parent>
> >    <groupId>group</groupId>
> >    <artifactId>parent</artifactId>
> >    <version>1.0-SNAPSHOT</version>
> >  </parent>
> >  <artifactId>childA</artifactId>
> >  ...
> > 
> > ChildB POM:
> > ===========
> >  <parent>
> >    <groupId>group</groupId>
> >    <artifactId>parent</artifactId>
> >    <version>1.0-SNAPSHOT</version>
> >  </parent>
> >  <artifactId>childB</artifactId>
> >  ...
> >  <dependencies>
> >    <dependency>
> >      <groupId>group</groupId>
> >      <artifactId>childA</artifactId>
> >      <version>1.0-SNAPSHOT</version>
> >    </dependency>
> >  </dependencies>
> > 
> > 
> > All those version strings will automatically adjusted.
> > 
> > - Jörg
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> > 
> > 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to