Skip to content

Integrate TCK test execution in jsonb/core modules #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 116 additions & 25 deletions johnzon-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,42 @@
<staging.directory>${project.parent.reporting.outputDirectory}</staging.directory>
</properties>


<dependencies>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests</artifactId>
<version>2.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests-pluggability</artifactId>
<version>2.1.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.netbeans.tools</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>1.7</version>
<scope>test</scope>

<exclusions>
<exclusion>
<groupId>org.netbeans.tools</groupId>
<artifactId>ct-sym</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -46,31 +82,86 @@
</instructions>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>

<executions>
<execution>
<id>copy</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>

<configuration>
<artifactItems>
<artifactItem>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta-jsonp-api.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/signaturedirectory</outputDirectory>
<destFileName>jakarta.json-api.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.plugin.version}</version>

<executions>
<execution>
<id>tck-test</id>

<goals>
<goal>test</goal>
</goals>

<configuration>
<dependenciesToScan>jakarta.json:jakarta.json-tck-tests</dependenciesToScan>

<!-- don't run johnzon tests multiple times, handled in default-test already -->
<excludes>
<exclude>**/org/apache/johnzon/**</exclude>
</excludes>

<systemPropertyVariables>
<jimage.dir>${project.build.directory}/jimage</jimage.dir>
<signature.sigTestClasspath>${project.build.directory}/signaturedirectory/jakarta.json-api.jar:${project.build.directory}/jimage/java.base:${project.build.directory}/jimage/java.rmi:${project.build.directory}/jimage/java.sql:${project.build.directory}/jimage/java.naming</signature.sigTestClasspath>
</systemPropertyVariables>
</configuration>
</execution>

<execution>
<id>tck-test-pluggability</id>

<goals>
<goal>test</goal>
</goals>

<configuration>
<dependenciesToScan>jakarta.json:jakarta.json-tck-tests-pluggability</dependenciesToScan>

<!-- don't run johnzon tests multiple times, handled in default-test already -->
<excludes>
<exclude>**/org/apache/johnzon/**</exclude>
</excludes>

<!-- pluggability tests come with their own JsonProvider implementation,
so we have to hide the johnzon one for these to run -->
<classesDirectory>${project.build.outputDirectory}/nowhere</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<!-- avoid warnings at build time + this is not sufficient to run anyway (edit ts.jte)
<profiles>
<profile>
<id>jakartaee-tck</id>

<dependencies>
<dependency>
<groupId>org.eclipse.jakartaee.tck.local</groupId>
<artifactId>tsharness</artifactId>
<version>8.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>/opt/eclipse/javaeetck/lib/tsharness.jar</systemPath>
</dependency>
<dependency>
<groupId>org.eclipse.jakartaee.tck.local</groupId>
<artifactId>sonparsertests_appclient_vehicle_client</artifactId>
<version>8.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>/opt/eclipse/javaeetck/dist/com/sun/ts/tests/jsonp/api/jsonparsertests/jsonparsertests_appclient_vehicle_client.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
-->
</project>

This file was deleted.

5 changes: 5 additions & 0 deletions johnzon-jaxrs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions johnzon-json-extras/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
</properties>

<dependencies>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
Expand Down
109 changes: 109 additions & 0 deletions johnzon-jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
Expand Down Expand Up @@ -107,6 +113,27 @@
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-spi</artifactId>
<version>${owb.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-se</artifactId>
<version>${owb.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-tck</artifactId>
<version>3.0.0</version>
<scope>test</scope>

<exclusions>
<exclusion>
<groupId>org.netbeans.tools</groupId>
<artifactId>ct-sym</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

Expand Down Expand Up @@ -136,6 +163,88 @@
</instructions>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>

<configuration>
<artifactItems>
<artifactItem>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta-jsonp-api.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/signaturedirectory</outputDirectory>
<destFileName>jakarta.json-api.jar</destFileName>
</artifactItem>

<artifactItem>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>${jakarta-jsonb-api.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/signaturedirectory</outputDirectory>
<destFileName>jakarta.json.bind-api.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.plugin.version}</version>

<executions>
<execution>
<id>tck-test</id>

<goals>
<goal>test</goal>
</goals>

<configuration>
<dependenciesToScan>jakarta.json.bind:jakarta.json.bind-tck</dependenciesToScan>

<excludes>
<!-- don't run johnzon tests multiple times, handled in default-test already -->
<exclude>**/org/apache/johnzon/**</exclude>

<!-- https://github.com/jakartaee/jsonb-api/issues/344 -->
<exclude>**/SerializersCustomizationCDITest</exclude>

<!-- https://github.com/jakartaee/jsonb-api/issues/347 -->
<exclude>**/AnnotationTypeInfoTest</exclude>
</excludes>

<systemPropertyVariables>
<jimage.dir>${project.build.directory}/jimage</jimage.dir>
<signature.sigTestClasspath>${project.build.directory}/signaturedirectory/jakarta.json.bind-api.jar:${project.build.directory}/jimage/java.base:${project.build.directory}/jimage/java.rmi:${project.build.directory}/jimage/java.sql:${project.build.directory}/jimage/java.naming</signature.sigTestClasspath>

<!-- don't serialize BigDecimal/BigInteger as strings. Usually enabled by default in johnzon, see https://github.com/jakartaee/jsonb-api/issues/187 -->
<johnzon.use-bigdecimal-stringadapter>false</johnzon.use-bigdecimal-stringadapter>
<johnzon.use-biginteger-stringadapter>false</johnzon.use-biginteger-stringadapter>

<!-- needed to pass JSON-B 3 TCKs on jdk 13+, see https://github.com/jakartaee/jsonb-api/issues/272 -->
<java.locale.providers>COMPAT</java.locale.providers>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
5 changes: 5 additions & 0 deletions johnzon-jsonlogic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<packaging>bundle</packaging>

<dependencies>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.johnzon</groupId>
<artifactId>johnzon-core</artifactId>
Expand Down
5 changes: 5 additions & 0 deletions johnzon-jsonschema/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.johnzon</groupId>
<artifactId>johnzon-core</artifactId>
Expand Down
Loading