blob: 4fa35fd0921d2e3bf81d2032507d7df5ce874818 [file]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2020, 2026 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2026 Contributors to the Eclipse Foundation
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-parent</artifactId>
<version>2.2.0-SNAPSHOT</version>
</parent>
<artifactId>jakarta.json-tck</artifactId>
<packaging>pom</packaging>
<name>Jakarta JSON Processing TCK Parent</name>
<description>Jakarta JSON Processing TCK Parent</description>
<modules>
<module>tck-common</module>
<module>tck-tests</module>
<module>tck-tests-pluggability</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-tck-tests-pluggability</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.netbeans.tools</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.jupiter.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<!--
~ This profile can be used to (re)generate signatures of Jakarta JSON Processing API.
~ Note that they differ based on JDK used to build them
~ All .sig files should be included in the generated jar files!
-->
<id>signature-generation</id>
<activation>
<property>
<name>signature</name>
</property>
</activation>
<properties>
<!--Default assumed JDK version, can be overridden via -Djdk.major.version=X -->
<jdk.major.version>${maven.compiler.release}</jdk.major.version>
</properties>
<dependencies>
<!-- API classes are picked up by sigtest-maven-plugin from the project classpath -->
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Unpacks the API jar into target/json-api for use by sigtest-maven-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/json-api</outputDirectory>
<!-- Include only compiled classes; exclude source and property files -->
<includes>**/*.class,**/*.xml</includes>
<excludes>**/*.properties</excludes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- Extract JDK modules into output directory for use by signature plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec.maven.plugin.version}</version>
<executions>
<execution>
<id>extractModules</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>jimage</executable>
<arguments>
<argument>extract</argument>
<argument>--dir=${project.build.directory}/jimage</argument>
<argument>${java.home}/lib/modules</argument>
</arguments>
</configuration>
</plugin>
<!-- Run signature plugin to generate signature file -->
<plugin>
<groupId>jakarta.tck</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>${sigtest.version}</version>
<executions>
<execution>
<id>createSigFile</id>
<phase>generate-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<classes>${project.build.directory}/json-api</classes>
<classes>${project.build.directory}/jimage/java.base</classes>
<packages>
jakarta.json,
jakarta.json.spi,
jakarta.json.stream
</packages>
<version>${project.version}</version>
<attach>false</attach>
<sigfile>${project.build.directory}/jakarta.json.sig_${jdk.major.version}</sigfile>
</configuration>
</plugin>
<!-- Copy signature file to tck resources with major java version -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven.antrun.plugin.version}</version>
<executions>
<execution>
<id>copySigFile</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.basedir}/tck-tests/src/main/resources/ee/jakarta/tck/jsonp/signaturetest/" />
<copy todir="${project.basedir}/tck-tests/src/main/resources/ee/jakarta/tck/jsonp/signaturetest/">
<fileset
dir="${project.build.directory}"
includes="jakarta.json.sig_${jdk.major.version}" />
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>