You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Lyons, Roy" <Ro...@cmegroup.com> on 2013/08/09 16:11:44 UTC
Maven 3.1 profile activation
So... They released sonar-maven-plugin 2.1... and my corporate pom is nice enough to developers to choose the right sonar plugin based on maven version...
<profile>
<id>maven-2</id>
<activation>
<file>
<!-- basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
<missing>${basedir}</missing>
</file>
</activation>
...
<profile>
<id>maven-3</id>
<activation>
<file>
<!-- This employs that the basedir expression is only recognized by
Maven 3.x (see MNG-2363) -->
<exists>${basedir}</exists>
</file>
</activation>
Now I have a problem...
The profile maven-3 will be activated for 3.1, and I have no currently known way to determine if it is 3.1 or not.
I am looking to get some suggestions from the community as to the best way to compensate for this issue. I don't see any new variables I can test, and I dont see any properties which show the maven version...
Thanks,
Roy Lyons
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven 3.1 profile activation
Posted by Vincent Latombe <vi...@gmail.com>.
Hi,
you don't need to add a new profile. the new plugin is still compatible
with maven 3.0.x (See comment [1])
[1] http://jira.codehaus.org/browse/MSONAR-22
Vincent
2013/8/9 Lyons, Roy <Ro...@cmegroup.com>
>
> So... They released sonar-maven-plugin 2.1... and my corporate pom is
> nice enough to developers to choose the right sonar plugin based on maven
> version...
>
> <profile>
> <id>maven-2</id>
> <activation>
> <file>
> <!-- basedir expression is only
> recognized by Maven 3.x (see MNG-2363) -->
> <missing>${basedir}</missing>
> </file>
> </activation>
> ...
> <profile>
> <id>maven-3</id>
> <activation>
> <file>
> <!-- This employs that the basedir
> expression is only recognized by
> Maven 3.x (see MNG-2363)
> -->
> <exists>${basedir}</exists>
> </file>
> </activation>
>
> Now I have a problem...
>
> The profile maven-3 will be activated for 3.1, and I have no currently
> known way to determine if it is 3.1 or not.
>
>
> I am looking to get some suggestions from the community as to the best way
> to compensate for this issue. I don't see any new variables I can test,
> and I dont see any properties which show the maven version...
>
>
>
>
> Thanks,
>
> Roy Lyons
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>