You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alexander Kriegisch (Jira)" <ji...@apache.org> on 2021/04/07 15:49:00 UTC

[jira] [Commented] (MDEPLOY-254) Maven Deploy Plugin deploy jar twice : Maven 3.3.3

    [ https://issues.apache.org/jira/browse/MDEPLOY-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17316438#comment-17316438 ] 

Alexander Kriegisch commented on MDEPLOY-254:
---------------------------------------------

This still happens with Maven 3.6.3 and Maven Shade with {{<createSourcesJar>true</createSourcesJar>}}. The thing is, if I do not configure Maven Source Plugin to run, I get lots of ugly conflict warnings during non-clean builds, because Maven Shade tries re-shading an already existing source JAR. The only way to avoid this is to even configure an additional
{code:xml}
<!-- Re-create original source JAR in order to avoid re-shading already shaded JAR in non-clean builds -->
<forceCreation>true</forceCreation>
{code}
But then I get the duplicate uploads during deploy and e.g. on GitHub Packages an error like: 
{code:java}
Transfer failed for (...)xyz-sources.jar 409 Conflict
{code}
This might be a conceptual problem in Maven itself, a shortcoming in Shade or Source, I really don't know and have no intention to get philosophical about something other people here know way more about. what I am sure about, though, is that this is a real problem many people are struggling with and nothing has happened to effectively fix it. Just sweeping this under the rug and closing it as "won't fix" because nobody dares to touch it certainly will not fix the problem.

> Maven Deploy Plugin deploy jar twice : Maven 3.3.3
> --------------------------------------------------
>
>                 Key: MDEPLOY-254
>                 URL: https://issues.apache.org/jira/browse/MDEPLOY-254
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>            Reporter: Akshay
>            Assignee: Karl Heinz Marbaise
>            Priority: Blocker
>             Fix For: waiting-for-feedback, wontfix-candidate
>
>         Attachments: log1-mvn_clean_deploy_-Ptwice-source-jar-goal.txt, log2-mvn_clean_deploy_-Psource-and-shade-plugin.txt, sample-project.zip
>
>
> Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project ****** :
> Failed to retrieve remote metadata ******/maven-metadata.xml:
> Could not transfer metadata ****** from/to ****** 
> {color:#FF0000} Not authorized , ReasonPhrase:Unauthorized. {color}
>  
> Wanted to know if the fix is out in a later version of Maven?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)