Skip to content

Commit

Permalink
Merge pull request #33 from B3Partners/travis-ci
Browse files Browse the repository at this point in the history
[travis-ci] openjdk 11 ook testen met nieuwe Maven versie
  • Loading branch information
mprins authored Sep 13, 2019
2 parents f14211e + f2e8acd commit e4e6f24
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 13 deletions.
29 changes: 19 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
dist: trusty
language: java

env:
global:
- MVN_VERSION="3.6.2"

jdk:
- oraclejdk8
- openjdk8
- openjdk11

matrix:
fast_finish: true
allow_failures:
- jdk: openjdk11

cache:
directories:
- $HOME/.m2
- $HOME/downloads

before_install:
# installeer een up-2-date Maven versie
- wget https://www.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
- unzip -qq apache-maven-3.6.0-bin.zip
- export M2_HOME=$PWD/apache-maven-3.6.0
- wget --directory-prefix=$HOME/downloads/ --no-clobber https://www-eu.apache.org/dist/maven/maven-3/$MVN_VERSION/binaries/apache-maven-$MVN_VERSION-bin.zip
- unzip -qq $HOME/downloads/apache-maven-$MVN_VERSION-bin.zip
- export M2_HOME=$PWD/apache-maven-$MVN_VERSION
- export PATH=$M2_HOME/bin:$PATH
- mvn -v
- mvn -v --global-toolchains .travis/toolchains.xml

install:
- mvn -e compile
- mvn -e compile --global-toolchains .travis/toolchains.xml -fae

script:
- mvn -e verify
- mvn -e verify -B --global-toolchains .travis/toolchains.xml

after_success:
# test of de javadoc compliant is met java-8 strict checks
- if [ "$TRAVIS_JDK_VERSION" == oraclejdk8 ]; then
- if [ "$TRAVIS_JDK_VERSION" == openjdk8 ]; then
travis_wait 30 mvn javadoc:javadoc;
travis_wait 30 mvn javadoc:test-javadoc;
fi

after_script:
# deploy maven site van master branch als test succes
- if [ "$TRAVIS_JDK_VERSION" == oraclejdk8 ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_TEST_RESULT" == 0 ]; then
- if [ "$TRAVIS_JDK_VERSION" == openjdk8 ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_TEST_RESULT" == 0 ]; then
travis_wait 50 mvn -B -e -T1 site site:stage
fi
23 changes: 23 additions & 0 deletions .travis/toolchains.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF8"?>
<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
</provides>
<configuration>
<jdkHome>/usr/local/lib/jvm/openjdk11</jdkHome>
</configuration>
</toolchain>
<toolchain>
<type>jdk</type>
<provides>
<version>1.8</version>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/java-8-openjdk-amd64</jdkHome>
</configuration>
</toolchain>
</toolchains>
30 changes: 27 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
<description>JAX-WS classes voor benaderen van de Generieke Download Service 2 van het Kadaster.</description>
<name>Kadaster-GDS2</name>
<properties>
<project.build.sourceVersion>1.8</project.build.sourceVersion>
<project.build.targetVersion>1.8</project.build.targetVersion>
<java.version>1.8</java.version>
<project.build.sourceVersion>${java.version}</project.build.sourceVersion>
<project.build.targetVersion>${java.version}</project.build.targetVersion>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<netbeans.hint.jdkPlatform>JDK_${project.build.targetVersion}</netbeans.hint.jdkPlatform>
<netbeans.hint.jdkPlatform>JDK_${java.version}</netbeans.hint.jdkPlatform>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<junit.jupiter.version>5.3.1</junit.jupiter.version>
<jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
Expand Down Expand Up @@ -155,6 +158,10 @@
<format>ALL</format>
</configuration>
</plugin>
<plugin>
<artifactId>maven-toolchains-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand All @@ -179,6 +186,23 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-toolchains-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>${java.version}</version>
</jdk>
</toolchains>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand Down

0 comments on commit e4e6f24

Please sign in to comment.