jakarta.json.jar will contain api and impl (#228)
diff --git a/.travis.yml b/.travis.yml
index e599ed8..c8361bc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,4 +14,8 @@
install: true
script:
- - mvn -U -C -Pstaging -Dnon.final=true clean verify
+ - cd api
+ - mvn -U -C -Pstaging,oss-release -Dnon.final=true -Dgpg.skip=true clean verify
+ - cd ..
+ - mvn -U -C -Pstaging,oss-release -Dnon.final=true -Dgpg.skip=true clean verify
+
diff --git a/api/etc/config/copyright-exclude b/api/etc/config/copyright-exclude
new file mode 100644
index 0000000..e7f6f88
--- /dev/null
+++ b/api/etc/config/copyright-exclude
@@ -0,0 +1,8 @@
+.json
+.md
+speclicense.html
+MANIFEST.MF
+/META-INF/services/
+/etc/config/copyright-exclude
+/etc/config/copyright.txt
+/bundles/ri/src/main/resources/README.txt
diff --git a/api/etc/config/copyright.txt b/api/etc/config/copyright.txt
new file mode 100644
index 0000000..9c347b6
--- /dev/null
+++ b/api/etc/config/copyright.txt
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) YYYY 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
+ * 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
+ */
diff --git a/api/etc/config/exclude.xml b/api/etc/config/exclude.xml
new file mode 100644
index 0000000..55ca904
--- /dev/null
+++ b/api/etc/config/exclude.xml
@@ -0,0 +1,14 @@
+<!--
+
+ Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+<FindBugsFilter>
+</FindBugsFilter>
diff --git a/api/pom.xml b/api/pom.xml
index caa286c..fccb646 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -21,11 +21,14 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.glassfish</groupId>
- <artifactId>json</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
+ <groupId>org.eclipse.ee4j</groupId>
+ <artifactId>project</artifactId>
+ <version>1.0.6</version>
</parent>
+
+ <prerequisites>
+ <maven>3.3.1</maven>
+ </prerequisites>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
@@ -36,11 +39,116 @@
<url>https://github.com/eclipse-ee4j/jsonp</url>
<properties>
- <packages.export>javax.json.*</packages.export>
+ <packages.export>jakarta.json.*</packages.export>
+ <spec_version>1.1</spec_version>
+ <new_spec_version>1.2</new_spec_version>
+ <new_spec_impl_version>1.2</new_spec_impl_version>
+ <api_package>jakarta.json</api_package>
+ <legal.doc.source>${maven.multiModuleProjectDirectory}</legal.doc.source>
+ <javadoc.link.jdk>http://docs.oracle.com/javase/8/docs/api</javadoc.link.jdk>
+ <config.dir>${project.root.location}/etc/config</config.dir>
+ <copyright.exclude>${config.dir}/copyright-exclude</copyright.exclude>
+ <copyright.templatefile>${config.dir}/copyright.txt</copyright.templatefile>
+ <copyright.ignoreyear>false</copyright.ignoreyear>
+ <copyright.scmonly>true</copyright.scmonly>
+ <copyright.update>false</copyright.update>
</properties>
<build>
<plugins>
+ <plugin>
+ <groupId>org.commonjava.maven.plugins</groupId>
+ <artifactId>directory-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>find-project-root</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>highest-basedir</goal>
+ </goals>
+ <configuration>
+ <property>project.root.location</property>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <!-- Requires validate target to initialize copyright.config.dir properly -->
+ <!-- e.g. mvn validate glassfish-copyright:repair -->
+ <plugin>
+ <groupId>org.glassfish.copyright</groupId>
+ <artifactId>glassfish-copyright-maven-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <templateFile>${copyright.templatefile}</templateFile>
+ <excludeFile>${copyright.exclude}</excludeFile>
+ <!-- skip files not under SCM-->
+ <scmOnly>${copyright.scmonly}</scmOnly>
+ <!-- for use with repair -->
+ <update>${copyright.update}</update>
+ <!-- check that year is correct -->
+ <ignoreYear>${copyright.ignoreyear}</ignoreYear>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>verify</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-legal-resource</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>add-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${legal.doc.source}</directory>
+ <includes>
+ <include>NOTICE.md</include>
+ <include>LICENSE.md</include>
+ </includes>
+ <targetPath>META-INF</targetPath>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.2.1</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <mavenExecutorId>forked-path</mavenExecutorId>
+ <useReleaseProfile>false</useReleaseProfile>
+ <arguments>${release.arguments}</arguments>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@@ -53,7 +161,7 @@
<groups>
<group>
<title>JSON Processing API Packages</title>
- <packages>javax.json*</packages>
+ <packages>jakarta.json*</packages>
</group>
</groups>
<description>JSON Processing API documentation</description>
@@ -63,7 +171,7 @@
</header>
<bottom><![CDATA[
Comments to: <a href="mailto:jsonp-dev@eclipse.org">jsonp-dev@eclipse.org</a>.<br>
-Copyright © 2019 Eclipse Foundation. All rights reserved.<br>
+Copyright © 2019, 2020 Eclipse Foundation. All rights reserved.<br>
Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.]]>
</bottom>
</configuration>
@@ -80,6 +188,7 @@
<plugin>
<groupId>org.glassfish.build</groupId>
<artifactId>spec-version-maven-plugin</artifactId>
+ <version>2.0</version>
<configuration>
<specMode>jakarta</specMode>
<spec>
@@ -128,6 +237,217 @@
</configuration>
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.commonjava.maven.plugins</groupId>
+ <artifactId>directory-maven-plugin</artifactId>
+ <version>0.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-maven-plugin</artifactId>
+ <version>${spotbugs.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.glassfish.copyright</groupId>
+ <artifactId>glassfish-copyright-maven-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>4.2.1</version>
+ <configuration>
+ <instructions>
+ <_noee>true</_noee>
+ </instructions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>3.1.1</version>
+ <configuration>
+ <detectJavaApiLink>false</detectJavaApiLink>
+ <links>
+ <link>${javadoc.link.jdk}</link>
+ </links>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.0.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <compilerArgs>
+ <arg>-Xlint:all</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>3.2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.2.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>wagon-maven-plugin</artifactId>
+ <version>2.0.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.5.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.7.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.22.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.5.3</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.scm</groupId>
+ <artifactId>maven-scm-provider-gitexe</artifactId>
+ <version>1.9.5</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-staging-maven-plugin</artifactId>
+ <version>1.6.7</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
+
+ <profiles>
+ <profile>
+ <id>jdk11-setup</id>
+ <activation>
+ <jdk>[11,)</jdk>
+ </activation>
+ <properties>
+ <javadoc.link.jdk>https://docs.oracle.com/en/java/javase/11/docs/api</javadoc.link.jdk>
+ </properties>
+ </profile>
+ <profile>
+ <id>jdk9-setup</id>
+ <activation>
+ <jdk>[9,)</jdk>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <release>8</release>
+ </configuration>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <configuration>
+ <release>9</release>
+ <source>9</source>
+ <target>9</target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>base-compile</id>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>module-info.java</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-jdk9-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src/main/jdk9</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/impl/pom.xml b/impl/pom.xml
index fd20c40..a35d3c6 100644
--- a/impl/pom.xml
+++ b/impl/pom.xml
@@ -37,7 +37,7 @@
<properties>
<packages.private>org.glassfish.json</packages.private>
- <packages.export>javax.json.*,org.glassfish.json.api</packages.export>
+ <packages.export>jakarta.json.*,org.glassfish.json.api</packages.export>
</properties>
<build>
@@ -75,7 +75,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
- <skip>true</skip>
+ <skipSource>true</skipSource>
</configuration>
</plugin>
<plugin>
@@ -118,6 +118,7 @@
<classifier>sources</classifier>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/sources</outputDirectory>
+ <excludes>module-info.java</excludes>
</artifactItem>
</artifactItems>
</configuration>
@@ -140,30 +141,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <includeDependencySources>true</includeDependencySources>
- <bottom>
-<![CDATA[Copyright © 2012-2020,
- <a href="http://www.oracle.com">Oracle</a>
- and/or its affiliates. All Rights Reserved.
- Use is subject to
- <a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.
- <br>Comments to : jsonp-dev@eclipse.org
-]]>
- </bottom>
- </configuration>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<!--
This plugin is reponsible for packaging artifacts
as OSGi bundles. Please refer to
@@ -203,7 +180,11 @@
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
- <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
@@ -240,6 +221,36 @@
</execution>
</executions>
</plugin>
+ <!--
+ Javadoc is only generated when it is executed with JDK9+.
+ The reason is that depends in the remote API jar that was generated with JDK9+ and it brings the module.
+ In previous versions API was generated at the same time than IMPL with the same JDK, so there was no issue.
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <includeDependencySources>true</includeDependencySources>
+ <additionalOptions>--patch-module ${api_package}=${project.build.directory}/distro-javadoc-sources/${api_package}-api-${jakarta_json-api_version}-sources</additionalOptions>
+ <bottom>
+<![CDATA[Copyright © 2012-2020,
+ <a href="http://www.oracle.com">Oracle</a>
+ and/or its affiliates. All Rights Reserved.
+ Use is subject to
+ <a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.
+ <br>Comments to : jsonp-dev@eclipse.org
+]]>
+ </bottom>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonArrayTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonArrayTest.java
similarity index 98%
rename from tests/src/test/java/org/glassfish/json/tests/JsonArrayTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonArrayTest.java
index fdbfd0e..f74bd49 100644
--- a/tests/src/test/java/org/glassfish/json/tests/JsonArrayTest.java
+++ b/impl/src/test/java/org/glassfish/json/tests/JsonArrayTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020 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
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonBuilderFactoryTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonBuilderFactoryTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonBuilderFactoryTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonBuilderFactoryTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonBuilderTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonBuilderTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonBuilderTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonBuilderTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonCollectorTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonCollectorTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonCollectorTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonCollectorTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonFieldTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonFieldTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonFieldTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonFieldTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonGeneratorFactoryTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonGeneratorFactoryTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonGeneratorFactoryTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonGeneratorFactoryTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonGeneratorTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonGeneratorTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonGeneratorTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonGeneratorTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonMergePatchDiffTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonMergePatchDiffTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonMergePatchDiffTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonMergePatchDiffTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonMergePatchTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonMergePatchTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonMergePatchTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonMergePatchTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonNumberTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonNumberTest.java
similarity index 98%
rename from tests/src/test/java/org/glassfish/json/tests/JsonNumberTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonNumberTest.java
index abc3476..e830dbb 100644
--- a/tests/src/test/java/org/glassfish/json/tests/JsonNumberTest.java
+++ b/impl/src/test/java/org/glassfish/json/tests/JsonNumberTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020 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
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonObjectTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonObjectTest.java
similarity index 98%
rename from tests/src/test/java/org/glassfish/json/tests/JsonObjectTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonObjectTest.java
index a1de2e4..9413d3e 100644
--- a/tests/src/test/java/org/glassfish/json/tests/JsonObjectTest.java
+++ b/impl/src/test/java/org/glassfish/json/tests/JsonObjectTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020 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
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonParserFactoryTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonParserFactoryTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonParserFactoryTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonParserFactoryTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonParserSkipTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonParserSkipTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonParserSkipTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonParserSkipTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonParserTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonParserTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonParserTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonParserTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonParsingExceptionTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonParsingExceptionTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonParsingExceptionTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonParsingExceptionTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPatchBugsTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPatchBugsTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPatchBugsTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPatchBugsTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPatchBuilderTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPatchBuilderTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPatchBuilderTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPatchBuilderTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPatchDiffTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPatchDiffTest.java
similarity index 98%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPatchDiffTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPatchDiffTest.java
index 26d0585..4743b68 100644
--- a/tests/src/test/java/org/glassfish/json/tests/JsonPatchDiffTest.java
+++ b/impl/src/test/java/org/glassfish/json/tests/JsonPatchDiffTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020 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
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPatchOperationTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPatchOperationTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPatchOperationTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPatchOperationTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPatchTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPatchTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPatchTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPatchTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPointerAddOperationTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPointerAddOperationTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPointerAddOperationTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPointerAddOperationTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPointerEscapeTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPointerEscapeTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPointerEscapeTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPointerEscapeTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPointerRemoveOperationTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPointerRemoveOperationTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPointerRemoveOperationTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPointerRemoveOperationTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPointerReplaceOperationTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPointerReplaceOperationTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPointerReplaceOperationTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPointerReplaceOperationTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPointerTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPointerTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPointerTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPointerTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonPointerToStringTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonPointerToStringTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonPointerToStringTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonPointerToStringTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonReaderTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonReaderTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonReaderTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonReaderTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonSamplesParsingTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonSamplesParsingTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonSamplesParsingTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonSamplesParsingTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonStringTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonStringTest.java
similarity index 97%
rename from tests/src/test/java/org/glassfish/json/tests/JsonStringTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonStringTest.java
index d0aebb6..6f7e7a9 100644
--- a/tests/src/test/java/org/glassfish/json/tests/JsonStringTest.java
+++ b/impl/src/test/java/org/glassfish/json/tests/JsonStringTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2020 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
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonValueTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonValueTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonValueTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonValueTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/JsonWriterTest.java b/impl/src/test/java/org/glassfish/json/tests/JsonWriterTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/JsonWriterTest.java
rename to impl/src/test/java/org/glassfish/json/tests/JsonWriterTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/RFC7159Test.java b/impl/src/test/java/org/glassfish/json/tests/RFC7159Test.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/RFC7159Test.java
rename to impl/src/test/java/org/glassfish/json/tests/RFC7159Test.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/ToJsonTest.java b/impl/src/test/java/org/glassfish/json/tests/ToJsonTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/ToJsonTest.java
rename to impl/src/test/java/org/glassfish/json/tests/ToJsonTest.java
diff --git a/tests/src/test/java/org/glassfish/json/tests/TwitterSearchTest.java b/impl/src/test/java/org/glassfish/json/tests/TwitterSearchTest.java
similarity index 100%
rename from tests/src/test/java/org/glassfish/json/tests/TwitterSearchTest.java
rename to impl/src/test/java/org/glassfish/json/tests/TwitterSearchTest.java
diff --git a/tests/src/test/resources/facebook.json b/impl/src/test/resources/facebook.json
similarity index 100%
rename from tests/src/test/resources/facebook.json
rename to impl/src/test/resources/facebook.json
diff --git a/tests/src/test/resources/facebook1.json b/impl/src/test/resources/facebook1.json
similarity index 100%
rename from tests/src/test/resources/facebook1.json
rename to impl/src/test/resources/facebook1.json
diff --git a/tests/src/test/resources/facebook2.json b/impl/src/test/resources/facebook2.json
similarity index 100%
rename from tests/src/test/resources/facebook2.json
rename to impl/src/test/resources/facebook2.json
diff --git a/tests/src/test/resources/jsonmergepatch.json b/impl/src/test/resources/jsonmergepatch.json
similarity index 100%
rename from tests/src/test/resources/jsonmergepatch.json
rename to impl/src/test/resources/jsonmergepatch.json
diff --git a/tests/src/test/resources/jsonmergepatchdiff.json b/impl/src/test/resources/jsonmergepatchdiff.json
similarity index 100%
rename from tests/src/test/resources/jsonmergepatchdiff.json
rename to impl/src/test/resources/jsonmergepatchdiff.json
diff --git a/tests/src/test/resources/jsonpatch.json b/impl/src/test/resources/jsonpatch.json
similarity index 100%
rename from tests/src/test/resources/jsonpatch.json
rename to impl/src/test/resources/jsonpatch.json
diff --git a/tests/src/test/resources/jsonpatchdiff.json b/impl/src/test/resources/jsonpatchdiff.json
similarity index 100%
rename from tests/src/test/resources/jsonpatchdiff.json
rename to impl/src/test/resources/jsonpatchdiff.json
diff --git a/tests/src/test/resources/rfc6901.json b/impl/src/test/resources/rfc6901.json
similarity index 100%
rename from tests/src/test/resources/rfc6901.json
rename to impl/src/test/resources/rfc6901.json
diff --git a/tests/src/test/resources/twitter.json b/impl/src/test/resources/twitter.json
similarity index 100%
rename from tests/src/test/resources/twitter.json
rename to impl/src/test/resources/twitter.json
diff --git a/tests/src/test/resources/wiki.json b/impl/src/test/resources/wiki.json
similarity index 100%
rename from tests/src/test/resources/wiki.json
rename to impl/src/test/resources/wiki.json
diff --git a/pom.xml b/pom.xml
index ac99658..d11da17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,6 +98,7 @@
<spotbugs.skip>false</spotbugs.skip>
<spotbugs.threshold>Low</spotbugs.threshold>
<spotbugs.version>3.1.12.2</spotbugs.version>
+ <jakarta_json-api_version>2.0.0-RC1</jakarta_json-api_version>
</properties>
<build>
@@ -127,6 +128,7 @@
<plugin>
<groupId>org.glassfish.copyright</groupId>
<artifactId>glassfish-copyright-maven-plugin</artifactId>
+ <version>2.3</version>
<configuration>
<templateFile>${copyright.templatefile}</templateFile>
<excludeFile>${copyright.exclude}</excludeFile>
@@ -210,7 +212,7 @@
<plugin>
<groupId>org.glassfish.build</groupId>
<artifactId>spec-version-maven-plugin</artifactId>
- <version>1.5</version>
+ <version>2.0</version>
</plugin>
<plugin>
<groupId>org.glassfish.copyright</groupId>
@@ -220,7 +222,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>3.5.0</version>
+ <version>4.2.1</version>
<configuration>
<instructions>
<_noee>true</_noee>
@@ -235,6 +237,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <!--
+ Version 3.1.1 adds the argument add-modules ALL-MODULE-PATH that fails with next:
+ error: add-modules ALL-MODULE-PATH can only be used when compiling the unnamed module
+ -->
<version>3.0.1</version>
<configuration>
<detectJavaApiLink>false</detectJavaApiLink>
@@ -251,7 +257,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.7.0</version>
+ <version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@@ -268,7 +274,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>3.1.0</version>
+ <version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -362,7 +368,7 @@
<dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
- <version>${project.version}</version>
+ <version>${jakarta_json-api_version}</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
@@ -404,7 +410,6 @@
<profile>
<id>release</id>
<modules>
- <module>api</module>
<module>impl</module>
<module>jaxrs</module>
</modules>
@@ -491,11 +496,9 @@
<jdk>[9,)</jdk>
</activation>
<modules>
- <module>api</module>
<module>impl</module>
<module>jaxrs</module>
<module>jaxrs-1x</module>
- <module>tests</module>
<module>gf</module>
<module>demos</module>
<module>bundles</module>
@@ -518,11 +521,9 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
- <module>api</module>
<module>impl</module>
<module>jaxrs</module>
<module>jaxrs-1x</module>
- <module>tests</module>
<module>gf</module>
<module>demos</module>
<module>bundles</module>
diff --git a/spec/pom.xml b/spec/pom.xml
index 06410bc..18b495d 100644
--- a/spec/pom.xml
+++ b/spec/pom.xml
@@ -27,7 +27,7 @@
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-spec</artifactId>
<packaging>pom</packaging>
- <version>1.1-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<name>Jakarta JSON Processing Specification</name>
<properties>
diff --git a/tests/pom.xml b/tests/pom.xml
deleted file mode 100644
index a210796..0000000
--- a/tests/pom.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2012, 2020 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
- 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>org.glassfish</groupId>
- <artifactId>json</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <artifactId>jsonp-tests</artifactId>
- <packaging>jar</packaging>
- <name>Jakarta JSON Processing Tests</name>
-
- <dependencies>
- <dependency>
- <groupId>jakarta.json</groupId>
- <artifactId>jakarta.json-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>jakarta.json</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-</project>