Skip to content

Commit

Permalink
Add maven-enforcer-plugin
Browse files Browse the repository at this point in the history
Used to enfoce the minimum Maven version 3.0.4 to keep the compability
with plugins.

The CI builds have been adapted to match the new enforcer rules.

GH-17
  • Loading branch information
arcticicestudio committed Jul 25, 2017
1 parent 5c93489 commit 13e1fe0
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# [References]
# Travis CI Documentation
# (https://docs.travis-ci.com)
# Travis CI
# https://docs.travis-ci.com
language: java
dist: trusty
sudo: false
jdk:
- openjdk8
- oraclejdk8
sudo: false
cache:
directories:
- $HOME/.m2
notifications:
email:
on_success: never
on_failure: change
before_script: mvn --version
script: mvn -B clean verify -P code-coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
script: mvn -B clean verify -P code-coverage
6 changes: 5 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# [References]
# Circle CI
# (https://circleci.com/docs)
# https://circleci.com/docs
machine:
java:
version: oraclejdk8
Expand All @@ -18,6 +18,10 @@ general:
artifacts:
- ./target/*.jar

dependencies:
post:
- mvn --version

test:
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
Expand Down
25 changes: 25 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<assembly.descriptor.bin>${basedir}/src/main/assets/assembly-bin.xml</assembly.descriptor.bin>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.version.min>3.0.4</maven.version.min>

<checkstyle.version>8.0</checkstyle.version>
<junit.version>4.12</junit.version>
Expand Down Expand Up @@ -223,6 +224,30 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>(${maven.version.min},)</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${java.version}</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 13e1fe0

Please sign in to comment.