📝 Build javadoc and archive it correctly
authorDavid Roden <github-a8in@qsheltier.de>
Sun, 11 May 2025 09:00:17 +0000 (11:00 +0200)
committerDavid Roden <github-a8in@qsheltier.de>
Sun, 11 May 2025 09:00:17 +0000 (11:00 +0200)
Jenkinsfile
pom.xml

index e84b7dd..e6779e9 100644 (file)
@@ -40,7 +40,7 @@ pipeline {
                 configFileProvider([configFile(fileId: 'fb50fa11-48a8-44b8-84fd-e11f06ab1067', targetLocation: 'toolchains.xml')]) {
                     sh './mvnw -t toolchains.xml -DskipTests=true package'
                     archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
-                    javadoc javadocDir: '**/target/apidocs', keepAll: true
+                    javadoc javadocDir: 'target/site/apidocs', keepAll: true
                 }
             }
         }
diff --git a/pom.xml b/pom.xml
index 934eca5..86e07ae 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                        <version>3.13.0</version>
                                </plugin>
                                <plugin>
+                                       <groupId>org.apache.maven.plugins</groupId>
+                                       <artifactId>maven-javadoc-plugin</artifactId>
+                                       <version>3.6.3</version>
+                               </plugin>
+                               <plugin>
                                        <artifactId>maven-surefire-plugin</artifactId>
                                        <version>3.3.1</version>
                                </plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-toolchains-plugin</artifactId>
                        </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>aggregate</goal>
+                                               </goals>
+                                               <phase>package</phase>
+                                       </execution>
+                               </executions>
+                       </plugin>
                </plugins>
        </build>