Skip to content

Commit 37e0b49

Browse files
committed
fix Travis-CI config for JDK 6
1 parent c19f752 commit 37e0b49

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.sbtrepos

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[repositories]
2+
local
3+
local-preloaded-ivy: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
4+
local-preloaded: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}
5+
maven-central: http://repo1.maven.org/maven2/
6+
sonatype-public: http://oss.sonatype.org/content/repositories/public
7+
typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
8+
sbt-ivy-releases: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly

.travis.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# opt-in to Travis's newer/faster container-based infrastructure
2-
sudo: false
3-
41
language: scala
52

3+
# Needed for openjdk6
4+
dist: precise
5+
sudo: required
66
addons:
7-
apt:
8-
packages:
9-
- openjdk-6-jdk
7+
hosts:
8+
- localhost
9+
hostname: localhost.local
1010

1111
jdk:
1212
- openjdk6
@@ -19,7 +19,12 @@ cache:
1919
- $HOME/.sbt/launchers
2020

2121
script:
22-
- sbt test
22+
# work around https://github.com/travis-ci/travis-ci/issues/9713
23+
- if [[ $JAVA_HOME = *java-6* ]]; then jdk_switcher use openjdk6; fi
24+
- java -version
25+
# also, Maven Central and Bintray are unreachable over HTTPS
26+
- if [[ $JAVA_HOME = *java-6* ]]; then SBTOPTS="-Dsbt.override.build.repos=true -Dsbt.repository.config=./.sbtrepos"; fi
27+
- sbt $SBTOPTS test
2328

2429
before_cache:
2530
- find $HOME/.sbt -name "*.lock" | xargs rm

0 commit comments

Comments
 (0)