You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MSOURCES-141] Check duplication of attached jar should be configurable to not fail when using the build cache #200
because MSOURCES-121 using source jar mojo and build cache generate an error as the cache restore a project with attached artifacts and so the source mojo fail because of this.
Caused by: org.apache.maven.plugin.MojoExecutionException: Presumably you have configured maven-source-plugn to execute twice times in your build. You have to configure a classifier for at least on of them.
at org.apache.maven.plugins.source.AbstractSourceJarMojo.packageSources (AbstractSourceJarMojo.java:309)
at org.apache.maven.plugins.source.AbstractSourceJarMojo.packageSources (AbstractSourceJarMojo.java:257)
at org.apache.maven.plugins.source.AbstractSourceJarMojo.execute (AbstractSourceJarMojo.java:225)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.restoreProject (BuildCacheMojosExecutionStrategy.java:224)
at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute (BuildCacheMojosExecutionStrategy.java:131)
Ran into this issue as well, and in my view. I'm not knowingly using any build cache, but run into this issue when putting to sequential lifecycle phases on a CLI invocation (e.g. mvn verify sonar:sonar deploy in the practical build pipeline usage to ensure that all binaries are available to run SonarQube before deploying a new snapshot.
It's reproducible with a slightly modified version of the simple archetype (only adding the source plugin and configuring its jar-no-fork execution (see attached).
This issue is stale because it has been waiting for feedback for 60 days. Remove the stale label or comment on this issue, or it will be automatically closed in 30 days.
Activity
jira-importer commentedon Sep 19, 2023
Hans Aikema commented
Ran into this issue as well, and in my view. I'm not knowingly using any build cache, but run into this issue when putting to sequential lifecycle phases on a CLI invocation (e.g.
mvn verify sonar:sonar deployin the practical build pipeline usage to ensure that all binaries are available to run SonarQube before deploying a new snapshot.It's reproducible with a slightly modified version of the simple archetype (only adding the source plugin and configuring its jar-no-fork execution (see attached).
Working:
Breaking:
jira-importer commentedon Sep 20, 2023
Cheng Pan commented
it also breaks creating a shaded source jar
slawekjaranowski commentedon Apr 26, 2026
te retest after:
github-actions commentedon Jun 26, 2026
This issue is stale because it has been waiting for feedback for 60 days. Remove the stale label or comment on this issue, or it will be automatically closed in 30 days.
github-actions commentedon Jul 27, 2026
This issue has been closed because no response was received within 90 days.