[MPLUGIN-267] added Maven 2 specific configuration
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1599392 13f79535-47bb-0310-9956-ffa450edef68master
parent
3bb1fbf154
commit
e0b306c105
|
|
@ -363,5 +363,34 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -122,3 +122,28 @@ Using Plugin Tools Java5 Annotations
|
|||
...
|
||||
</project>
|
||||
+-----+
|
||||
|
||||
<Notice>: this configuration will not work with Maven 2, which does not support execution phase overriding.
|
||||
If you absolutely need to build with Maven 2, you should use <<<skipErrorNoDescriptorsFound>>> parameter
|
||||
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>
|
||||
...
|
||||
+-----+
|
||||
|
|
|
|||
Loading…
Reference in New Issue