eclipse / microprofile-conference

Microprofile.io Demo Code - Web Services Conference Application
http://microprofile.io/
Apache License 2.0
116 stars 116 forks source link

Add maven enforcer rule to enforce a minimal mvn version #91

Open SvetlinZarev opened 8 years ago

SvetlinZarev commented 8 years ago

The build of microprofile-conference fails with unhelpful dependency resolution errors with mvn < 3.2.5 (#88). To mitigate the issue a maven enforcer rule can be added, which should enforce maven version >= 3.2.5. Example rule:


          <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                  <execution>
                    <id>enforce-maven</id>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                    <configuration>
                      <rules>
                        <requireMavenVersion>
                          <version>[3.2.5,)</version>
                        </requireMavenVersion>
                      </rules>    
                    </configuration>
                  </execution>
                </executions>
         </plugin>

https://maven.apache.org/components/enforcer/enforcer-rules/requireMavenVersion.html

AndyGee commented 7 years ago

No need for the enforcer plugin. Will just add:

<prerequisites>
    <maven>3.2.5</maven>
  </prerequisites>