Skip to content

Commit

Permalink
Add Automatic-Module-Name to JAR to provide JDK-9 support.
Browse files Browse the repository at this point in the history
Any builds on JDK-9 or newer that use modules and have this
dependency will currently produce a warning:

    Required filename-based automodules detected: [jimfs-1.2.jar]. Please don't publish this project to a public artifact repository!

This should address that issue. For all other purposes this JAR appears to work fine in Java 9
and newer (I am currently using it for a JDK-17-based project).

Fixes #180

COPYBARA_INTEGRATE_REVIEW=#180 from ascopes:task/java9-module-support eec44a2
PiperOrigin-RevId: 525264585
  • Loading branch information
ascopes authored and Jimfs Team committed Apr 18, 2023
1 parent 8428991 commit 6a057ff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@
</annotationProcessorPaths>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.google.common.jimfs</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 6a057ff

Please sign in to comment.