Skip to content

Commit eba9e76

Browse files
committed
Fix building Javadoc JARs on JDK for client JARs (#29274)
When a module or plugin register that it has a client JAR, we copy artifacts like the Javadoc and sources JARs as the JARs for the client as well (with -client added to the name). I previously had to disable the Javadoc task on JDK 10 due to a bug in bin/javadoc. After JDK 10 went GA without a fix for this bug, I added workaround to fix the Javadoc task on JDK 10. However, I made a mistake reverting the previously skipped Javadocs tasks and missed that one that copies the Javadoc JAR for client JARs. This commit fixes that issue.
1 parent 7e1cea9 commit eba9e76

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,10 @@ public class PluginBuildPlugin extends BuildPlugin {
168168
Files.copy(jarFile.resolveSibling(sourcesFileName), jarFile.resolveSibling(clientSourcesFileName),
169169
StandardCopyOption.REPLACE_EXISTING)
170170

171-
if (project.compilerJavaVersion < JavaVersion.VERSION_1_10) {
172-
String javadocFileName = jarFile.fileName.toString().replace('.jar', '-javadoc.jar')
173-
String clientJavadocFileName = clientFileName.replace('.jar', '-javadoc.jar')
174-
Files.copy(jarFile.resolveSibling(javadocFileName), jarFile.resolveSibling(clientJavadocFileName),
175-
StandardCopyOption.REPLACE_EXISTING)
176-
}
171+
String javadocFileName = jarFile.fileName.toString().replace('.jar', '-javadoc.jar')
172+
String clientJavadocFileName = clientFileName.replace('.jar', '-javadoc.jar')
173+
Files.copy(jarFile.resolveSibling(javadocFileName), jarFile.resolveSibling(clientJavadocFileName),
174+
StandardCopyOption.REPLACE_EXISTING)
177175
}
178176
project.assemble.dependsOn(clientJar)
179177
}

0 commit comments

Comments
 (0)