maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <subir.sasiku...@wipro.com>
Subject RE: configuring dependencies by JRE version
Date Thu, 29 Apr 2010 12:10:55 GMT
Activation property <jdk> is necessary to switch between JREs.
But on activation of a JRE you want to set a property, and you can see
how that is done in the example I wrote below.

Subir 

-----Original Message-----
From: Nina Jeliazkova [mailto:nina@acad.bg] 
Sent: Thursday, April 29, 2010 5:38 PM
To: Subir Sasikumar(WT01 - Telecom Equipment)
Cc: users@maven.apache.org; jeliazkova.nina@gmail.com
Subject: Re: configuring dependencies by JRE version

subir.sasikumar@wipro.com wrote:
> Ah you have set a activation property. Which is not what you want.
>   
Hm, I thought this is the way to switch between JREs - which would be
the correct way?

Thanks,
Nina
> You may need this. For example:
>
>  	<profile>
>           <id>JRE5</id>
>           <activation>
>             <jdk>1.5</jdk>
>           </activation>
>           <properties>
>             <dbcpVersion>1.3</dbcpVersion>
>           </properties>	    
>       </profile>
>
> Subir
>
> -----Original Message-----
> From: Nina Jeliazkova [mailto:nina@acad.bg]
> Sent: Thursday, April 29, 2010 5:22 PM
> To: users@maven.apache.org
> Subject: configuring dependencies by JRE version
>
> Dear All,
>
> I would like to ask if it is possible to define dependencies in Maven2

> POM file to reflect the JRE version.  For example, I would like to use
> commons-dbcp-1.3 in JRE 1.5 and commons-dbcp-1.4 in JRE 1.6.
>
> Defining the corresponding profiles doesn't work - I am most probably 
> missing something.
>  
>    ....
>
>         <dependency>
>             <groupId>commons-dbcp</groupId>
>             <artifactId>commons-dbcp</artifactId>
>             <version>${dbcpVersion}</version>
>         </dependency>
>     ...
>       <profile>
>           <id>JRE5</id>
>           <activation>
>             <jdk>1.5</jdk>
>             <property>
>               <name>dbcpVersion</name>
>               <value>1.3</value>
>             </property>
>           </activation>
>         </profile>
>         <profile>
>           <id>JRE6</id>
>           <activation>
>             <jdk>1.6</jdk>
>             <property>
>               <name>dbcpVersion</name>
>               <value>1.4</value>
>             </property>
>           </activation>
>         </profile>   
>       </profiles>
>
> Best regards,
> Nina Jeliazkova
>
> Please do not print this email unless it is absolutely necessary. 
>
> The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any attachments. 
>
> WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 
>
> www.wipro.com
>   


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are
intended for the exclusive use of the addressee(s) and may contain proprietary, confidential
or privileged information. If you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and destroy all copies
of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email
and any attachments for the presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email. 

www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message