hohwille commented on issue #205: URL: https://github.com/apache/maven-source-plugin/issues/205#issuecomment-3796850078
I just got the same error message after upgrading to Java 25 in my OSS project: https://github.com/m-m-m/l10n/actions/runs/21334428605/job/61404089966 Might not be the exact same reason but the same error messages. Also found this related GitHub issue: https://github.com/apache/arrow-java/issues/92 and this StackOverflow thread: https://stackoverflow.com/questions/4251488/maven-release-plugin-fails-source-artifacts-getting-deployed-twice Form the StackOverflow thread I found this: > My pom file had maven-source-plugin with the goal of jar-no-fork.But maven root pom file has the same plugin with the goal of jar. Hence the effective-pom generated has both the goals. This causes the duplicate attempt to push sources.jar. Once i removed the jar-no-fork goal in my pom, the default jar goal was the only one left and the build succeeded. For my usage it did not matter if it was jar or jar-no-fork. I applied this suggested change: https://github.com/m-m-m/parent/commit/9b02c36d7e95b825712acb069043e45d59f2fdaa But it did not fix anything in my case: https://github.com/m-m-m/l10n/actions/runs/21334745630 I first build the project in the workflow ``` mvn ... install ``` And then do the deployment in a second pipeline stage: ``` mvn ... -DskipTests=true -Dmaven.install.skip=true deploy ``` ## I then found my stupid mistake: In the `deploy` step I did some global search & replace to tidy up my workflows and maven options that caused a `mvn ... install ... deploy` what is reproducibility causing the error. https://github.com/m-m-m/l10n/commit/d80ad619b65804966a1c4a41a74e32a2fe833990 So the problem also had nothing to do with the Java 25 update (what I before considered the only relevant change). Maybe this could help to trace down the problem. I do not see a critical bug in maven-source-plugin here from my PoV but rather a user or configuration problem. Still you might want to revisit if you can improve something for UX. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
