You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by aymen83 <ay...@yahoo.fr> on 2008/12/17 17:37:56 UTC
override the maven profile doesn't work
hi all,
i have a question:
profiles are done to provide a specific environment of building a project,
so what i wanna do is:
- i wanna provide a profile for building my project using a différent
version of framework such as spring, to do this i changed the settings.xml
of maven and added another profile but i don't know how to proceed to change
the version of the framework for the given profile which i want to call from
shell?
i wrote something like this in my pom.xml
<profile>
<id>legacy</id>
<activation>
<activeByDefault>false</activeByDefault>
<jdk>1.5</jdk>
</activation>
<properties>
<Spring.Version>2.0.8</Spring.Version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${Spring.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${Spring.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${Spring.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${Spring.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
now when i type mvn dependency:resolve -Pmyprofile
the output is
org.jacorb:corba:jar:1.0:compile
org.springframework:spring:jar:2.5.6:compile
org.springframework:spring-aspects:jar:2.5.6:compile
org.springframework:spring-beans:jar:2.5.6:compile
org.springframework:spring-context:jar:2.5.6:compile
org.springframework:spring-context-support:jar:2.5.6:compil
org.springframework:spring-core:jar:2.5.2:compile
org.springframework:spring-tx:jar:2.5.2:runtime
org.springframework:spring-web:jar:2.5.6:compile
org.springframework:spring-webmvc:jar:2.5.6:compile
org.springframework.ws:spring-oxm:jar:1.5.0:compile
org.springframework.ws:spring-oxm-tiger:jar:1.5.0:compile
org.springframework.ws:spring-ws-core:jar:1.5.0:compile
org.springframework.ws:spring-ws-core-tiger:jar:1.5.0:compi
org.springframework.ws:spring-ws-security:jar:1.5.0:runtime
org.springframework.ws:spring-xml:jar:1.5.0:compile
oro:oro:jar:2.0.8:compile
wsdl4j:wsdl4j:jar:1.6.1:compile
xalan:xalan:jar:2.7.0:runtime
xerces:xercesImpl:jar:2.8.1:runtime
xml-apis:xml-apis:jar:1.0.b2:compile
any idea?
--
View this message in context: http://www.nabble.com/override-the-maven-profile-doesn%27t-work-tp21056537p21056537.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org