include legal doc in the final jar, fixed javadoc (#19)
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a6f89c2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/target/
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index bbecbd1..603cbe8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.3-SNAPSHOT</version>
-
+
<properties>
<non.final>false</non.final>
<spec.version>1.3</spec.version>
@@ -90,26 +90,14 @@
</mailingLists>
<build>
-
- <resources>
- <resource>
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.properties</include>
- <include>**/*.html</include>
- </includes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <excludes>
- <exclude>META-INF/README</exclude>
- </excludes>
- </resource>
- </resources>
-
<pluginManagement>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ </plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
@@ -126,7 +114,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.6</version>
+ <version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -173,6 +161,31 @@
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-resource</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>add-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${basedir}</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>LICENSE.md</include>
+ <include>NOTICE.md</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
@@ -248,29 +261,10 @@
</Automatic-Module-Name>
</manifestEntries>
</archive>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-remote-resources-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <resourceBundles>
- <resourceBundle>org.glassfish:legal:1.1</resourceBundle>
- </resourceBundles>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<includePom>true</includePom>
@@ -279,7 +273,7 @@
<execution>
<id>attach-sources</id>
<goals>
- <goal>jar-no-fork</goal>
+ <goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
@@ -288,12 +282,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
- <execution>
+ <execution>
<id>attach-javadocs</id>
- <goals>
+ <goals>
<goal>jar</goal>
</goals>
- </execution>
+ </execution>
<execution>
<phase>javadoc</phase>
<goals>
@@ -306,14 +300,6 @@
<packages>javax.annotation</packages>
</group>
</groups>
- <bottom>
-<![CDATA[Copyright © 1999-2017,
- <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>.
-]]>
- </bottom>
</configuration>
</execution>
</executions>
diff --git a/src/main/java/javax/annotation/package-info.java b/src/main/java/javax/annotation/package-info.java
new file mode 100644
index 0000000..e83458c
--- /dev/null
+++ b/src/main/java/javax/annotation/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2018 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
+ */
+
+/**
+ * This package defines the common annotations.
+ */
+package javax.annotation;
diff --git a/src/main/java/javax/annotation/package.html b/src/main/java/javax/annotation/package.html
deleted file mode 100644
index 4e01dd2..0000000
--- a/src/main/java/javax/annotation/package.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-
- Copyright (c) 2005, 2018 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
-
--->
-
-<html>
-<body>
- This package defines the common annotations.
-</body>
-</html>
diff --git a/src/main/java/javax/annotation/security/package-info.java b/src/main/java/javax/annotation/security/package-info.java
new file mode 100644
index 0000000..acbd454
--- /dev/null
+++ b/src/main/java/javax/annotation/security/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2018 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
+ */
+
+/**
+ * This package contains the security common annotations.
+ */
+package javax.annotation.security;
diff --git a/src/main/java/javax/annotation/security/package.html b/src/main/java/javax/annotation/security/package.html
deleted file mode 100644
index f3b4a0d..0000000
--- a/src/main/java/javax/annotation/security/package.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-
- Copyright (c) 2005, 2018 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
-
--->
-
-<html>
-<body>
- This package contains the security common annotations.
-</body>
-</html>