[MNG-5905] Maven build does not work with Maven 2.2.1

Added maven-enforcer rule to check the minimum Maven version
to be built with.
This commit is contained in:
Karl Heinz Marbaise 2015-10-07 17:28:31 +02:00
parent 8a51f9e512
commit bcacea2cfb
1 changed files with 24 additions and 1 deletions

25
pom.xml
View File

@ -42,6 +42,7 @@
<inceptionYear>2001</inceptionYear> <inceptionYear>2001</inceptionYear>
<properties> <properties>
<maven.version>3.0.5</maven.version>
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
<classWorldsVersion>2.5.2</classWorldsVersion> <classWorldsVersion>2.5.2</classWorldsVersion>
@ -142,8 +143,11 @@
</contributor> </contributor>
</contributors> </contributors>
<!-- This marked as deprecated for Maven 3.X. This is checked by maven-enforcer-plugin -->
<!-- http://jira.codehaus.org/browse/MNG-4840 -->
<!-- http://jira.codehaus.org/browse/MNG-5297 -->
<prerequisites> <prerequisites>
<maven>2.2.1</maven> <maven>${maven.version}</maven>
</prerequisites> </prerequisites>
<!--bootstrap-start-comment--> <!--bootstrap-start-comment-->
@ -559,6 +563,25 @@
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>${maven.version}</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>