Merge pull request #73 from Tomas-Kraus/master
JDK 11 preparation and jakarta uptake.
diff --git a/NOTICE.md b/NOTICE.md
new file mode 100644
index 0000000..5aac171
--- /dev/null
+++ b/NOTICE.md
@@ -0,0 +1,44 @@
+# Notices for Eclipse Project for JAXB
+
+This content is produced and maintained by the Eclipse Project for JAXB project.
+
+* Project home: https://projects.eclipse.org/projects/ee4j.jaxb
+
+## Trademarks
+
+Eclipse Project for JAXB is a trademark of the Eclipse Foundation.
+
+## Copyright
+
+All content is the property of the respective authors or their employers. For
+more information regarding authorship of content, please consult the listed
+source code repository logs.
+
+## Declared Project Licenses
+
+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
+
+## Source Code
+
+The project maintains the following source code repositories:
+
+* https://github.com/eclipse-ee4j/jaxb-api
+
+## Third-party Content
+
+This project leverages the following third party content.
+
+None
+
+## Cryptography
+
+Content may contain encryption software. The country in which you are currently
+may have restrictions on the import, possession, and use, and/or re-export to
+another country, of encryption software. BEFORE using any encryption software,
+please check the country's laws, regulations and policies concerning the import,
+possession, or use, and re-export of encryption software, to see if this is
+permitted.
diff --git a/etc/config/copyright-exclude b/etc/config/copyright-exclude
index f1bb560..8de4c7b 100644
--- a/etc/config/copyright-exclude
+++ b/etc/config/copyright-exclude
@@ -35,3 +35,4 @@
/LICENSE.md
/README.md
/CONTRIBUTING.md
+/NOTICE.md
diff --git a/jaxb-api-test/pom.xml b/jaxb-api-test/pom.xml
index 6f42867..5f17aab 100644
--- a/jaxb-api-test/pom.xml
+++ b/jaxb-api-test/pom.xml
@@ -24,6 +24,7 @@
<properties>
<config.dir>${project.basedir}/../etc/config</config.dir>
+ <legal.doc.source>${project.basedir}/..</legal.doc.source>
</properties>
<dependencies>
@@ -39,8 +40,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>javax.activation</groupId>
- <artifactId>javax.activation-api</artifactId>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
</dependency>
</dependencies>
@@ -49,7 +50,7 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <release>9</release>
+ <release>11</release>
</configuration>
</plugin>
<plugin>
@@ -75,7 +76,7 @@
<executions>
<execution>
<id>copy</id>
- <phase>test-compile</phase>
+ <phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
@@ -86,14 +87,14 @@
<artifactId>jaxb-api</artifactId>
<version>${project.version}</version>
<overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/mods</outputDirectory>
+ <outputDirectory>${project.build.directory}/modules</outputDirectory>
</artifactItem>
<artifactItem>
- <groupId>javax.activation</groupId>
- <artifactId>javax.activation-api</artifactId>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
<version>${activation.version}</version>
<overWrite>true</overWrite>
- <outputDirectory>${project.build.directory}/mods</outputDirectory>
+ <outputDirectory>${project.build.directory}/modules</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
@@ -101,12 +102,36 @@
</executions>
</plugin>
<plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/classes/META-INF</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${legal.doc.source}</directory>
+ <includes>
+ <include>LICENSE.md</include>
+ <include>NOTICE.md</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <!--module-path ${project.build.directory}/modules/jakarta.activation-api-${activation.version}.jar -->
<argLine>
--add-modules java.xml.bind
- --upgrade-module-path ${project.build.directory}/mods/jaxb-api-${project.version}.jar
- --module-path ${project.build.directory}/mods/javax.activation-api-${activation.version}.jar
+ --upgrade-module-path ${project.build.directory}/modules/jaxb-api-${project.version}.jar
+ --module-path ${project.build.directory}/modules/jakarta.activation-api-${activation.version}.jar
--add-reads java.xml.bind=ALL-UNNAMED
</argLine>
<systemPropertyVariables>
diff --git a/jaxb-api/pom.xml b/jaxb-api/pom.xml
index f23496e..e5ebbd6 100644
--- a/jaxb-api/pom.xml
+++ b/jaxb-api/pom.xml
@@ -24,12 +24,14 @@
<properties>
<config.dir>${project.basedir}/../etc/config</config.dir>
+ <legal.doc.source>${project.basedir}/..</legal.doc.source>
+ <java9.build.outputDirectory>${project.build.directory}/classes-java9</java9.build.outputDirectory>
</properties>
<dependencies>
<dependency>
- <groupId>javax.activation</groupId>
- <artifactId>javax.activation-api</artifactId>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
</dependency>
</dependencies>
@@ -38,10 +40,6 @@
<pluginManagement>
<plugins>
<plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <version>3.1.0</version>
- </plugin>
- <plugin>
<groupId>org.glassfish.build</groupId>
<artifactId>gfnexus-maven-plugin</artifactId>
<version>0.20</version>
@@ -103,10 +101,6 @@
</configuration>
</plugin>
<plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.1.1</version>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
@@ -144,7 +138,7 @@
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
<instructions>
- <Require-Capability>osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=1.8))"</Require-Capability>
+ <_noee>true</_noee>
<Bundle-Version>${project.version}</Bundle-Version> <!-- 2.2.99.bnull -->
<Extension-Name>${extension.name}</Extension-Name>
<Implementation-Version>${spec.version}.${impl.version}</Implementation-Version>
@@ -174,9 +168,7 @@
</Import-Package>
<Bundle-SymbolicName>jaxb-api</Bundle-SymbolicName>
<DynamicImport-Package>org.glassfish.hk2.osgiresourcelocator</DynamicImport-Package>
- <Specification-Vendor>Oracle Corporation</Specification-Vendor>
- <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
- <Implementation-Vendor-Id>org.glassfish</Implementation-Vendor-Id>
+ <Specification-Vendor>${vendor.name}</Specification-Vendor>
</instructions>
</configuration>
</plugin>
@@ -214,18 +206,16 @@
${project.name} specification, ${release.spec.date}<br>
Comments to: <i><a href='mailto:${release.spec.feedback}'>${release.spec.feedback}</a></i><br>
More information at: <i><a target='_top'
-href='http://jaxb.java.net'>http://jaxb.java.net</a></i><br>
+href='https://projects.eclipse.org/projects/ee4j.jaxb'>https://projects.eclipse.org/projects/ee4j.jaxb</a></i><br>
<br> <br><hr width='65%'><h1>${project.name}</h1><hr width='75%'>
<br> <br>]]>
</doctitle>
<header><![CDATA[JAXB<br>v${project.version}]]>
</header>
- <bottom><![CDATA[<font size=-1>
-<br>Comments to: <a href='mailto:${release.spec.feedback}'><i>${release.spec.feedback}</i></a>
-<br>More information at: <a target='_top'
-href='http://jaxb.java.net'><i>http://jaxb.java.net</i></a>
-<p>Copyright © 2004-2017 Oracle </font>]]>
- </bottom>
+ <bottom>
+ <![CDATA[<br>Copyright © {inceptionYear}–{currentYear} {organizationName}.
+ All rights reserved.<br>Comments to : <a href="mailto:${release.spec.feedback}">${release.spec.feedback}</a>.]]>
+ </bottom>
<detectJavaApiLink>false</detectJavaApiLink>
<offlineLinks>
<offlineLink>
@@ -293,6 +283,7 @@
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
+ <id>copy-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
@@ -303,6 +294,36 @@
<resource>
<directory>${basedir}/src/main/mr-jar</directory>
</resource>
+ <resource>
+ <targetPath>${project.build.outputDirectory}/META-INF</targetPath>
+ <directory>${legal.doc.source}</directory>
+ <includes>
+ <include>LICENSE.md</include>
+ <include>NOTICE.md</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-classes</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${java9.build.outputDirectory}</directory>
+ </resource>
+ <!-- Copy module-info.class to java >= 9 classes directory. Source file will be deleted later with ant. -->
+ <resource>
+ <directory>${project.build.outputDirectory}</directory>
+ <includes>
+ <include>module-info.class</include>
+ </includes>
+ </resource>
</resources>
</configuration>
</execution>
@@ -328,6 +349,22 @@
<goal>properties</goal>
</goals>
</execution>
+ <execution>
+ <id>copy</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
+ <outputDirectory>${project.build.directory}/modules</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -356,18 +393,32 @@
</execution>
</executions>
</plugin>
-
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.10.5</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<id>compile-java9</id>
<phase>compile</phase>
<configuration>
<tasks>
- <mkdir dir="${project.build.outputDirectory}/META-INF/versions/9" />
- <javac srcdir="${mrjar.sourceDirectory}" destdir="${project.build.outputDirectory}/META-INF/versions/9" classpath="${project.build.outputDirectory}" includeantruntime="false" source="9" target="9" />
+ <echo>${ant.version}</echo>
+ <!-- Build Java 9+classes -->
+ <mkdir dir="${java9.build.outputDirectory}"/>
+ <javac srcdir="${mrjar.sourceDirectory}"
+ destdir="${java9.build.outputDirectory}"
+ classpath="${project.build.outputDirectory}"
+ modulepath="${project.build.directory}/modules"
+ includeantruntime="false" source="9" target="9">
+ </javac>
</tasks>
</configuration>
<goals>
@@ -388,6 +439,19 @@
<goal>run</goal>
</goals>
</execution>
+ <!-- Delete module-info.class from java < 9 classes directory. -->
+ <execution>
+ <id>update-target-classes</id>
+ <phase>prepare-package</phase>
+ <configuration>
+ <tasks>
+ <delete file="${project.build.outputDirectory}/module-info.class"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/package-info.java b/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/package-info.java
index a6569f0..eec854b 100644
--- a/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/package-info.java
+++ b/jaxb-api/src/main/java/javax/xml/bind/annotation/adapters/package-info.java
@@ -23,9 +23,9 @@
* For overviews, tutorials, examples, guides, and tool documentation,
* please see:
* <ul>
- * <li>The <a href="http://jaxb.java.net">JAXB Website</a>
+ * <li>The <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
* </ul>
*
- * @see <a href="http://jaxb.java.net">JAXB Website</a>
+ * @see <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
*/
package javax.xml.bind.annotation.adapters;
diff --git a/jaxb-api/src/main/java/javax/xml/bind/attachment/package-info.java b/jaxb-api/src/main/java/javax/xml/bind/attachment/package-info.java
index 8882414..214acac 100644
--- a/jaxb-api/src/main/java/javax/xml/bind/attachment/package-info.java
+++ b/jaxb-api/src/main/java/javax/xml/bind/attachment/package-info.java
@@ -23,7 +23,7 @@
* <h2>Package Specification</h2>
* <p>
* <ul>
- * <li><a href="https://jaxb.java.net/">JAXB Specification</a>
+ * <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a>
* </ul>
* <p>
* <h2>Related Standards</h2>
diff --git a/jaxb-api/src/main/java/javax/xml/bind/helpers/package-info.java b/jaxb-api/src/main/java/javax/xml/bind/helpers/package-info.java
index 91753dc..60a13d9 100644
--- a/jaxb-api/src/main/java/javax/xml/bind/helpers/package-info.java
+++ b/jaxb-api/src/main/java/javax/xml/bind/helpers/package-info.java
@@ -19,7 +19,7 @@
* <h2>Package Specification</h2>
*
* <ul>
- * <li><a href="https://jaxb.java.net/">JAXB Specification</a>
+ * <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a>
* </ul>
*
* <h2>Related Documentation</h2>
@@ -27,9 +27,9 @@
* For overviews, tutorials, examples, guides, and tool documentation,
* please see:
* <ul>
- * <li>The <a href="https://jaxb.java.net/">JAXB Website</a>
+ * <li>The <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
* </ul>
*
- * @see <a href="https://jaxb.java.net/">JAXB Website</a>
+ * @see <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
*/
package javax.xml.bind.helpers;
diff --git a/jaxb-api/src/main/java/javax/xml/bind/package-info.java b/jaxb-api/src/main/java/javax/xml/bind/package-info.java
index 249c5fa..ebece0e 100644
--- a/jaxb-api/src/main/java/javax/xml/bind/package-info.java
+++ b/jaxb-api/src/main/java/javax/xml/bind/package-info.java
@@ -20,7 +20,7 @@
* <h2>Package Specification</h2>
* <p>
* <ul>
- * <li><a href="https://jaxb.java.net/">JAXB Specification</a>
+ * <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a>
* </ul>
* <p>
* <h2>Related Documentation</h2>
@@ -28,9 +28,9 @@
* For overviews, tutorials, examples, guides, and tool documentation,
* please see:
* <ul>
- * <li>The <a href="https://jaxb.java.net/">JAXB Website</a>
+ * <li>The <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
* </ul>
*
- * @see <a href="https://jaxb.java.net/">JAXB Website</a>
+ * @see <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
*/
package javax.xml.bind;
diff --git a/jaxb-api/src/main/java/javax/xml/bind/util/package-info.java b/jaxb-api/src/main/java/javax/xml/bind/util/package-info.java
index d26fc70..4573f76 100644
--- a/jaxb-api/src/main/java/javax/xml/bind/util/package-info.java
+++ b/jaxb-api/src/main/java/javax/xml/bind/util/package-info.java
@@ -14,7 +14,7 @@
* <h2>Package Specification</h2>
*
* <ul>
- * <li><a href="https://jaxb.java.net/">JAXB Specification</a>
+ * <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a>
* </ul>
*
* <h2>Related Documentation</h2>
@@ -22,9 +22,9 @@
* For overviews, tutorials, examples, guides, and tool documentation,
* please see:
* <ul>
- * <li>The <a href="https://jaxb.java.net/">JAXB Website</a>
+ * <li>The <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
* </ul>
*
- * @see <a href="https://jaxb.java.net/">JAXB Website</a>
+ * @see <a href="https://projects.eclipse.org/projects/ee4j.jaxb">JAXB Website</a>
*/
package javax.xml.bind.util;
diff --git a/jaxb-api/src/main/java/module-info.java b/jaxb-api/src/main/java/module-info.java
index 907d2f5..1d52680 100644
--- a/jaxb-api/src/main/java/module-info.java
+++ b/jaxb-api/src/main/java/module-info.java
@@ -9,7 +9,7 @@
*/
module java.xml.bind {
- requires transitive java.activation;
+ requires transitive jakarta.activation;
requires transitive java.xml;
requires java.logging;
requires java.desktop;
diff --git a/jaxb-api/src/main/resources/META-INF/LICENSE.txt b/jaxb-api/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index c739f78..0000000
--- a/jaxb-api/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-
- Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of the Eclipse Foundation, Inc. nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pom.xml b/pom.xml
index 500f69e..70f3416 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.ee4j</groupId>
<artifactId>project</artifactId>
- <version>1.0.2</version>
+ <version>1.0.4</version>
</parent>
<groupId>jakarta.xml.bind</groupId>
@@ -52,11 +52,6 @@
</developer>
</developers>
- <organization>
- <name>Oracle Corporation</name>
- <url>http://www.oracle.com/</url>
- </organization>
-
<issueManagement>
<system>github</system>
<url>https://github.com/eclipse-ee4j/jaxb-api/issues</url>
@@ -73,7 +68,7 @@
</mailingLists>
<properties>
- <release.spec.feedback>javaee-spec@javaee.groups.io</release.spec.feedback>
+ <release.spec.feedback>jaxb-dev@eclipse.org</release.spec.feedback>
<release.spec.date>Jul 2017</release.spec.date>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<findbugs.threshold>Low</findbugs.threshold>
@@ -82,8 +77,9 @@
<extension.name>javax.xml.bind</extension.name>
<spec.version>2.3</spec.version>
<impl.version>0</impl.version>
- <activation.version>1.2.0</activation.version>
+ <activation.version>1.2.1</activation.version>
<config.dir>${project.basedir}/etc/config</config.dir>
+ <vendor.name>Eclipse Project for JAXB</vendor.name>
</properties>
<modules>
@@ -94,8 +90,8 @@
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>javax.activation</groupId>
- <artifactId>javax.activation-api</artifactId>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
<version>${activation.version}</version>
</dependency>
</dependencies>
@@ -134,6 +130,10 @@
<version>3.0.1</version>
</plugin>
<plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>