scala / scala-jenkins-infra

A Chef cookbook that manages Scala's CI infrastructure.
https://scala-ci.typesafe.com
Apache License 2.0
14 stars 17 forks source link

mvn (used by checkAvailability) might need to be pinned to Java 7+ #200

Closed retronym closed 6 years ago

retronym commented 7 years ago

While looking at the trace of the 2.11 build, I noticed:

++ checkAvailability org.scala-lang scala-library 2.11.9-5362776-SNAPSHOT https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/
++ pushd /tmp/pr-scala.UROx/tmp
/tmp/pr-scala.UROx/tmp ~/workspace/scala-2.11.x-validate-publish-core
++ rm -rf '*'
++ cat
++ '[' -n https://scala-ci.typesafe.com/artifactory/scala-pr-validation-snapshots/ ']'
++ cat
++ cat
++ set +e
++ mvn compile
++ RES=1
++ grep -i downloading /tmp/pr-scala.UROx/tmp/mvn.log
++ grep -i exception /tmp/pr-scala.UROx/tmp/mvn.log
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
++ grep -i error /tmp/pr-scala.UROx/tmp/mvn.log
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
++ set -e
++ '[' 1 == 0 ']'
++ debug 'org.scala-lang:scala-library:jar:2.11.9-5362776-SNAPSHOT not found !'
++ echo '----- org.scala-lang:scala-library:jar:2.11.9-5362776-SNAPSHOT not found !'

Seems like we're using a version of Maven that requires Java 7. AFAIK, this means we don't get to shortcut publishCore on subsequent rebuilds, which that big a deal.

See http://stackoverflow.com/a/37862431/160378 which suggests use do ~/.mavenrc to set JAVA_HOME=... just for Maven.

SethTisue commented 6 years ago

superseded by https://github.com/scala/scala-dev/issues/507