[MTOOLCHAINS-13] update custom toolchain IT to build with Maven 2
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1641194 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/it/setup-custom-toolchain/invoker.properties b/src/it/setup-custom-toolchain/invoker.properties
index b7eb9da..97189ec 100644
--- a/src/it/setup-custom-toolchain/invoker.properties
+++ b/src/it/setup-custom-toolchain/invoker.properties
@@ -16,4 +16,3 @@
# under the License.
invoker.goals = install
-invoker.maven.version = 3.0+
diff --git a/src/it/setup-custom-toolchain/pom.xml b/src/it/setup-custom-toolchain/pom.xml
index c8474cb..90ecadf 100644
--- a/src/it/setup-custom-toolchain/pom.xml
+++ b/src/it/setup-custom-toolchain/pom.xml
@@ -116,4 +116,36 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>maven-2</id><!-- only necessary to build with Maven 2 -->
+ <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><!-- Maven 2 does not support phase overriding: need to add an execution -->
+ <goal>descriptor</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/src/it/use-custom-toolchain/invoker.properties b/src/it/use-custom-toolchain/invoker.properties
index 7ef17e4..2c7f33a 100644
--- a/src/it/use-custom-toolchain/invoker.properties
+++ b/src/it/use-custom-toolchain/invoker.properties
@@ -16,4 +16,5 @@
# under the License.
invoker.goals = --toolchains ../../../src/it/toolchains.xml compile
+# cannot run this IT with Maven 2 since required --toolchains option was added in 3.0-alpha-3: see MNG-3714
invoker.maven.version = 3.0+