i know that. I've done that way before but i was confused because it seem to
me not working thus instead of writing all dependencies i've chosen the one
that interests me   

Stephen Connolly-2 wrote:
> 
> Why even bother doing it that way.... you do know you can have
> dependencies
> in profiles!!!
> 
> <profile>
>   <id>legacy</id>
>   <!--  have this one inactive -->
>   <dependencies>
>      <!-- Spring 2.0.8 stuff -->
>   </dependencies>
> </profile>
> <profile>
>   <id>new</id>
>   <!-- have this one active by default -->
>   <dependencies>
>     <!-- Spring 2.5.6 stuff -->
>   </dependencies>
> </profile>
> 
> if you don't specify the profile on the command line, it will use 2.5.6,
> if
> you specify -Plegacy that will deactivate all other profiles, as
> specifying
> a profile on the command line deactivates any profiles that are active by
> default
> 
> -Stephen
> 
> 2008/12/22 aymen83 <[email protected]>
> 
>>
>> the property is used in another pom
>> <properties>
>>        <Spring.version>2.5.6</Spring.version>
>>        <Spring-WS.version>1.5.0</Spring-WS.version>
>>        <Aspectj.version>1.5.4</Aspectj.version>
>>        <Log4j.version>1.2.15</Log4j.version>
>>        <spring-batch.version>1.1.1.RELEASE</spring-batch.version>
>>     </properties>
>> what i want to do is to override the Spring.Verison properties using my
>> new
>> profile. Something like
>> --mvn clean install -Plegacy
>> and it's supposed to change the version of spring from 2.5.6 to 2.0.8
>> thanks for suggestions
>>
>>
>> Baptiste MATHUS-4 wrote:
>> >
>> > I might have missed something, but where did you use this property
>> > somewhere
>> > else in your pom? And how do you run maven? What did you put after -P?
>> >
>> > Cheers
>> >
>> > 2008/12/19 aymen83 <[email protected]>
>> >
>> >>
>> >> two profiles this is what i have done and this the profile for spring
>> >> 2.0.8
>> >>
>> >> <profile>
>> >>                        <id>legacy</id>
>> >>                        <activation>
>> >>                               
>> <activeByDefault>false</activeByDefault>
>> >>                                <jdk>1.5</jdk>
>> >>                        </activation>
>> >>                        <properties>
>> >>                                <Spring.Version>2.0.8</Spring.Version>
>> >>                        </properties>
>> >>                        <build>
>> >>                                <resources>
>> >>                                        <resource>
>> >>
>> >>  <directory>src\main\resources\ressourcesDev</directory>
>> >>                                        </resource>
>> >>                                </resources>
>> >>                                <plugins>
>> >>                                        <plugin>
>> >>
>> >>  <groupId>org.apache.maven.plugins</groupId>
>> >>
>> >>  <artifactId>maven-war-plugin</artifactId>
>> >>                                                <version>2.0</version>
>> >>                                                <configuration>
>> >>                                                        <webResources>
>> >>
>>  <resource>
>> >>
>> >>  <directory>WsService\ressources2</directory>
>> >>
>> >> </resource>
>> >>                                                        </webResources>
>> >>                                                </configuration>
>> >>                                        </plugin>
>> >>                                </plugins>
>> >>                        </build>
>> >>
>> >>                </profile>
>> >>
>> >> but this seems not working since when i tape mvn dependency:resolve i
>> >> only
>> >> have spring2.5.6
>> >> thanks for helping
>> >>
>> >>
>> >> aymen83 wrote:
>> >> >
>> >> > hi
>> >> >
>> >> > i've been searching for a way to override the version of an Artifact
>> >> using
>> >> > profiles, is that possible?
>> >> > the idea is to change the version of framework when compiling a
>> >> project,
>> >> > for instance, the project is compiled using spring 2.5 and i want to
>> >> write
>> >> > a profile to compile it with the version 2.0
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/questions-about-profiles--tp21088457p21093168.html
>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [email protected]
>> >> For additional commands, e-mail: [email protected]
>> >>
>> >>
>> >
>> >
>> > --
>> > Baptiste <Batmat> MATHUS - http://batmat.net
>> > Sauvez un arbre,
>> > Mangez un castor !
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/questions-about-profiles--tp21088457p21123944.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/questions-about-profiles--tp21088457p21125228.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to