I have tried that, but some strange unknown reason sometimes, I get version
not found errors on some jars. Random. So I just added it to each of them,
but the property in 1 place and I don't get the errors anymore



On Tue, Jun 24, 2008 at 7:57 AM, De Smet Ringo <
[EMAIL PROTECTED]> wrote:

> Mick,
>
> > -----Original Message-----
> > From: Mick Knutson [mailto:[EMAIL PROTECTED]
> > Subject: Re: Best practice for handling multi-modules version numbers
> >
> > Are you referring to your module versions, or dependency versions?
> >
> > I user <properties> <spring.version>xyz
> >
> > then add ${spring.version} to my dependencies in each of my modules.
> >
> > For my modules, That is just manual labor for me.
>
> Why do you add the version property to each of your modules?
>
> We use a parent pom like below, where all the information of a
> dependency is added to the dependencyManagement tag:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>
>        <modelVersion>4.0.0</modelVersion>
>        <groupId>be.telenet</groupId>
>        <artifactId>main</artifactId>
>        <packaging>pom</packaging>
>        <version>1.0-SNAPSHOT</version>
>        <name>Main Project</name>
>
>        <dependencyManagement>
>        <dependencies>
>
>                <dependency>
>                <groupId>junit</groupId>
>                <artifactId>junit</artifactId>
>                <version>${ver-junit}</version>
>                <scope>test</scope>
>                </dependency>
>
>        </dependencies>
>        </dependencyManagement>
>
>        <properties>
>                <ver-junit>3.8.1</ver-junit>
>        </properties>
> </project>
>
> In the project POM's, I only use the groupId and artifactId of the
> dependency. The rest is resolved via the information in the
> dependencyManagement tag of the parent pom:
>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>
>        <modelVersion>4.0.0</modelVersion>
>        <groupId>be.telenet</groupId>
>        <artifactId>someproject</artifactId>
>        <packaging>jar</packaging>
>        <version>1.0-SNAPSHOT</version>
>        <name>someproject</name>
>
>        <parent>
>                <groupId>be.telenet</groupId>
>                <artifactId>main</artifactId>
>                <version>1.0-SNAPSHOT</version>
>        </parent>
>
>        <dependencies>
>                <dependency>
>                        <groupId>junit</groupId>
>                        <artifactId>junit</artifactId>
>                </dependency>
>        </dependencies>
> </project>
>
> Works like a charm!
>
> Ringo
> *************************************************************
>
> Dit e-mail bericht inclusief eventuele ingesloten bestanden kan informatie
> bevatten die vertrouwelijk is en/of beschermd door intellectuele
> eigendomsrechten. Dit bericht is uitsluitend bestemd voor de
> geadresseerde(n). Elk gebruik van de informatie vervat in dit bericht
> (waaronder de volledige of gedeeltelijke reproductie of verspreiding onder
> elke vorm) door andere personen dan de geadresseerde(n) is verboden. Indien
> u dit bericht per vergissing heeft ontvangen, gelieve de afzender hiervan te
> verwittigen en dit bericht te verwijderen.
>
> This e-mail and any attachment thereto may contain information which is
> confidential and/or protected by intellectual property rights and are
> intended for the sole use of the addressees. Any use of the information
> contained herein (including but not limited to total or partial reproduction
> or distribution in any form) by other persons than the addressees is
> prohibited. If you have received this e-mail in error, please notify the
> sender and delete its contents.
>
> Ce courriel et les annexes éventuelles peuvent contenir des informations
> confidentielles et/ou protégées par des droits de propriété intellectuelle.
> Ce message est adressé exclusivement à son (ses) destinataire(s). Toute
> utilisation du contenu de ce message (y compris la reproduction ou diffusion
> partielle ou complète sous toute forme) par une autre personne que le(s)
> destinataire(s) est formellement interdite. Si vous avez reçu ce message par
> erreur, veuillez prévenir l'expéditeur du message et en détruire le contenu.
>
> *************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
---
Thank You…

Mick Knutson
BASE Logic, inc.
(415) 354-4215

Website: http://baselogic.com
Blog: http://baselogic.com/blog
BLiNC Magazine: http://blincmagazine.com
Linked IN: http://linkedin.com/in/mickknutson
DJ Mick: http://djmick.com
MySpace: http://myspace.com/mickknutson
Tahoe: http://tahoe.baselogic.com

Reply via email to