Skip to content

Commit

Permalink
signature test migration from jakartaee-tck repo.
Browse files Browse the repository at this point in the history
Signed-off-by: gurunandan.rao@oracle.com <gurunandan.rao@oracle.com>
  • Loading branch information
gurunrao authored and lukasj committed Dec 6, 2021
1 parent 1d5a2a5 commit 523c996
Show file tree
Hide file tree
Showing 26 changed files with 4,404 additions and 17 deletions.
6 changes: 3 additions & 3 deletions impl-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<groupId>org.eclipse.jsonp</groupId>
<artifactId>jakarta.json-tck</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -33,9 +33,9 @@
</modules>

<properties>
<jsonp-api.version>2.0.1-SNAPSHOT</jsonp-api.version>
<jsonp-api.version>2.1.0-SNAPSHOT</jsonp-api.version>
<jsonp-impl.version>1.0.1-SNAPSHOT</jsonp-impl.version>
<jsonp-tck.version>2.0.0-SNAPSHOT</jsonp-tck.version>
<jsonp-tck.version>2.1.0-SNAPSHOT</jsonp-tck.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion impl-tck/tck-tests-plugability/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.eclipse.jsonp</groupId>
<artifactId>jakarta.json-tck</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</parent>

<artifactId>jakarta.json-tck-tests-plugability</artifactId>
Expand Down
82 changes: 81 additions & 1 deletion impl-tck/tck-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@
<parent>
<groupId>org.eclipse.jsonp</groupId>
<artifactId>jakarta.json-tck</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</parent>

<artifactId>jakarta.json-tck-tests</artifactId>

<properties>
<jakarta.json.version>2.1.0-SNAPSHOT</jakarta.json.version>
</properties>

<dependencies>
<dependency>
<groupId>jakarta.json</groupId>
Expand All @@ -43,10 +47,86 @@
<version>${jsonp-tck.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.tools</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>1.4</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-jsonp-tck-signature-files</id>
<phase>generate-test-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests</artifactId>
<version>${jsonp-tck.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<!-- We need the signature file, mapping file and package list file -->
<includes>**/*sig-test*,**/*jakarta.json.sig_*,**/*sig-test-pkg-list.txt</includes>
<outputDirectory>${project.build.directory}/signaturedirectory</outputDirectory>
</configuration>
</execution>
</executions>
</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-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jakarta.json.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>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
<failIfNoTests>true</failIfNoTests>
<dependenciesToScan>jakarta.json:jakarta.json-tck-tests</dependenciesToScan>
<systemPropertyVariables>
<jimage.dir>${project.build.directory}/jdk11-bundle</jimage.dir>
<signature.mapfile>${project.build.directory}/signaturedirectory/jakarta/jsonp/tck/signaturetest/sig-test.map</signature.mapfile>
<signature.repositoryDir>${project.build.directory}/signaturedirectory/jakarta/jsonp/tck/signaturetest</signature.repositoryDir>
<signature.packagelist>${project.build.directory}/signaturedirectory/jakarta/jsonp/tck/signaturetest/sig-test-pkg-list.txt</signature.packagelist>
<signature.sigTestClasspath>${project.build.directory}/signaturedirectory/jakarta.json-api.jar:${project.build.directory}/jdk11-bundle/java.base:${project.build.directory}/jdk11-bundle/java.rmi:${project.build.directory}/jdk11-bundle/java.sql:${project.build.directory}/jdk11-bundle/java.naming</signature.sigTestClasspath>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
Expand Down
8 changes: 4 additions & 4 deletions tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -54,8 +54,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<junit.jupiter.version>5.7.2</junit.jupiter.version>
<arquillian.junit5.version>1.7.0.Alpha5</arquillian.junit5.version>
</properties>
Expand All @@ -64,7 +64,7 @@
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.0.1-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions tck/tck-common/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -22,7 +22,7 @@
<parent>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</parent>

<artifactId>jakarta.json-tck-common</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions tck/tck-tests-plugability/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -22,7 +22,7 @@
<parent>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</parent>

<artifactId>jakarta.json-tck-tests-plugability</artifactId>
Expand All @@ -32,7 +32,7 @@
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-common</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions tck/tck-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</parent>

<artifactId>jakarta.json-tck-tests</artifactId>
Expand All @@ -32,7 +32,7 @@
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-common</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,16 @@
*
*/
public class JsonProviderTest {

private static final String JSONP_PROVIDER_FACTORY = "jakarta.json.provider";


/**
* Verifies it is possible to obtain the JsonProvider implementation from a System property.
*/
@Test
public void systemProperty() {
System.setProperty(JsonProvider.JSONP_PROVIDER_FACTORY, DummyJsonProvider.class.getName());
System.setProperty(JSONP_PROVIDER_FACTORY, DummyJsonProvider.class.getName());
JsonProvider provider = JsonProvider.provider();
assertEquals(DummyJsonProvider.class, provider.getClass());
}
Expand Down
Loading

0 comments on commit 523c996

Please sign in to comment.