Skip to content

Commit

Permalink
Add module-info and compile it with Java 9+
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Aug 15, 2023
1 parent 0672e46 commit efb1073
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Source/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
open module com.drew.imaging {
requires xmpcore;
}
64 changes: 55 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,61 @@
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
<profile>
<id>build-module-info-disabled</id>
<activation>
<jdk>(,1.8]</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>build-module-info</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<release>7</release>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<release>9</release>
</configuration>
</execution>
<execution>
<id>base-compile</id>
<goals><goal>compile</goal></goals>
<configuration>
<excludes><exclude>module-info.java</exclude></excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
Expand All @@ -114,15 +169,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down

0 comments on commit efb1073

Please sign in to comment.