Skip to content

Commit

Permalink
[Improvement] Introduce apache-release and docs-and-source profile
Browse files Browse the repository at this point in the history
  • Loading branch information
SteNicholas committed Sep 9, 2024
1 parent 75e6a3c commit c072349
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,82 @@ under the License.
</dependencies>
</dependencyManagement>

<profiles>
<!--
We're reusing the apache-release build profile defined in the Apache Parent POM,
with one exclusion: do not run the source-release-assembly execution goal.
We have our own scripts to create the source release, which correctly excludes
binaries from distribution tarball.
The script can be found under tools/releasing/create_source_release.sh.
-->
<profile>
<id>apache-release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.apache.apache.resources</groupId>
<artifactId>apache-source-release-assembly-descriptor</artifactId>
<version>1.0.6</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>source-release-assembly</id>
<!-- disable the execution -->
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>docs-and-source</id>
<activation>
<property>
<name>docs-and-source</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<quiet>true</quiet>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand Down

0 comments on commit c072349

Please sign in to comment.