Skip to content

Commit

Permalink
Change build files and artefacts to java 11 (#978)
Browse files Browse the repository at this point in the history
* change build files to only build for java 11.
  • Loading branch information
melowe authored Jan 22, 2020
1 parent 8dea70b commit 8bd2b60
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 134 deletions.
35 changes: 6 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,25 @@ stages:
jobs:
include:
- stage: test
name: "Unit Tests Java 8"
jdk: oraclejdk8
name: "Unit Tests"
jdk: oraclejdk11
install: &build_no_checks
- mvn install -Dsilent=true -DskipTests=true -Dmaven.javadoc.skip=true -Dchecksyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -B dependency:go-offline
script: &build_with_unittests
- mvn install -pl \!tests/acceptance-test -P reduce-logging -o || travis_terminate 1

- name: "Gradle Build"
jdk: oraclejdk8
jdk: oraclejdk11
script:
- ./gradlew build || travis_terminate 1

- name: "Unit Tests Java 11"
- name: "Acceptance Tests"
jdk: oraclejdk11
install: *build_no_checks
script: *build_with_unittests

- name: "Acceptance Tests Java 8"
jdk: oraclejdk8
install: *build_no_checks
script: mvn verify -pl tests/acceptance-test -P reduce-logging -o || travis_terminate 1

- name: "Acceptance Tests Java 11"
- name: "Vault Acceptance Tests"
jdk: oraclejdk11
# before_install:
# - rm "${JAVA_HOME}/lib/security/cacerts"
# - ln -s /etc/ssl/certs/java/cacerts "${JAVA_HOME}/lib/security/cacerts"
install: *build_no_checks
script: mvn verify -pl tests/acceptance-test -P reduce-logging || travis_terminate 1

- name: "Simple Only Acceptance Tests"
jdk: oraclejdk8
install: *build_no_checks
script: mvn verify -pl tests/acceptance-test -P simple-acceptance-tests,reduce-logging -o || travis_terminate 1

- name: "Vault Acceptance Tests Java 8"
jdk: oraclejdk8
before_install: &install_hashicorp
- wget https://releases.hashicorp.com/vault/1.2.2/vault_1.2.2_linux_amd64.zip -O /tmp/vault_1.2.2_linux_amd64.zip
- mkdir -p vault/bin && pushd $_
Expand All @@ -64,11 +46,6 @@ jobs:
install: *build_no_checks
script: mvn verify -pl tests/acceptance-test -P vault-acceptance-tests,reduce-logging -o || travis_terminate 1

- name: "Vault Acceptance Tests Java 11"
jdk: oraclejdk11
before_install: *install_hashicorp
install: *build_no_checks
script: mvn verify -pl tests/acceptance-test -P vault-acceptance-tests,reduce-logging -o || travis_terminate 1

# - stage: deploy only
# name: "Deploy to OSSRH"
Expand All @@ -80,7 +57,7 @@ jobs:

- stage: tag and deploy
name: "Tag on GitHub and deploy to OSSRH"
jdk: oraclejdk8
jdk: oraclejdk11
script:
- head_ref=$(git rev-parse HEAD) || travis_terminate 1
- branch_ref=$(git rev-parse "$TRAVIS_BRANCH") || travis_terminate 1
Expand Down
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ allprojects {
compile "javax.inject:javax.inject:1"
compile "javax:javaee-api:7.0"

compile "javax.xml.bind:jaxb-api:2.3.0"
compile "org.glassfish.jaxb:jaxb-runtime:2.3.0"
compile "javax.activation:javax.activation-api:1.2.0"
compile "javax.annotation:javax.annotation-api:1.3.2"


}
}
}
Expand All @@ -119,6 +125,7 @@ subprojects {
}

dependencies {

compile 'org.slf4j:slf4j-api'
runtimeOnly 'ch.qos.logback:logback-classic'
runtimeOnly 'ch.qos.logback:logback-core'
Expand Down Expand Up @@ -220,7 +227,7 @@ subprojects {
}
}

sourceCompatibility = '1.8'
sourceCompatibility = '11'

java {
withJavadocJar()
Expand Down
12 changes: 1 addition & 11 deletions enclave/enclave-jaxrs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,6 @@

<name>enclave-jaxrs</name>

<profiles>
<profile>
<id>afterjdk9</id>
<activation>
<jdk>[9,12)</jdk>
</activation>
<properties>
<dist.classfier>jdk${java.vm.specification.version}_server</dist.classfier>
</properties>
</profile>
</profiles>


</project>
111 changes: 42 additions & 69 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<jersey.version>2.27</jersey.version>
<jetty.version>9.4.25.v20191220</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<spring.version>5.1.2.RELEASE</spring.version>
<slf4j.version>1.7.5</slf4j.version>
<eclipselink.version>2.7.3</eclipselink.version>
Expand Down Expand Up @@ -155,19 +155,23 @@

</plugin>

<!-- <plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${owasp.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>-->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>

</pluginManagement>
Expand Down Expand Up @@ -1381,6 +1385,28 @@
<scope>test</scope>
</dependency>


<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>


<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>

</dependencies>

<reporting>
Expand Down Expand Up @@ -1569,66 +1595,13 @@
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

</profile>


<profile>
<id>java11</id>
<activation>
<jdk>[9,12)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>${java.vm.specification.version}</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>

<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>

</profile>

<profile>
<id>release</id>
Expand Down Expand Up @@ -1690,7 +1663,7 @@
<failOnError>false</failOnError>
<linksource>true</linksource>
<show>protected</show>
<source>1.8</source>
<source>11</source>
</configuration>

<executions>
Expand Down
6 changes: 5 additions & 1 deletion shared/build.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@

dependencies {
compile "javax.xml.bind:jaxb-api"
runtimeOnly "org.glassfish.jaxb:jaxb-runtime"
compile "javax.annotation:javax.annotation-api"
}
12 changes: 1 addition & 11 deletions tessera-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,5 @@
</pluginManagement>
</build>

<profiles>
<profile>
<id>afterjdk9</id>
<activation>
<jdk>[9,12)</jdk>
</activation>
<properties>
<dist.classfier>jdk${java.vm.specification.version}_app</dist.classfier>
</properties>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</encoder>
</appender>

<root level="INFO">
<root level="ALL">
<appender-ref ref="FILE"/>
</root>

Expand Down
11 changes: 0 additions & 11 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,6 @@
</modules>
</profile>

<profile>
<id>afterjdk9</id>
<activation>
<jdk>[9,12)</jdk>
</activation>
<properties>
<enclave.server.classifer>jdk${java.vm.specification.version}_server</enclave.server.classifer>
<tesssra.app.classifer>jdk${java.vm.specification.version}_app</tesssra.app.classifer>
</properties>

</profile>
</profiles>


Expand Down

0 comments on commit 8bd2b60

Please sign in to comment.