Skip to content

Commit a414fed

Browse files
Copilotslachiewiczslawekjaranowski
authored
Add module-info.java for JPMS support using multi-release JAR (#90)
* Add module-info.java and configure multi-release compilation Co-authored-by: slachiewicz <[email protected]> * Move module compilation to java9+ profile activated on JDK 9+ Co-authored-by: slawekjaranowski <[email protected]> * Move module-info.java to src/main/java9 for multi-release JAR Co-authored-by: slawekjaranowski <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: slachiewicz <[email protected]> Co-authored-by: slawekjaranowski <[email protected]> Co-authored-by: Sylwester Lachiewicz <[email protected]>
1 parent 334c801 commit a414fed

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

pom.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,48 @@
9898
</plugins>
9999
</build>
100100

101+
<profiles>
102+
<profile>
103+
<id>java9+</id>
104+
<activation>
105+
<jdk>[9,)</jdk>
106+
</activation>
107+
<build>
108+
<plugins>
109+
<plugin>
110+
<groupId>org.apache.maven.plugins</groupId>
111+
<artifactId>maven-compiler-plugin</artifactId>
112+
<executions>
113+
<execution>
114+
<id>compile-java9</id>
115+
<goals>
116+
<goal>compile</goal>
117+
</goals>
118+
<phase>compile</phase>
119+
<configuration>
120+
<release>9</release>
121+
<compileSourceRoots>
122+
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
123+
</compileSourceRoots>
124+
<multiReleaseOutput>true</multiReleaseOutput>
125+
</configuration>
126+
</execution>
127+
</executions>
128+
</plugin>
129+
<plugin>
130+
<groupId>org.apache.maven.plugins</groupId>
131+
<artifactId>maven-jar-plugin</artifactId>
132+
<configuration>
133+
<archive>
134+
<manifestEntries>
135+
<Multi-Release>true</Multi-Release>
136+
</manifestEntries>
137+
</archive>
138+
</configuration>
139+
</plugin>
140+
</plugins>
141+
</build>
142+
</profile>
143+
</profiles>
144+
101145
</project>

src/main/java9/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module org.codehaus.plexus.interpolation {
2+
exports org.codehaus.plexus.interpolation;
3+
}

0 commit comments

Comments
 (0)