Skip to content

Commit f5f1f07

Browse files
Copilotslachiewicz
andcommitted
Add module-info.java and configure multi-release compilation
Co-authored-by: slachiewicz <[email protected]>
1 parent 1b7b3c3 commit f5f1f07

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,39 @@
6767
</instructions>
6868
</configuration>
6969
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-compiler-plugin</artifactId>
73+
<!-- defaults for compile and testCompile -->
74+
<configuration>
75+
<!-- Only required when JAVA_HOME isn't at least Java 9 and when haven't configured the maven-toolchains-plugin -->
76+
<jdkToolchain>
77+
<version>9</version>
78+
</jdkToolchain>
79+
<release>8</release>
80+
</configuration>
81+
<executions>
82+
<execution>
83+
<id>default-compile</id>
84+
<configuration>
85+
<!-- compile everything to ensure module-info contains right entries -->
86+
<release>9</release>
87+
</configuration>
88+
</execution>
89+
<execution>
90+
<id>base-compile</id>
91+
<goals>
92+
<goal>compile</goal>
93+
</goals>
94+
<!-- recompile everything for target VM except the module-info.java -->
95+
<configuration>
96+
<excludes>
97+
<exclude>module-info.java</exclude>
98+
</excludes>
99+
</configuration>
100+
</execution>
101+
</executions>
102+
</plugin>
70103
<plugin>
71104
<groupId>org.apache.maven.plugins</groupId>
72105
<artifactId>maven-scm-publish-plugin</artifactId>

src/main/java/module-info.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module org.codehaus.plexus.interpolation {
2+
exports org.codehaus.plexus.interpolation;
3+
exports org.codehaus.plexus.interpolation.fixed;
4+
exports org.codehaus.plexus.interpolation.multi;
5+
exports org.codehaus.plexus.interpolation.object;
6+
exports org.codehaus.plexus.interpolation.os;
7+
exports org.codehaus.plexus.interpolation.reflection;
8+
exports org.codehaus.plexus.interpolation.util;
9+
}

0 commit comments

Comments
 (0)