Skip to content

Commit 81e2740

Browse files
committed
Generate source jar only once
1 parent a9d1cee commit 81e2740

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,27 @@
281281
</build>
282282

283283
<profiles>
284+
<!--
285+
This profile is active by default and will disable the generation of the source jar.
286+
When the native profile (see below) is active, the source jar will be generated.
287+
If we don't do it like this, the source jar is created and attached twice, which
288+
trips up Maven: "We have duplicated artifacts attached."
289+
-->
290+
<profile>
291+
<id>non-native</id>
292+
<activation>
293+
<activeByDefault>true</activeByDefault>
294+
</activation>
295+
<properties>
296+
<maven.source.skip>true</maven.source.skip>
297+
</properties>
298+
</profile>
299+
284300
<profile>
285301
<id>native</id>
302+
<properties>
303+
<maven.source.skip>false</maven.source.skip>
304+
</properties>
286305
<build>
287306
<plugins>
288307
<plugin>

0 commit comments

Comments
 (0)