Skip to content

Commit

Permalink
Generate source jar only once
Browse files Browse the repository at this point in the history
  • Loading branch information
atextor committed Nov 8, 2024
1 parent a9d1cee commit 81e2740
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,27 @@
</build>

<profiles>
<!--
This profile is active by default and will disable the generation of the source jar.
When the native profile (see below) is active, the source jar will be generated.
If we don't do it like this, the source jar is created and attached twice, which
trips up Maven: "We have duplicated artifacts attached."
-->
<profile>
<id>non-native</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.source.skip>true</maven.source.skip>
</properties>
</profile>

<profile>
<id>native</id>
<properties>
<maven.source.skip>false</maven.source.skip>
</properties>
<build>
<plugins>
<plugin>
Expand Down

0 comments on commit 81e2740

Please sign in to comment.