@@ -63,6 +63,7 @@ under the License.
6363 <mavenVersion >2.2.1</mavenVersion >
6464 <maven .test.jvmargs>-Xmx1024m</maven .test.jvmargs>
6565 <surefire .version>2.18.1</surefire .version>
66+ <mavenPluginToolsVersion >3.4</mavenPluginToolsVersion >
6667 </properties >
6768
6869 <dependencies >
@@ -240,6 +241,23 @@ under the License.
240241 <build >
241242 <pluginManagement >
242243 <plugins >
244+ <plugin >
245+ <groupId >org.apache.maven.plugins</groupId >
246+ <artifactId >maven-plugin-plugin</artifactId >
247+ <version >${mavenPluginToolsVersion} </version >
248+ <executions >
249+ <execution >
250+ <id >default-descriptor</id >
251+ <phase >process-classes</phase >
252+ </execution >
253+ <execution >
254+ <id >generated-helpmojo</id >
255+ <goals >
256+ <goal >helpmojo</goal >
257+ </goals >
258+ </execution >
259+ </executions >
260+ </plugin >
243261 <plugin >
244262 <groupId >org.apache.maven.plugins</groupId >
245263 <artifactId >maven-resources-plugin</artifactId >
@@ -289,7 +307,6 @@ under the License.
289307 <plugin >
290308 <groupId >org.apache.maven.plugins</groupId >
291309 <artifactId >maven-plugin-plugin</artifactId >
292- <version >3.4</version >
293310 </plugin >
294311 <plugin >
295312 <artifactId >maven-enforcer-plugin</artifactId >
@@ -452,27 +469,47 @@ under the License.
452469 </execution >
453470 </executions >
454471 </plugin >
472+ </plugins >
473+ </build >
474+ </profile >
475+ <profile >
476+ <id >maven-2</id >
477+ <activation >
478+ <file >
479+ <!-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
480+ <missing >${basedir} </missing >
481+ </file >
482+ </activation >
483+ <build >
484+ <plugins >
455485 <plugin >
486+ <groupId >org.apache.maven.plugins</groupId >
456487 <artifactId >maven-plugin-plugin</artifactId >
488+ <configuration >
489+ <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
490+ <skipErrorNoDescriptorsFound >true</skipErrorNoDescriptorsFound >
491+ </configuration >
457492 <executions >
458- <!-- FIXME: Disable execution, makes IT preparation using maven-plugin-testing-tools fail (see target/test-build-logs/setup.build.log) -->
459493 <execution >
460- <id >generated-helpmojo</id >
461- <configuration >
462- <extractors >
463- <extractor />
464- </extractors >
465- </configuration >
494+ <id >mojo-descriptor</id >
495+ <goals ><!-- Maven 2 does not support phase overriding: need to add an execution -->
496+ <goal >descriptor</goal >
497+ </goals >
466498 </execution >
467499 </executions >
468500 </plugin >
469501 </plugins >
470502 </build >
471- </profile >
503+ </profile >
472504 </profiles >
473505
474506 <reporting >
475507 <plugins >
508+ <plugin >
509+ <groupId >org.apache.maven.plugins</groupId >
510+ <artifactId >maven-plugin-plugin</artifactId >
511+ <version >${mavenPluginToolsVersion} </version >
512+ </plugin >
476513 <plugin >
477514 <groupId >org.apache.maven.plugins</groupId >
478515 <artifactId >maven-surefire-report-plugin</artifactId >
0 commit comments