|  | 
| 4 | 4 | 
 | 
| 5 | 5 | # Invoked from .travis.yml to verify the build. | 
| 6 | 6 | 
 | 
| 7 |  | -export COMMON_FLAGS="-Dgpg.skip=true -B -V" | 
|  | 7 | +# Pass -Dgpg.skip to suppress signing instead of trying to provision | 
|  | 8 | +# Travis's containers with keys. | 
|  | 9 | +COMMON_FLAGS="-Dgpg.skip=true -B -V" | 
| 8 | 10 | 
 | 
|  | 11 | +IS_LEGACY="" | 
| 9 | 12 | if echo $TRAVIS_JDK_VERSION | egrep -q 'jdk[67]'; then | 
| 10 |  | - # The main library only uses jdk6 incompatible dependencies, | 
| 11 |  | - # and older versions of javadoc barf on -Xdoclint flags used | 
|  | 13 | + IS_LEGACY=1 | 
|  | 14 | + # The main library only uses jdk6 compatible dependencies, | 
|  | 15 | + # but Guava 21.0 is compatibility with jdk 7. | 
|  | 16 | + COMMON_FLAGS="$COMMON_FLAGS -Dguava.version=20.0" | 
|  | 17 | + | 
|  | 18 | + # Older versions of javadoc barf on -Xdoclint flags used | 
| 12 | 19 |  # to configure the maven-javadoc-plugin. | 
| 13 |  | - exec mvn verify -Dguava.version=20.0 -Dmaven.javadoc.skip=true $COMMON_FLAGS | 
|  | 20 | + COMMON_FLAGS="$COMMON_FLAGS -Dmaven.javadoc.skip=true" | 
|  | 21 | +fi | 
|  | 22 | + | 
|  | 23 | + | 
|  | 24 | +mvn install -DskipTests=true $COMMON_FLAGS | 
|  | 25 | + | 
|  | 26 | + | 
|  | 27 | +if [ -n "$IS_LEGACY" ]; then | 
|  | 28 | + # Don't bother building ancillary JARs and reports. | 
|  | 29 | + exec mvn verify -Dmaven.javadoc.skip=true $COMMON_FLAGS | 
| 14 | 30 | else | 
| 15 | 31 |  # Build the whole kit-n-kaboodle. | 
| 16 | 32 |  mvn -f aggregate/pom.xml source:jar javadoc:jar verify $COMMON_FLAGS \ | 
| 17 | 33 |  && mvn -Dguava.version=27.1-jre -f aggregate/pom.xml clean source:jar javadoc:jar verify $COMMON_FLAGS \ | 
| 18 | 34 |  && mvn jacoco:report coveralls:report \ | 
| 19 |  | - && mvn org.sonatype.ossindex.maven:ossindex-maven-plugin:audit -f aggregate | 
|  | 35 | + && mvn org.sonatype.ossindex.maven:ossindex-maven-plugin:audit $COMMON_FLAGS | 
| 20 | 36 | fi | 
0 commit comments