Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
With the upgrade of the version of the plugin
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
to the version 3.3.1, the execution added to the pom
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
is not supported anymore because there is already a configuration added to the org.apache parent.
Here is its definition:
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
Its means that the jar will be already added to the sources. If we keep the configuration in the unomi POM it will generate a duplication and will throw the following error on the build:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.878 s
[INFO] Finished at: 2025-11-03T09:16:49+01:00
[INFO] ------------------------------------------------------------------------
[INFO] 58 goals, 58 executed
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-source-plugin:3.3.1:jar (attach-sources) on project unomi-api: Presumably you have configured maven-source-plugin to execute twice in your build. You have to configure a classifier for at least one of them. -> [Help 1]
[ERROR]