[MPLUGIN-267] added Maven 2 specific configuration inside a profile

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1601007 13f79535-47bb-0310-9956-ffa450edef68
master
Herve Boutemy 2014-06-06 20:48:48 +00:00
parent e0b306c105
commit 2aa4a2c9cd
1 changed files with 34 additions and 18 deletions

View File

@ -128,22 +128,38 @@ Using Plugin Tools Java5 Annotations
to avoid failure on default execution phase and add another execution:
+-----+
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${project.version}</version>
<configuration>
<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
...
<project>
...
<profiles>
<profile>
<id>maven-2</id>
<activation>
<file>
<!-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
<missing>${basedir}</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<configuration>
<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
+-----+