Skip to content

Commit 61b352e

Browse files
committed
build-helper: add java9 sources
Properly register java9 sources for inclusion into javadoc and sources JAR.
1 parent 341ec54 commit 61b352e

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

pom.xml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@
7979
<target>${maven.compiler.target}</target>
8080
</configuration>
8181
<executions>
82+
<execution>
83+
<id>default-compile</id>
84+
<configuration>
85+
<release>${base.java.version}</release>
86+
<compileSourceRoots>
87+
<compileSourceRoot>${project.build.sourceDirectory}</compileSourceRoot>
88+
</compileSourceRoots>
89+
</configuration>
90+
</execution>
8291
<execution>
8392
<id>java9-compile</id>
8493
<phase>compile</phase>
@@ -206,6 +215,25 @@
206215
</execution>
207216
</executions>
208217
</plugin>
218+
<plugin>
219+
<groupId>org.codehaus.mojo</groupId>
220+
<artifactId>build-helper-maven-plugin</artifactId>
221+
<version>3.3.0</version>
222+
<executions>
223+
<execution>
224+
<id>java9-source</id>
225+
<phase>generate-sources</phase>
226+
<goals>
227+
<goal>add-source</goal>
228+
</goals>
229+
<configuration>
230+
<sources>
231+
<source>${project.basedir}/src/main/java9</source>
232+
</sources>
233+
</configuration>
234+
</execution>
235+
</executions>
236+
</plugin>
209237
</plugins>
210238
</build>
211239

@@ -233,9 +261,6 @@
233261
<goals>
234262
<goal>jar</goal>
235263
</goals>
236-
<configuration>
237-
<sourcepath>${project.build.sourceDirectory};${project.basedir}/src/main/java9</sourcepath>
238-
</configuration>
239264
</execution>
240265
</executions>
241266
</plugin>

0 commit comments

Comments
 (0)