[ 
http://jira.codehaus.org/browse/MNG-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=205153#action_205153
 ] 

Claus Ibsen commented on MNG-4517:
----------------------------------

And tooling to say the least. eg IDEA can then just load the project without I 
having to remember to select which profile to use.

And other tooling which reads the maven {{pom.xml}} files to add dependencies 
at runtime may not be able to cope with profiles and jdk activations.

We are now considering removing the maven 2.2.x profile to only support maven 
2.0.x. Would be great if you would consider supporting this syntax in 2.2.x as 
well.
For example you could maybe just enclose the old syntax with [ and ,) to 
convert it to the new syntax.

> Support Maven 2.0.x style jdk activation in Maven 2.2.x
> -------------------------------------------------------
>
>                 Key: MNG-4517
>                 URL: http://jira.codehaus.org/browse/MNG-4517
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Profiles
>    Affects Versions: 2.2.1
>         Environment: When someone wants to support users using Maven 2.0.x 
> and Maven 2.2.x at the same time
>            Reporter: Claus Ibsen
>
> At Apache Camel we have users using different version of Maven.
> Many still uses Maven 2.0.9 and which is also used by a lot of CI servers and 
> whatnot.
> Upgrading to Maven 2.2.1 is not always something you just do.
> As camel-core uses JAXB it has dependency on those .jars but they are only 
> activated if the JDK is 1.5 as they are provided out of the box with JDK 1.6+.
> To facilitate this we have this in the pom.xml
> {code:xml}
>     <profile>
>       <id>jdk1.5-maven-2.0.x</id>
>       <activation>
>         <!-- for maven 2.0.x syntax -->
>         <jdk>1.5</jdk>
>       </activation>
>       <dependencies>
>         <dependency>
>           <groupId>javax.xml.bind</groupId>
>           <artifactId>jaxb-api</artifactId>
>         </dependency>
>         <dependency>
>           <groupId>com.sun.xml.bind</groupId>
>           <artifactId>jaxb-impl</artifactId>
>         </dependency>
>       </dependencies>
>     </profile>
> {code}
> As you can see its a profile for using maven 2.0.x where the <jdk> tag uses 
> the syntax it understands which is plain *1.5*.
> Now Maven 2.2.x breaks this as it does not support the plain syntax <jdk> 
> syntax, so you cannot have the same profile for both Maven 2.0.x and 2.2.x.
> That is why we have added a 2nd profile for Maven 2.2.x
> {code:xml}
>     <profile>
>       <id>jdk1.5-maven-2.2.x</id>
>       <activation>
>         <!-- for maven 2.2.x syntax-->
>         <jdk>[1.5,)</jdk>
>       </activation>
>       <dependencies>
>         <dependency>
>           <groupId>javax.xml.bind</groupId>
>           <artifactId>jaxb-api</artifactId>
>         </dependency>
>         <dependency>
>           <groupId>com.sun.xml.bind</groupId>
>           <artifactId>jaxb-impl</artifactId>
>         </dependency>
>       </dependencies>
>     </profile>
> {code}
> As you can see the <jdk> syntax is different as we need to type *[1.5,)*. 
> What we propose is that Maven 2.2.x can understand the plain and simple 
> syntax from 2.0.x which would be *1.5*.
> What it then allows us is to have a single profile and letting it be the 
> default profile (without any id).
> Then people can much easier work with it without having to specify a profile 
> id.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to