We do it like Tobias described, and frankly, how would you force your projects 
to use the same version otherwise?

We have a hierarchy of parent POMs
- Master parent POM defines everything for Maven, like plugins, properties, 
repositories and stuff
- Per project (not Maven project, the real, big project which is composed of n 
Maven projects) we have a parent POM which defines the version of all 
dependencies, internal and external. The individual projects are only allowed 
to use groupId and artifactId, but not version.

You're just circling around the problem, otherwise. I think that it's much more 
painful to implement and update test cases for versions of components than to 
do it The Maven Way (TM)  ;-)

Best regards,
Eric

> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:[email protected]] 
> Gesendet: Dienstag, 10. März 2009 15:41
> An: Maven Users List
> Betreff: Antwort: Re: how can I guarantee delivery artifacts 
> (*.war, *.ear) to use the same shared API?
> 
> ...that would only move the problem to the common parent.
> Than I have to guarantee, that all my artifacts use the same common 
> parent.
> 
> I´m thinking about a (JUnit)Testcase, that checks the version of 
> common-services, or 
> that reads an entry of all the Manifest.MF oder 
> "common-services.properties", containing the version string.
> 
> Any other idea - Maven based?
> 
> Thanx, Torsten
> 
> 
> 
> 
> Tobias Gierke <[email protected]> 
> 10.03.2009 14:57
> Bitte antworten an
> "Maven Users List" <[email protected]>
> 
> 
> An
> Maven Users List <[email protected]>
> Kopie
> 
> Thema
> Re: how can I guarantee delivery artifacts (*.war, *.ear) to 
> use the same 
> shared API?
> 
> 
> 
> 
> 
> 
> Hi Torsten,
> > Hi, 
> >
> > in our build environment, we build and release our modules 
> at different 
> > times.
> > Lets say UI.war is released first,  than backend.ear (using 
> the released 
> 
> > UI) is released three days later, 
> > than last the WebServices.war were released.
> >
> > All are using a shared API (common-services.jar)
> >
> > In our delivery build we dependency-copy the UI.war, the 
> Backend.ear and 
> 
> > the Webservices.war into a directory structure.
> > We have to guarantee, that the UI.war and the Backend.ear 
> and all other 
> > components, too are all using the same version 
> > of "commons-services.jar".
> >
> > How can I check, that an artifact (*.war, *.ear) has the 
> same dependency 
> 
> > as another artifact?
> > 
> Why don't you create a separate "parent POM" project
> 
> <project>
> 
>    [...]
>    <packaging>pom</packaging>
>     [...]
> 
>   <dependencyManagement>
>      [...]
>     <dependency>
>       <groupId>your-group-id</groupId>
>       <artifactId>common-services<artifactId>
>       <version>1.2.3</version>
>     </dependency>
>     [...]
>   </dependencyManagement>
> [...]
> </project>
> 
> and let your UI / webservices / backend projects all inherit 
> the version
> number from the common parent ?
> 
> Regards,
> 
> Tobias
>  
> 
> > Thanx, Torsten
> >
> > 
> 
> 
> ---------------------------------------------------------------------
> 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