Skip to content

Commit

Permalink
Re-enable Packaging Tests (helidon-io#4412)
Browse files Browse the repository at this point in the history
* Switch to parsson, native image fixes.
* Re-enabled parts of packaging tests that work.

Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
  • Loading branch information
tomas-langer authored Jul 8, 2022
1 parent ffd0bcb commit 87cadbd
Show file tree
Hide file tree
Showing 58 changed files with 765 additions and 510 deletions.
4 changes: 2 additions & 2 deletions dbclient/jsonp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<artifactId>helidon-dbclient</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions dbclient/mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<artifactId>helidon-dbclient-common</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
Expand Down
31 changes: 8 additions & 23 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<!-- Force upgrade version used by maven-jaxb2-plugin. Needed to support Java 16 -->
<version.lib.jaxb-runtime>3.0.2</version.lib.jaxb-runtime>
<version.lib.jedis>3.6.3</version.lib.jedis>
<version.lib.jersey>3.0.4</version.lib.jersey>
<version.lib.jersey>3.0.5</version.lib.jersey>
<version.lib.jgit>5.11.1.202105131744-r</version.lib.jgit>
<version.lib.jsonp-impl>2.0.1</version.lib.jsonp-impl>
<version.lib.junit>5.7.0</version.lib.junit>
Expand Down Expand Up @@ -140,6 +140,7 @@
<version.lib.opentracing.grpc>0.2.1</version.lib.opentracing.grpc>
<version.lib.opentracing.tracerresolver>0.1.8</version.lib.opentracing.tracerresolver>
<version.lib.perfmark-api>0.23.0</version.lib.perfmark-api>
<version.lib.parsson>1.0.2</version.lib.parsson>
<version.lib.postgresql>42.3.3</version.lib.postgresql>
<version.lib.prometheus>0.9.0</version.lib.prometheus>
<version.lib.slf4j>1.7.32</version.lib.slf4j>
Expand Down Expand Up @@ -356,15 +357,14 @@
<version>${version.lib.jakarta.jms-api}</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>${version.lib.jsonp-impl}</version>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<version>${version.lib.parsson}</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<classifier>module</classifier>
<version>${version.lib.jsonp-impl}</version>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson-media</artifactId>
<version>${version.lib.parsson}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
Expand Down Expand Up @@ -395,13 +395,6 @@
<groupId>org.eclipse</groupId>
<artifactId>yasson</artifactId>
<version>${version.lib.yasson}</version>
<exclusions>
<exclusion>
<!-- we must only have implementation on classpath, not API - module conflict -->
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Config related -->
Expand Down Expand Up @@ -1029,10 +1022,6 @@
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>jakarta.inject</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
Expand Down Expand Up @@ -1081,10 +1070,6 @@
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>jakarta.inject</artifactId>
Expand Down
20 changes: 10 additions & 10 deletions etc/scripts/test-packaging-jar.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -ex
#
# Copyright (c) 2021 Oracle and/or its affiliates.
# Copyright (c) 2021, 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,13 +51,13 @@ java -Dexit.on.started=! -jar target/helidon-tests-native-image-se-1.jar
#
# Run MP-1
#
# TODO 3.0.0-JAKARTA - rest client fails during startup
# cd ${WS_DIR}/tests/integration/native-image/mp-1
cd ${WS_DIR}/tests/integration/native-image/mp-1
# Classpath
# java -jar target/helidon-tests-native-image-mp-1.jar
java -jar target/helidon-tests-native-image-mp-1.jar

# Module Path
#java --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \
# --module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main
java --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \
--module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main

#
# Run MP-3 (just start and stop)
Expand All @@ -67,7 +67,7 @@ cd ${WS_DIR}/tests/integration/native-image/mp-3
java -Dexit.on.started=! -jar target/helidon-tests-native-image-mp-3.jar

# Module Path
# java -Dexit.on.started=! \
# --module-path target/helidon-tests-native-image-mp-3.jar:target/libs \
# --add-modules helidon.tests.nimage.quickstartmp \
# --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main
java -Dexit.on.started=! \
--module-path target/helidon-tests-native-image-mp-3.jar:target/libs \
--add-modules helidon.tests.nimage.quickstartmp \
--module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main
35 changes: 15 additions & 20 deletions etc/scripts/test-packaging-jlink.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -ex
#
# Copyright (c) 2021 Oracle and/or its affiliates.
# Copyright (c) 2021, 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,38 +50,33 @@ done
# Run tests with classpath and then module path

# Run SE-1 (does not contain module-info.java)
# TODO 3.0.0-JAKARTA - starts and does not stop
# cd ${WS_DIR}/tests/integration/native-image/se-1
# jri_dir=${WS_DIR}/tests/integration/native-image/se-1/target/helidon-tests-native-image-se-1-jri
cd ${WS_DIR}/tests/integration/native-image/se-1
jri_dir=${WS_DIR}/tests/integration/native-image/se-1/target/helidon-tests-native-image-se-1-jri

# Classpath

# ${jri_dir}/bin/start --test
${jri_dir}/bin/start --test

# Run MP-1
# TODO 3.0.0-JAKARTA - rest client fails during startup
# cd ${WS_DIR}/tests/integration/native-image/mp-1
# jri_dir=${WS_DIR}/tests/integration/native-image/mp-1/target/helidon-tests-native-image-mp-1-jri
cd ${WS_DIR}/tests/integration/native-image/mp-1
jri_dir=${WS_DIR}/tests/integration/native-image/mp-1/target/helidon-tests-native-image-mp-1-jri

# Classpath
# ${jri_dir}/bin/start
${jri_dir}/bin/start

# Module Path
# TODO 3.0.0-JAKARTA - rest client fails during startup
# ${jri_dir}/bin/java \
# --module-path ${jri_dir}/app/helidon-tests-native-image-mp-1.jar:${jri_dir}/app/libs \
# --module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main
${jri_dir}/bin/java \
--module-path ${jri_dir}/app/helidon-tests-native-image-mp-1.jar:${jri_dir}/app/libs \
--module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main

# Run MP-3 (just start and stop)
cd ${WS_DIR}/tests/integration/native-image/mp-3
jri_dir=${WS_DIR}/tests/integration/native-image/mp-3/target/helidon-tests-native-image-mp-3-jri

# Classpath
# TODO 3.0.0-JAKARTA - java.lang.ClassNotFoundException: org.glassfish.json.jaxrs.JsonValueBodyReader
# ${jri_dir}/bin/start --test
${jri_dir}/bin/start --test

# Module Path
#${jri_dir}/bin/java -Dexit.on.started=! \
# --module-path ${jri_dir}/app/helidon-tests-native-image-mp-3.jar:${jri_dir}/app/libs \
# --add-modules helidon.tests.nimage.quickstartmp \
# --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main
${jri_dir}/bin/java -Dexit.on.started=! \
--module-path ${jri_dir}/app/helidon-tests-native-image-mp-3.jar:${jri_dir}/app/libs \
--add-modules helidon.tests.nimage.quickstartmp \
--module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main
8 changes: 3 additions & 5 deletions etc/scripts/test-packaging-native.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -ex
#
# Copyright (c) 2021 Oracle and/or its affiliates.
# Copyright (c) 2021, 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,7 @@ mvn ${MAVEN_ARGS} -e clean install

# Build native images
# mp-2 is too big, waiting for more memory
# TODO 3.0.0-JAKARTA - rest client fails during startup, mp-2 fails build
# Only SE is tested as part of the pipeline for now
# readonly native_image_tests="se-1 mp-1 mp-3"
readonly native_image_tests="se-1"
for native_test in ${native_image_tests}; do
Expand All @@ -63,7 +63,5 @@ done

# Run this one because it has no pre-reqs and self-tests
# Uses relative path to read configuration
# TODO 3.0.0-JAKARTA - rest client fails during startup
# readonly native_image_tests="se-1 mp-1 mp-3"
# cd ${WS_DIR}/tests/integration/native-image/mp-1
# ${WS_DIR}/tests/integration/native-image/mp-1/target/helidon-tests-native-image-mp-1
# ${WS_DIR}/tests/integration/native-image/mp-1/target/helidon-tests-native-image-mp-1 || true
4 changes: 2 additions & 2 deletions examples/config/metadata/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

<dependencies>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
Expand Down
4 changes: 2 additions & 2 deletions examples/media/multipart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
<artifactId>helidon-media-jsonp</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
4 changes: 2 additions & 2 deletions grpc/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions grpc/metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions grpc/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions integrations/graal/mp-native-image-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<artifactId>helidon-graal-native-image-extension</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions integrations/graal/native-image-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<artifactId>helidon-config-mp</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
<dependency>
<groupId>io.github.classgraph</groupId>
Expand Down
2 changes: 2 additions & 0 deletions jersey/client/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
requires jakarta.annotation;
requires io.helidon.common.context;

exports io.helidon.jersey.client;

provides org.glassfish.jersey.client.spi.ClientBuilderListener
with io.helidon.jersey.client.ClientBuilderListener;
}
3 changes: 2 additions & 1 deletion jersey/jsonp/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2021 Oracle and/or its affiliates.
* Copyright (c) 2018, 2022 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,4 +19,5 @@
*/
module io.helidon.jersey.media.jsonp {
requires transitive jersey.media.json.processing;
requires org.eclipse.parsson.media;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

Args=--initialize-at-build-time=org.eclipse.parsson
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"name": "org.eclipse.parsson.JsonProviderImpl",
"allPublicConstructors": true,
"allPublicMethods": true
}
]
4 changes: 2 additions & 2 deletions lra/coordinator/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
<artifactId>helidon-dbclient-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.integrations.db</groupId>
Expand Down
4 changes: 2 additions & 2 deletions media/jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<artifactId>yasson</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
5 changes: 2 additions & 3 deletions media/jsonp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
<artifactId>jakarta.json-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<classifier>module</classifier>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Loading

0 comments on commit 87cadbd

Please sign in to comment.