Skip to content

Commit

Permalink
#19: Provide JPMS descriptors
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <[email protected]>
  • Loading branch information
lukasj committed Nov 26, 2019
1 parent ca8976b commit b69bc58
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 16 deletions.
17 changes: 17 additions & 0 deletions api-only/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2019 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
*/

module gmbal {
requires java.logging;
requires transitive java.management;

exports org.glassfish.gmbal;
exports org.glassfish.pfl.tf.timer.spi;
}
2 changes: 1 addition & 1 deletion impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<configuration>
<includeArtifactIds>gmbal-api-only</includeArtifactIds>
<classifier>sources</classifier>
<excludes>**/pfl/**,META-INF/**</excludes>
<excludes>module-info.*,**/pfl/**,META-INF/**</excludes>
<outputDirectory>${project.build.directory}/generated-sources/api</outputDirectory>
</configuration>
</execution>
Expand Down
17 changes: 17 additions & 0 deletions impl/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2019 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
*/

module gmbal {
requires java.logging;
requires transitive java.management;

exports org.glassfish.gmbal;
exports org.glassfish.gmbal.impl.trace;
}
55 changes: 40 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</mailingLists>

<properties>
<jdkVersion>1.8</jdkVersion>
<jdkVersion>8</jdkVersion>
<pfl.version>4.1.0</pfl.version>
<gmbal.commons.version>3.2.2</gmbal.commons.version>
<legal.doc.source>${project.basedir}/..</legal.doc.source>
Expand Down Expand Up @@ -148,16 +148,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>${jdkVersion}</source>
<target>${jdkVersion}</target>
</configuration>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.0</version>
<version>4.2.1</version>
</plugin>
<!-- override default "built-by" entry, which points to a developer's user id -->
<plugin>
Expand All @@ -167,10 +163,6 @@
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestEntries>
<Built-By>Oracle</Built-By>
<Automatic-Module-Name>gmbal</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
Expand All @@ -192,10 +184,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.1</version>
<configuration>
<detectJavaApiLink>false</detectJavaApiLink>
<detectOfflineLinks>false</detectOfflineLinks>
<release>${jdkVersion}</release>
<sourceFileExcludes>
<sourceFileExclude>module-info.java</sourceFileExclude>
</sourceFileExcludes>
</configuration>
</plugin>
<plugin>
Expand All @@ -207,6 +201,38 @@
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>9</release>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>--add-reads</arg>
<arg>gmbal=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</execution>
<execution>
<id>base-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>${jdkVersion}</release>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>

<!-- prevent the site plugin from deploying to the scm url -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
Expand Down Expand Up @@ -292,7 +318,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<reportSets>
<reportSet>
<id>javadoc-only</id>
Expand Down

0 comments on commit b69bc58

Please sign in to comment.