Skip to content

Commit 8ffef35

Browse files
authored
chore: add a dedicated javadoc Maven profile (#529)
Javadoc is not generated by default. The "Build and Test" GitHub action is run with that profile to validate Javadoc. This fixes #525 Signed-off-by: Jeff Mesnil <[email protected]>
1 parent cd32276 commit 8ffef35

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
distribution: 'temurin'
2727
cache: maven
2828
- name: Build with Maven and run tests
29-
run: mvn -B package --file pom.xml -fae
29+
run: mvn -Pjavadoc -B package --file pom.xml -fae
3030
- name: Upload Test Reports
3131
if: failure()
3232
uses: actions/upload-artifact@v4

pom.xml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,6 @@
454454
<groupId>org.apache.maven.plugins</groupId>
455455
<artifactId>maven-compiler-plugin</artifactId>
456456
</plugin>
457-
<plugin>
458-
<groupId>org.apache.maven.plugins</groupId>
459-
<artifactId>maven-javadoc-plugin</artifactId>
460-
</plugin>
461457
<plugin>
462458
<groupId>org.apache.maven.plugins</groupId>
463459
<artifactId>maven-surefire-plugin</artifactId>
@@ -508,6 +504,20 @@
508504
</modules>
509505

510506
<profiles>
507+
<profile>
508+
<!--
509+
This profile generates the required javadoc.
510+
-->
511+
<id>javadoc</id>
512+
<build>
513+
<plugins>
514+
<plugin>
515+
<groupId>org.apache.maven.plugins</groupId>
516+
<artifactId>maven-javadoc-plugin</artifactId>
517+
</plugin>
518+
</plugins>
519+
</build>
520+
</profile>
511521
<profile>
512522
<!--
513523
This profile generates the required sources and javadoc in order to be able to deploy.
@@ -520,6 +530,10 @@
520530
<groupId>org.apache.maven.plugins</groupId>
521531
<artifactId>maven-source-plugin</artifactId>
522532
</plugin>
533+
<plugin>
534+
<groupId>org.apache.maven.plugins</groupId>
535+
<artifactId>maven-javadoc-plugin</artifactId>
536+
</plugin>
523537
<plugin>
524538
<groupId>org.apache.maven.plugins</groupId>
525539
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)