Skip to content
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

TOMEE-4165 JSON-P TCK setup #1003

Merged
merged 11 commits into from
Jan 19, 2024
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1140,11 +1140,6 @@
<artifactId>jetty-server</artifactId>
<version>${version.jetty}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-continuation</artifactId>
<version>${version.jetty}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jsp-2.1</artifactId>
Expand Down
162 changes: 162 additions & 0 deletions tck/jsonp-signature-test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>tck</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>jsonp-signature-test</artifactId>
<name>TomEE :: TCK :: JSON-P Signature Tests</name>

<dependencies>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>jakartaee-api</artifactId>
</dependency>

<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests</artifactId>
<version>${jsonp-tck.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.johnzon</groupId>
<artifactId>johnzon-core</artifactId>
</dependency>

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-se</artifactId>
<version>${version.openwebbeans}</version>
</dependency>

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
</dependency>

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-spi</artifactId>
</dependency>

<dependency>
<groupId>org.netbeans.tools</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>1.6</version>
<scope>test</scope>
</dependency>
</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>
<executions>
<execution>
<id>copy</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>

<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.tomee</groupId>
<artifactId>jakartaee-api</artifactId>
<version>${version.jakartaee-api}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/signaturedirectory</outputDirectory>
<destFileName>jakartaee-api.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>setup-project</id>
<phase>test-compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="remove-jakarta-json-bind">
<echo>Removing jakarta.json.bind classes from the jakartaee-api.jar (we cannot exclude that package them from the sigtests).</echo>

<property name="library.dir" value="signaturedirectory" />
<property name="library.file" value="jakartaee-api.jar" />
<property name="library.path" value="${project.build.directory}/${library.dir}/${library.file}" />
<property name="library.path.new" value="${project.build.directory}/${library.dir}/new-${library.file}" />

<jar destfile="${library.path.new}">
<zipfileset src="${library.path}" excludes="jakarta/json/bind/**" />
</jar>

<delete file="${library.path}" />
<move file="${library.path.new}" tofile="${library.path}" />

</target>
</configuration>
</execution>
</executions>

</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
<systemProperties>
<jimage.dir>${project.build.directory}/jimage</jimage.dir>
<signature.sigTestClasspath>${project.build.directory}/signaturedirectory/jakartaee-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>
<dependenciesToScan>
<dependency>jakarta.json:jakarta.json-tck-tests</dependency>
</dependenciesToScan>
<includes>
<include>**/JSONPSigTest</include>
</includes>
</configuration>

</plugin>
</plugins>
</build>

</project>
129 changes: 129 additions & 0 deletions tck/jsonp-standalone/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>tck</artifactId>
<groupId>org.apache.tomee</groupId>
<version>10.0.0-M1-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>jsonp-standalone</artifactId>
<name>TomEE :: TCK :: JSON-P Standalone</name>

<dependencies>
<dependency>
<groupId>org.apache.tomee</groupId>
<artifactId>jakartaee-api</artifactId>
</dependency>

<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests</artifactId>
<version>${jsonp-tck.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests-pluggability</artifactId>
<version>${jsonp-tck.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.johnzon</groupId>
<artifactId>johnzon-core</artifactId>
</dependency>

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-se</artifactId>
<version>${version.openwebbeans}</version>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-spi</artifactId>
</dependency>
</dependencies>

<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
</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>

<classpathDependencyExcludes>
<classpathDependencyExclude>jakarta.json:jakarta.json-tck-tests-pluggability</classpathDependencyExclude>
</classpathDependencyExcludes>

<excludes>
<exclude>**/JSONPSigTest</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 3 additions & 1 deletion tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<properties>
<cdi-tck.version>4.0.11</cdi-tck.version>
<bval-tck.version>3.0.1</bval-tck.version>

<jsonp-tck.version>2.1.1</jsonp-tck.version>
<validation.provider>org.apache.bval.jsr.ApacheValidationProvider</validation.provider>
</properties>

Expand All @@ -41,6 +41,8 @@
<module>bval-embedded</module>
<module>bval-tomee</module>
<module>bval-signature-test</module>
<module>jsonp-standalone</module>
<module>jsonp-signature-test</module>
<module>microprofile-tck</module>
</modules>

Expand Down
Loading