Skip to content

Commit

Permalink
Add javadoc/source plugins for "-Ddeploy"
Browse files Browse the repository at this point in the history
We may want to "mvn deploy" with "-Dignorant" to suppress any code
validation upon deploy. However, we need javadoc and source plugins to
generate the corresponding output for the deploy to succeed.
  • Loading branch information
kohlschuetter committed Jun 27, 2024
1 parent 7d0f13f commit 40a6e60
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,67 @@
</plugins>
</build>
</profile>
<profile>
<id>deploy-javadoc</id>
<activation>
<property>
<name>deploy</name>
<value>true</value>
</property>
<file>
<exists>src/main/java</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<!-- work-around for error message: -->
<!-- Error while generating Javadoc: Aggregator report contains named and unnamed modules -->
<!-- <sourceFileExcludes>**/module-info.java</sourceFileExcludes> -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy-sources</id>
<activation>
<property>
<name>deploy</name>
<value>true</value>
</property>
<file>
<exists>src</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
<inherited>true</inherited>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<activation>
Expand Down

0 comments on commit 40a6e60

Please sign in to comment.