Thanks for the quick reply!
[email protected] wrote:
> How do you invoke profiles and which version of maven you use?
>
>
>mvn -v
Apache Maven 2.2.0 (r788681; 2009-06-26 16:04:01+0300)
Java version: 1.5.0_17
Java home: C:\Program Files\Java\jdk1.5.0_17\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
In the effective pom.xml the dbcpVersion is not replaced , and
subsequently there are build errors.
>mvn -v
Apache Maven 2.2.0 (r788681; 2009-06-26 16:04:01+0300)
Java version: 1.5.0_17
Java home: C:\Program Files\Java\jdk1.5.0_17\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${dbcpVersion}</version>
</dependency>
Best regards,
Nina
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]