Nicolas, You can defined profile according to the used JDK. In these profile you should defined a dependencyManagement in which you define your artifact version to use: <profile> <id>jdk1.4</id> <activation> <jdk>1.4</jdk> </activation> <dependencyManagement> ... </dependencyManagement> </profile>
_______________________________________________________________________________ Christophe DENEUX / Capgemini Sud / Méditerranée Technical Leader Tel: + 33 4 93 95 55 92 / www.capgemini.com <http://www.capgemini.com/> Porte de l'Arénas - Entrée B / 455 Promenade des Anglais / 06200 Nice / FRANCE Join the Collaborative Business Experience _______________________________________________________________________________ Please consider the environment and do not print this email unless absolutely necessary. Capgemini encourages environmental awareness. ________________________________ De: nicolas de loof [mailto:[EMAIL PROTECTED] Date: mer. 05/09/2007 09:47 À: Maven Users List Objet : how to declare a dependency that depends of target JRE ? Hello, I'm writing a shared utility project that uses backport-util-concurrent. This dependency has 3 versions, for java 1.2/1.3, java 1.4 and Java 5. How to set my POM dependencies so that projects that use my lib get the expected backport in classpath ? For now the only way I've found is to declare dependency on backport as optional. Nico. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.