summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2013-10-06 22:03:30 +0000
committerRobert Gemmell <robbie@apache.org>2013-10-06 22:03:30 +0000
commit50ee93b913e1a34785c363a8494740d3911c37bd (patch)
tree4bb1a0e8d3784073c149f6d426fa6aa39f46c474
parentadc4f3eb9b28d8149320a42c9ba8ea8b8095572c (diff)
downloadqpid-python-50ee93b913e1a34785c363a8494740d3911c37bd.tar.gz
QPID-5048: use enforcer plugin to require Maven 3 and ensure the profile property contains a vallid supported test profile value
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1529703 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/pom.xml34
1 files changed, 32 insertions, 2 deletions
diff --git a/qpid/java/pom.xml b/qpid/java/pom.xml
index 027f8b5b62..99aac4703f 100644
--- a/qpid/java/pom.xml
+++ b/qpid/java/pom.xml
@@ -35,8 +35,6 @@
- Decide on name for this parent module.
- Fix the version numbers in all the modules.
- Remove groupid from all the modules, if possible?
- - Add enforcer check for maven versions.
- - Add enforcer check for test profile property values, if possible?
- Align the XML in the pom files consistently, fix whitepsace errors.
- Complete setting properties for the dependency version numbers.
- Use dependancy management sections to control the version numbers.
@@ -100,6 +98,10 @@
<java.source>1.6</java.source>
<java.target>1.6</java.target>
+ <!-- enforcer plugin config properties -->
+ <supported-maven-version-range>[3.0.0,)</supported-maven-version-range>
+ <supported-test-profiles-regex>(java-mms.0-9-1|java-mms.0-10)</supported-test-profiles-regex>
+
<!-- test properties -->
<qpid.home>${basedir}</qpid.home> <!-- override for broker tests -->
<qpid.home.qbtc.output>${qpid.home}/target/qbtc-output</qpid.home.qbtc.output> <!-- override for broker tests -->
@@ -450,6 +452,34 @@
</systemPropertyVariables>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <!--version specified in pluginManagement -->
+ <executions>
+ <execution>
+ <id>enforce-versions-standard-properties</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>${supported-maven-version-range}</version>
+ </requireMavenVersion>
+ <requireProperty>
+ <property>profile</property>
+ <message>You must set a test profile!</message>
+ <regex>${supported-test-profiles-regex}</regex>
+ <regexMessage>You have set an unsupported test profile! Allowed values match: ${supported-test-profiles-regex}</regexMessage>
+ </requireProperty>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>