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:[email protected]]
Sent: Thursday, April 29, 2010 5:38 PM
To: Subir Sasikumar(WT01 - Telecom Equipment)
Cc: [email protected]; [email protected]
Subject: Re: configuring dependencies by JRE version

[email protected] 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:[email protected]]
> Sent: Thursday, April 29, 2010 5:22 PM
> To: [email protected]
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to