From 1deb47a4dbcc4bd17f0e3d885afb268e6a9d12c0 Mon Sep 17 00:00:00 2001 From: Dominic Schabel Date: Mon, 14 May 2018 09:32:12 +0200 Subject: [PATCH] First preparation for JDK 9 (#674) * First preparation to build HawkBit with JDK 9 Signed-off-by: Dominic Schabel * Reverted Mockito 2 update since it is not compiling under JDK 8 anymore * Fix for JDK internal calls by old version * Guava raised to 25.0-jre and CQ added. Signed-off-by: Dominic Schabel * Add updated RabbitMQ http client * Exclude test dependencies. Signed-off-by: kaizimmerm * Exclusions for unnecessary Guava dependencies added Signed-off-by: Dominic Schabel * Remove provided annotation dependency for maven plugin Signed-off-by: Dominic Schabel --- 3rd-dependencies/Release_0_2_0.md | 4 +- 3rd-dependencies/compile.txt | 23 +++--- 3rd-dependencies/listDeps.sh | 13 +++- 3rd-dependencies/test.txt | 61 ++++++++++----- .../hawkbit-repository-jpa/pom.xml | 34 +++++--- hawkbit-rest-core/pom.xml | 2 - .../org/eclipse/hawkbit/util/IpUtilTest.java | 4 - pom.xml | 77 ++++++++++++++++--- 8 files changed, 155 insertions(+), 63 deletions(-) diff --git a/3rd-dependencies/Release_0_2_0.md b/3rd-dependencies/Release_0_2_0.md index 005fafd7f..2f35db7b0 100644 --- a/3rd-dependencies/Release_0_2_0.md +++ b/3rd-dependencies/Release_0_2_0.md @@ -15,10 +15,10 @@ |com.fasterxml|classmate|1.3.3| [CQ10368](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=10368) | |com.github.gwtd3|gwt-d3-api|1.2.0| [CQ13029](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=13029) | |com.github.gwtd3|gwt-d3-js|3.5.11| [CQ13030](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=13030) | -|com.google.guava|guava|19.0| [CQ12931](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=12931) | +|com.google.guava|guava|25.0-jre| [CQ16201](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=16201) | |com.h2database|h2|1.4.186| [CQ10365](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=10365) | |com.rabbitmq|amqp-client|4.0.2| [CQ13041](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=13041) | -|com.rabbitmq|http-client|1.1.1.RELEASE| [CQ13042](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=13042) | +|com.rabbitmq|http-client|1.3.1.RELEASE| [CQ15867](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=15867) | |com.vaadin.external.atmosphere|atmosphere-runtime|2.2.9.vaadin2| [CQ10714](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=10714) | |com.vaadin.external.flute|flute|1.3.0.gg2| [CQ11039](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=11039) | |com.vaadin.external.gwt|gwt-elemental|2.7.0.vaadin4| [CQ13031](https://dev.eclipse.org/ipzilla/show_bug.cgi?id=13031) | diff --git a/3rd-dependencies/compile.txt b/3rd-dependencies/compile.txt index 6be872fef..9fc8a6e06 100644 --- a/3rd-dependencies/compile.txt +++ b/3rd-dependencies/compile.txt @@ -1,6 +1,7 @@ aopalliance:aopalliance:jar:1.0:compile ch.qos.logback:logback-classic:jar:1.1.11:compile ch.qos.logback:logback-core:jar:1.1.11:compile + com.cronutils:cron-utils:jar:5.0.5:compile com.fasterxml.jackson.core:jackson-annotations:jar:2.8.9:compile com.fasterxml.jackson.core:jackson-core:jar:2.8.9:compile com.fasterxml.jackson.core:jackson-databind:jar:2.8.9:compile @@ -9,23 +10,23 @@ com.github.gwtd3:gwt-d3-api:jar:1.2.0:compile com.github.gwtd3:gwt-d3-js:jar:3.5.11:compile com.github.gwtd3:gwt-d3-js:jar:sources:3.5.11:compile - com.google.guava:guava:jar:19.0:compile + com.google.guava:guava:jar:25.0-jre:compile com.h2database:h2:jar:1.4.195:compile com.rabbitmq:amqp-client:jar:4.0.3:compile - com.rabbitmq:http-client:jar:1.1.1.RELEASE:compile + com.rabbitmq:http-client:jar:1.3.1.RELEASE:compile com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.2.9.vaadin2:compile com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile - com.vaadin.external.gwt:gwt-elemental:jar:2.7.0.vaadin5:compile - com.vaadin.external.gwt:gwt-user:jar:2.7.0.vaadin5:compile + com.vaadin.external.gwt:gwt-elemental:jar:2.7.0.vaadin6:compile + com.vaadin.external.gwt:gwt-user:jar:2.7.0.vaadin6:compile com.vaadin.external.slf4j:vaadin-slf4j-jdk14:jar:1.6.1:compile - com.vaadin:vaadin-client:jar:7.7.9:compile - com.vaadin:vaadin-push:jar:7.7.9:compile + com.vaadin:vaadin-client:jar:7.7.13:compile + com.vaadin:vaadin-push:jar:7.7.13:compile com.vaadin:vaadin-sass-compiler:jar:0.9.13:compile - com.vaadin:vaadin-server:jar:7.7.9:compile - com.vaadin:vaadin-shared:jar:7.7.9:compile + com.vaadin:vaadin-server:jar:7.7.13:compile + com.vaadin:vaadin-shared:jar:7.7.13:compile com.vaadin:vaadin-spring-boot:jar:1.1.1:compile com.vaadin:vaadin-spring:jar:1.1.1:compile - com.vaadin:vaadin-themes:jar:7.7.9:compile + com.vaadin:vaadin-themes:jar:7.7.13:compile commons-codec:commons-codec:jar:1.10:compile commons-io:commons-io:jar:2.4:compile cz.jirutka.rsql:rsql-parser:jar:2.1.0:compile @@ -59,8 +60,8 @@ org.slf4j:jul-to-slf4j:jar:1.7.25:compile org.slf4j:log4j-over-slf4j:jar:1.7.25:compile org.slf4j:slf4j-api:jar:1.7.25:compile - org.springframework.amqp:spring-amqp:jar:1.7.4.RELEASE:compile - org.springframework.amqp:spring-rabbit:jar:1.7.4.RELEASE:compile + org.springframework.amqp:spring-amqp:jar:1.7.6.RELEASE:compile + org.springframework.amqp:spring-rabbit:jar:1.7.6.RELEASE:compile org.springframework.boot:spring-boot-actuator:jar:1.4.7.RELEASE:compile org.springframework.boot:spring-boot-autoconfigure:jar:1.4.7.RELEASE:compile org.springframework.boot:spring-boot-starter-actuator:jar:1.4.7.RELEASE:compile diff --git a/3rd-dependencies/listDeps.sh b/3rd-dependencies/listDeps.sh index 7cdb9a855..e988365a0 100755 --- a/3rd-dependencies/listDeps.sh +++ b/3rd-dependencies/listDeps.sh @@ -8,11 +8,20 @@ # http://www.eclipse.org/legal/epl-v10.html # cd .. -mvn dependency:list -DexcludeGroupIds=org.eclipse -Dsort=true -DoutputFile=dependencies.txt + +# Provided and compile (excludes the test modules) +mvn dependency:list -DexcludeGroupIds=org.eclipse -pl !org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test -Dsort=true -DoutputFile=dependencies.txt find . -name dependencies.txt|while read i; do cat $i;done|grep '.*:.*:compile'|sort|uniq > 3rd-dependencies/compile.txt -find . -name dependencies.txt|while read i; do cat $i;done|grep '.*:.*:test'|sort|uniq > 3rd-dependencies/test.txt find . -name dependencies.txt|while read i; do cat $i;done|grep '.*:.*:provided'|sort|uniq > 3rd-dependencies/provided.txt + +# Test dependencies +mvn dependency:list -DexcludeGroupIds=org.eclipse -Dsort=true -DoutputFile=dependencies.txt +find . -name dependencies.txt|while read i; do cat $i;done|grep '.*:.*:test'|sort|uniq > 3rd-dependencies/test.txt + +# Cleanup temp files find . -name dependencies.txt|while read i; do rm $i;done + +# Sort and order content cd 3rd-dependencies/ cat compile.txt provided.txt|cut -d':' -f1-4|while read i; do grep -h $i test.txt;done|sort|uniq|while read x; do sed -i.bak -e s/$x// test.txt ;done sed -i.bak '/^[[:space:]]*$/d' test.txt diff --git a/3rd-dependencies/test.txt b/3rd-dependencies/test.txt index f6a7fe02f..91f5061be 100644 --- a/3rd-dependencies/test.txt +++ b/3rd-dependencies/test.txt @@ -1,29 +1,42 @@ + ant:ant:jar:1.6.5:test asm:asm:jar:3.3.1:test cglib:cglib-nodep:jar:3.1:test - com.google.gwt.gwtmockito:gwtmockito:jar:1.1.6:test - com.google.gwt:gwt-dev:jar:2.7.0:test - com.google.gwt:gwt-user:jar:2.7.0:test + colt:colt:jar:1.2.0:test + com.esotericsoftware:kryo-shaded:jar:3.0.3:test + com.esotericsoftware:minlog:jar:1.3.0:test + com.google.code.gson:gson:jar:2.7:test + com.google.gwt.gwtmockito:gwtmockito:jar:1.1.8:test + com.google.gwt:gwt-dev:jar:2.8.0:test + com.google.gwt:gwt-user:jar:2.8.0:test + com.google.jsinterop:jsinterop-annotations:jar:1.0.1:test + com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.1:test + com.ibm.icu:icu4j:jar:50.1.1:test com.jayway.awaitility:awaitility:jar:1.7.0:test com.jayway.jsonpath:json-path:jar:2.0.0:test - commons-beanutils:commons-beanutils-core:jar:1.8.3:test - commons-logging:commons-logging:jar:1.1.1:test + com.microsoft.sqlserver:mssql-jdbc:jar:6.4.0.jre8:test + commons-collections:commons-collections:jar:3.2.2:test javax.el:javax.el-api:jar:2.2.4:test junit:junit:jar:4.12:test net._01001111:jlorem:jar:1.1:test net.minidev:asm:jar:1.0.2:test net.minidev:json-smart:jar:2.1.1:test + net.sourceforge.cssparser:cssparser:jar:0.9.18:test + net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:test + net.sourceforge.htmlunit:htmlunit:jar:2.21:test + net.sourceforge.htmlunit:neko-htmlunit:jar:2.21:test + org.apache.httpcomponents:httpmime:jar:4.5.3:test org.apache.tika:tika-core:jar:1.7:test - org.aspectj:aspectjrt:jar:1.8.9:test + org.aspectj:aspectjrt:jar:1.8.10:test org.assertj:assertj-core:jar:3.6.2:test - org.atteo:evo-inflector:jar:1.2.1:test org.hamcrest:hamcrest-all:jar:1.3:test org.hamcrest:hamcrest-core:jar:1.3:test org.hamcrest:hamcrest-library:jar:1.3:test org.javassist:javassist:jar:3.20.0-GA:test org.json:json:jar:20141113:test org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:0.9.3:test - org.mariadb.jdbc:mariadb-java-client:jar:1.5.7:test + org.mariadb.jdbc:mariadb-java-client:jar:2.0.2:test org.mockito:mockito-core:jar:1.10.19:test + org.mortbay.jasper:apache-jsp:jar:8.0.33:test org.objenesis:objenesis:jar:2.1:test org.ow2.asm:asm-commons:jar:5.0.3:test org.ow2.asm:asm-tree:jar:5.0.3:test @@ -37,18 +50,24 @@ org.powermock:powermock-module-junit4:jar:1.6.5:test org.powermock:powermock-reflect:jar:1.6.5:test org.skyscreamer:jsonassert:jar:1.3.0:test - org.springframework.boot:spring-boot-starter-test:jar:1.4.5.RELEASE:test - org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.5.RELEASE:test - org.springframework.boot:spring-boot-test:jar:1.4.5.RELEASE:test + org.springframework.amqp:spring-rabbit-junit:jar:1.7.6.RELEASE:test + org.springframework.amqp:spring-rabbit-test:jar:1.7.6.RELEASE:test + org.springframework.boot:spring-boot-starter-test:jar:1.4.7.RELEASE:test + org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.7.RELEASE:test + org.springframework.boot:spring-boot-test:jar:1.4.7.RELEASE:test org.springframework.cloud:spring-cloud-stream-binder-test:jar:1.1.2.RELEASE:test org.springframework.cloud:spring-cloud-stream-test-support:jar:1.1.2.RELEASE:test - org.springframework.data:spring-data-rest-core:jar:2.5.8.RELEASE:test - org.springframework.data:spring-data-rest-webmvc:jar:2.5.8.RELEASE:test - org.springframework.integration:spring-integration-test:jar:4.3.8.RELEASE:test - org.springframework:spring-test:jar:4.3.7.RELEASE:test - ru.yandex.qatools.allure:allure-java-adaptor-api:jar:1.4.22:test - ru.yandex.qatools.allure:allure-java-annotations:jar:1.4.22:test - ru.yandex.qatools.allure:allure-java-aspects:jar:1.4.22:test - ru.yandex.qatools.allure:allure-junit-adaptor:jar:1.4.22:test - ru.yandex.qatools.allure:allure-model:jar:1.4.22:test - ru.yandex.qatools.properties:properties-loader:jar:1.5:test + org.springframework.integration:spring-integration-test:jar:4.3.10.RELEASE:test + org.springframework:spring-test:jar:4.3.9.RELEASE:test + org.yaml:snakeyaml:jar:1.17:test + ru.qatools.commons:properties:jar:2.0.RC5:test + ru.yandex.qatools.allure:allure-java-adaptor-api:jar:1.5.4:test + ru.yandex.qatools.allure:allure-java-annotations:jar:1.5.4:test + ru.yandex.qatools.allure:allure-java-aspects:jar:1.5.4:test + ru.yandex.qatools.allure:allure-junit-adaptor:jar:1.5.4:test + ru.yandex.qatools.allure:allure-model:jar:1.5.4:test + tapestry:tapestry:jar:4.0.2:test + xalan:serializer:jar:2.7.2:test + xalan:xalan:jar:2.7.2:test + xerces:xercesImpl:jar:2.11.0:test + xml-apis:xml-apis:jar:1.4.01:test diff --git a/hawkbit-repository/hawkbit-repository-jpa/pom.xml b/hawkbit-repository/hawkbit-repository-jpa/pom.xml index 80fa78b08..3b64deebf 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/pom.xml +++ b/hawkbit-repository/hawkbit-repository-jpa/pom.xml @@ -19,6 +19,12 @@ hawkbit-repository-jpa hawkBit :: Repository :: JPA Implementation + + 3.20.0-GA + 2.3.0 + 1.3.1 + + com.ethlo.eclipselink.tools @@ -98,14 +104,14 @@ test - org.powermock - powermock-module-junit4 - test - + org.powermock + powermock-module-junit4 + test + - org.powermock - powermock-api-mockito - test + org.powermock + powermock-api-mockito + test @@ -115,7 +121,7 @@ com.ethlo.persistence.tools eclipselink-maven-plugin - 2.6.4.2 + 2.7.0 modelgen @@ -135,6 +141,11 @@ org.eclipse.hawkbit.repository.jpa.model + + javax.xml.bind + jaxb-api + ${jaxb.api.version} + org.eclipse.persistence org.eclipse.persistence.jpa @@ -143,7 +154,12 @@ org.javassist javassist - 3.20.0-GA + ${javassist.version} + + + javax.annotation + javax.annotation-api + ${javax.annotation.version} diff --git a/hawkbit-rest-core/pom.xml b/hawkbit-rest-core/pom.xml index 365c54680..fbfbb9b85 100644 --- a/hawkbit-rest-core/pom.xml +++ b/hawkbit-rest-core/pom.xml @@ -26,7 +26,6 @@ hawkbit-core ${project.version} - com.google.guava guava @@ -35,7 +34,6 @@ org.apache.commons commons-lang3 - org.springframework spring-web diff --git a/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/util/IpUtilTest.java b/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/util/IpUtilTest.java index b6f2b8c0c..f8c621dba 100644 --- a/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/util/IpUtilTest.java +++ b/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/util/IpUtilTest.java @@ -54,7 +54,6 @@ public class IpUtilTest { public void getRemoteAddrFromRequestIfForwaredHeaderNotPresent() { final URI knownRemoteClientIP = IpUtil.createHttpUri("127.0.0.1"); - when(requestMock.getHeader(X_FORWARDED_FOR)).thenReturn(null); when(requestMock.getRemoteAddr()).thenReturn(knownRemoteClientIP.getHost()); final URI remoteAddr = IpUtil.getClientIpFromRequest(requestMock, KNOWN_REQUEST_HEADER); @@ -71,8 +70,6 @@ public class IpUtilTest { public void maskRemoteAddrIfDisabled() { final URI knownRemoteClientIP = IpUtil.createHttpUri("***"); - when(requestMock.getHeader(X_FORWARDED_FOR)).thenReturn(null); - when(requestMock.getRemoteAddr()).thenReturn(knownRemoteClientIP.getHost()); when(securityPropertyMock.getClients()).thenReturn(clientMock); when(clientMock.getRemoteIpHeader()).thenReturn(KNOWN_REQUEST_HEADER); when(clientMock.isTrackRemoteIp()).thenReturn(false); @@ -91,7 +88,6 @@ public class IpUtilTest { final URI knownRemoteClientIP = IpUtil.createHttpUri("10.99.99.1"); when(requestMock.getHeader(X_FORWARDED_FOR)).thenReturn(knownRemoteClientIP.getHost()); - when(requestMock.getRemoteAddr()).thenReturn(null); final URI remoteAddr = IpUtil.getClientIpFromRequest(requestMock, "X-Forwarded-For"); diff --git a/pom.xml b/pom.xml index 2deda849b..a20ce5df8 100644 --- a/pom.xml +++ b/pom.xml @@ -155,6 +155,8 @@ 3.1.0 2.17 1.9.4 + + 3.7.0 5.0.5 @@ -162,10 +164,10 @@ 2.0.1.Final 1.5.4 2.7.1 - 1.6.5 - 1.1.6 + 1.1.8 + 1.6.5 1.0.2 - 19.0 + 25.0-jre 2.0.2 6.4.0.jre8 1.50.5 @@ -201,7 +203,7 @@ - + 1 @@ -447,6 +449,30 @@ + + java-9 + + 9 + + + + + + maven-compiler-plugin + ${maven.compiler.plugin.version} + + + maven-surefire-plugin + + + --illegal-access=warn --add-modules=java.xml.bind + + + + + + + nexus_staging @@ -768,22 +794,22 @@ ${pl.pragmatists.version} test + + com.google.gwt.gwtmockito + gwtmockito + ${gwtmockito.version} + test + org.powermock powermock-module-junit4 - ${org.powermock.version} + ${powermock.version} test org.powermock powermock-api-mockito - ${org.powermock.version} - test - - - com.google.gwt.gwtmockito - gwtmockito - ${gwtmockito.version} + ${powermock.version} test @@ -812,6 +838,33 @@ com.google.guava guava ${guava.version} + + + + com.google.j2objc + j2objc-annotations + + + com.google.code.findbugs + jsr305 + + + org.checkerframework + checker-compat-qual + + + com.google.errorprone + error_prone_annotations + + + com.google.j2objc + j2objc-annotations + + + org.codehaus.mojo + animal-sniffer-annotations + + com.jayway.awaitility