Skip to content

Commit

Permalink
Adds explicit Java module descriptor (#728)
Browse files Browse the repository at this point in the history
Resolves #727

Signed-off-by: Andres Almiray <aalmiray@gmail.com>
  • Loading branch information
aalmiray committed Apr 29, 2023
1 parent a3eccdf commit cff8961
Showing 1 changed file with 59 additions and 35 deletions.
94 changes: 59 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,41 +186,6 @@
</instructions>
</configuration>
</plugin>
<!--
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0.RC1</version>
<executions>
<execution>
<id>add-module-info</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<jvmVersion>9</jvmVersion>
<module>
<moduleInfoSource>
module com.networknt.schema {
requires transitive com.fasterxml.jackson.databind;
requires org.apache.commons.lang3;
requires org.jruby.jcodings;
requires org.jruby.joni;
requires org.slf4j;
exports com.networknt.schema;
exports com.networknt.schema.format;
exports com.networknt.schema.uri;
exports com.networknt.schema.urn;
}
</moduleInfoSource>
</module>
</configuration>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
Expand Down Expand Up @@ -381,5 +346,64 @@
</plugins>
</build>
</profile>
<profile>
<id>java-module</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0.RC3</version>
<executions>
<execution>
<id>add-module-infos</id>
<phase>package</phase>
<goals>
<goal>add-module-info</goal>
</goals>
<configuration>
<jvmVersion>9</jvmVersion>
<overwriteExistingFiles>true</overwriteExistingFiles>
<module>
<moduleInfo>
<name>com.networknt.schema</name>
<!-- export everything -->
<exports>*;</exports>
<!-- declare services consumed by the artifact -->
<addServiceUses>true</addServiceUses>
</moduleInfo>
</module>
<!--
previously configured but commented out
<module>
<moduleInfoSource>
module com.networknt.schema {
requires transitive com.fasterxml.jackson.databind;
requires org.apache.commons.lang3;
requires org.jruby.jcodings;
requires org.jruby.joni;
requires org.slf4j;
exports com.networknt.schema;
exports com.networknt.schema.format;
exports com.networknt.schema.uri;
exports com.networknt.schema.urn;
}
</moduleInfoSource>
</module>
-->
<jdepsExtraArgs>
<arg>--multi-release=9</arg>
</jdepsExtraArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit cff8961

Please sign in to comment.