forked from stefanbirkner/system-rules
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
34 lines (33 loc) · 1.04 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# openjdk-6-jdk is not available in more recent Ubuntu versions
dist: trusty
language: java
install:
# Download dependencies with JDK 8 because Maven Central supports
# TLS 1.2 only but OpenJDK 6 does not.
- export ORIGINAL_JAVA_HOME=$JAVA_HOME
- jdk_switcher use oraclejdk8
- ./mvnw test -DskipTests
# Delete all files created with JDK 8
- ./mvnw clean
# Build with JDK 6 because we build the artifacts that are published
# to Maven Central with OpenJDK 6, too.
- jdk_switcher use openjdk6
# Run original install command but without GPG signing
- ./mvnw install -DskipTests=true -Dgpg.skip=true
# Restore desired JDK
- export JAVA_HOME=$ORIGINAL_JAVA_HOME
addons:
apt:
packages:
- openjdk-6-jdk
jdk:
- openjdk10
- oraclejdk9
- oraclejdk8
- openjdk7
# The jdk key does not work for openjdk6 in Travis CI any more, so
# we manually install openjdk-6-jdk and set JAVA_HOME appropriately
# (https://github.com/travis-ci/travis-ci/issues/9713)
matrix:
include:
- env: JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64