Skip to content

Commit

Permalink
JBDS-3187 Check BUILD_ALIAS with standard property enforcer rule.
Browse files Browse the repository at this point in the history
Also removed custom rules and custom module - if we get more complex rules one day we can
add it back, but should be external since otherwise the parent pom and the rules will have a cyclic dependency.

Tested by using:
mvn -Dtycho.mode=maven verify -DBUILD_ALIAS=<value>

CR1 (pass)
CR1a (pass)
     (fail - must be specified)
Final (fail - Final is not allowed)

Two cases are allowed in even though properly not proper:
CR (passes, but should fail since it needs a number)
GA1a (passes, but there should not be multiple GA's nor respins)

But this at least catches the most important one - not having Final in the name.
  • Loading branch information
maxandersen committed Oct 19, 2014
1 parent 1b3a581 commit bda5313
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 383 deletions.
32 changes: 16 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<name>JBDS - Product, Installers</name>
<packaging>pom</packaging>
<modules>
<module>rules</module>
<module>plugins</module>
<module>features</module>
<module>site</module>
Expand Down Expand Up @@ -51,23 +50,24 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0-beta-1</version>
<dependencies>
<dependency>
<groupId>com.jboss.devstudio</groupId>
<artifactId>ParentPomVersionCheckRule</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce</id>
<configuration><rules>
<ParentPomVersionCheckRule implementation="com.jboss.devstudio.enforcer.rule.ParentPomVersionCheckRule"><shouldIfail>true</shouldIfail></ParentPomVersionCheckRule>
</rules></configuration>
<goals>
<goal>enforce</goal>
</goals>
<id>enforce-properversion</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>BUILD_ALIAS</property>
<message>BUILD_ALIAS is missing, it must be specificed.</message>
<regex>.*(Alpha|Beta|CR|GA)\d?[a-z]?</regex>
<regexMessage>The BUILD_ALIAS (${BUILD_ALIAS}) is invalid. Must contain either Alpha, Beta, CR or GA + optional postfix.</regexMessage>
</requireProperty>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
73 changes: 0 additions & 73 deletions rules/com.jboss.devstudio.enforcer.rule/pom.xml

This file was deleted.

This file was deleted.

152 changes: 0 additions & 152 deletions rules/com.jboss.devstudio.enforcer.rule/usage-pom.xml

This file was deleted.

0 comments on commit bda5313

Please sign in to comment.