Skip to content

Commit

Permalink
Travis Java9 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettwooldridge committed Apr 18, 2017
1 parent 25fde9c commit bf4bf88
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
31 changes: 27 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
language: java
sudo: false
language: java

before_script:
- if [[ "x$JDK" == *'x9'* ]]; then remove_dir_from_path $JAVA_HOME/bin; export JAVA_HOME=/usr/lib/jvm/java-9-oracle; export PATH=$JAVA_HOME/bin:$PATH; java -Xmx32m -version; fi

script:
- export JDK8_HOME=$(jdk_switcher home oraclejdk8)
- export JDK9_HOME=/usr/lib/jvm/java-9-oracle
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8)

before_cache:
# No sense in caching current build artifacts
- rm -rf $HOME/.m2/repository/com/zaxxer

cache:
directories:
- $HOME/.m2/repository
jdk:
- oraclejdk8

matrix:
fast_finish: true
include:
- jdk: oraclejdk8
- jdk: oraclejdk8 # this will be overridden by before_script above
addons:
apt:
packages:
- oracle-java9-installer
env:
- JDK=9

install: /bin/true

script:
- mvn install -Dskip.unit.tests=true -Dmaven.javadoc.skip=true -V -B
- mvn test coveralls:report -V -P coverage
- mvn test coveralls:report -V -P coverage
22 changes: 17 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sureFireOptions9></sureFireOptions9>

<felix.bundle.plugin.version>3.3.0</felix.bundle.plugin.version>
<felix.version>5.6.2</felix.version>
Expand Down Expand Up @@ -368,11 +369,7 @@
<version>2.19.1</version>
<configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine}
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.security=ALL-UNNAMED
--add-exports java.base/sun.net.www.protocol.http=ALL-UNNAMED
--add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED</argLine>
<argLine>${surefireArgLine} ${sureFireOptions9}</argLine>
<!-- Skips unit tests if the value of skip.unit.tests property is true -->
<skipTests>${skip.unit.tests}</skipTests>
<reuseForks>true</reuseForks>
Expand Down Expand Up @@ -423,6 +420,21 @@
</build>

<profiles>
<profile>
<id>Java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<sureFireOptions9>
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.security=ALL-UNNAMED
--add-exports java.base/sun.net.www.protocol.http=ALL-UNNAMED
--add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
</sureFireOptions9>
</properties>
</profile>

<profile>
<id>coverage</id>
<build>
Expand Down

0 comments on commit bf4bf88

Please sign in to comment.