You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jörg Hohwiller (Jira)" <ji...@apache.org> on 2020/07/27 16:07:00 UTC

[jira] [Commented] (MDEPLOY-266) More verbose output for deployment to trace down errors (esp. 401)

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

Jörg Hohwiller commented on MDEPLOY-266:
----------------------------------------

Surely this can not be addressed easily in wagen for instance.

However, it should be easy to find code where the password is resolved and passed to a lower-level component such as wagon.

In that place it should be possible to log a warning when the password is empty/null.

Further it could be possible to log on info the username that is passed.

With these two log statements a lot of value could be created preventing hours of debugging and analysis in the entire community.

> More verbose output for deployment to trace down errors (esp. 401)
> ------------------------------------------------------------------
>
>                 Key: MDEPLOY-266
>                 URL: https://issues.apache.org/jira/browse/MDEPLOY-266
>             Project: Maven Deploy Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.8.2
>            Reporter: Jörg Hohwiller
>            Priority: Major
>
> There are many reasons why a deployment of maven artifacts can fail:
>  * network error
>  * error on server side in repo server
>  * no login configured
>  * wrong login configured 
>  * no password configured
>  * wrong password configured (password may be encrypted so even almost impossible to determine)
>  * repository ID in distribution-management and server ID in settings.xml do not match
>  * etc.
> It is really hard to check all the possibilities (please note that the distributionManagement may be configured in a parent^N pom and out of sight so you need to print the effective-pom. Many Maven users even do not have a clue how to do that). However, maven-deploy-plugin only prints that the deployment failed and an HTTP status code (typically 401). But this is very little information. Tons of users are therefore waisting their own time and especially also the time of others (e.g. OSSRH team) to trace down the reason.
> It should be trivial for maven-deploy-plugin to log some more information:
>  * ID of repository that deployment is going to use
>  * whether a server tag from settings.xml could be resolved for this ID
>  * the login that is used for the deployment or a WARNING if login is undefined
>  * WARNING if password is undefined (obviously you should not log the password)
> With this simple information users could save many hours/days of valuable time to trace down errors more easily.
>  



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