Merge pull request #111 from jungm/fix-pluggability-sigtests
Fix pluggability and SigTests TCKs
diff --git a/tck/jsonb/pom.xml b/tck/jsonb/pom.xml
index 80dd5ef..d12bbfd 100644
--- a/tck/jsonb/pom.xml
+++ b/tck/jsonb/pom.xml
@@ -77,15 +77,14 @@
</dependencies>
<build>
- <testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <filtering>true</filtering>
- </testResource>
- </testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
@@ -94,16 +93,10 @@
<dependenciesToScan>
<dependency>jakarta.json.bind:jakarta.json.bind-tck</dependency>
</dependenciesToScan>
- <includes>
- <include>ee.jakarta.tck.json.bind.**</include>
- </includes>
- <!--
- <excludes>
- <exclude>**/JSONBSigTest</exclude>
- </excludes>
- -->
+
<systemProperties>
- <signature.sigTestClasspath>${project.build.outputDirectory}</signature.sigTestClasspath>
+ <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>
@@ -117,6 +110,4 @@
</plugin>
</plugins>
</build>
-
-
</project>
diff --git a/tck/jsonp/pom.xml b/tck/jsonp/pom.xml
index 88f9536..8b5c048 100644
--- a/tck/jsonp/pom.xml
+++ b/tck/jsonp/pom.xml
@@ -34,11 +34,6 @@
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.johnzon</groupId>
- <artifactId>johnzon-core</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>jakarta.json</groupId>
@@ -54,6 +49,12 @@
</dependency>
<dependency>
+ <groupId>org.apache.johnzon</groupId>
+ <artifactId>johnzon-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-se</artifactId>
<version>${owb.version}</version>
@@ -87,27 +88,58 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0-M7</version>
+ <version>${surefire.version}</version>
<configuration>
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
- <dependenciesToScan>
- <dependency>jakarta.json:jakarta.json-tck-tests</dependency>
- <dependency>jakarta.json:jakarta.json-tck-tests-pluggability</dependency>
- </dependenciesToScan>
- <includes>
- <include>ee.jakarta.tck.jsonp.**</include>
- </includes>
- <!--
- <excludes>
- <exclude>**/JSONPSigTest</exclude>
- </excludes>
- -->
- <systemProperties>
- <signature.sigTestClasspath>${project.build.outputDirectory}</signature.sigTestClasspath>
- </systemProperties>
</configuration>
+
+ <!-- Pluggability tests need to be run separately from normal TCKs as they bring their
+ own JsonProvider implementation which would break other TCK tests -->
+ <executions>
+ <execution>
+ <id>tck-pluggability</id>
+
+ <goals>
+ <goal>test</goal>
+ </goals>
+
+ <configuration>
+ <dependenciesToScan>jakarta.json:jakarta.json-tck-tests-pluggability</dependenciesToScan>
+
+ <classpathDependencyExcludes>
+ <classpathDependencyExclude>jakarta.json:jakarta.json-tck-tests</classpathDependencyExclude>
+ </classpathDependencyExcludes>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>tck</id>
+
+ <goals>
+ <goal>test</goal>
+ </goals>
+
+ <configuration>
+ <dependenciesToScan>jakarta.json:jakarta.json-tck-tests</dependenciesToScan>
+
+ <systemProperties>
+ <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>
+ </systemProperties>
+
+ <classpathDependencyExcludes>
+ <classpathDependencyExclude>jakarta.json:jakarta.json-tck-tests-pluggability</classpathDependencyExclude>
+ </classpathDependencyExcludes>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
diff --git a/tck/pom.xml b/tck/pom.xml
index 56e7bdf..01aff41 100644
--- a/tck/pom.xml
+++ b/tck/pom.xml
@@ -34,4 +34,49 @@
<module>jsonp</module>
</modules>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <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>
+ </plugins>
+ </pluginManagement>
+ </build>
+
</project>