Just to add my 50ct ... I too encountered a similar problem a few days ago and 
am still having it.

While I had a settings.xml that worked fine for ages I got the exact same 
Unauthorized errors. 
At first I thought I had a problem in my settings but I couldn't find one. I 
"resolved" the problem, by disabling the settings.xml and pulling from maven 
central instead of my private repo ... but that's not a real resolution.

I was also using a pretty recent 3.3.x version (not the 3.3.9 cause it breaks 
most of my important plugins)
My repo is an Artifactory (Haven't updated that for quite some time)

As I don't seem to be alone with this eventually I'll use Wireshark investigate 
what's going over the wire. Mabe this will help find out what's going wrong.

Chris

________________________________________
Von: Mehul Sanghvi <[email protected]>
Gesendet: Dienstag, 9. Februar 2016 15:02
An: Maven Users List
Cc: [email protected]
Betreff: Re: debugging maven-deploy-plugin:deploy-file

The repositoryId is the same for both.  They are getting uploaded to the
same repository.

So face I have tested the following:

1.  verified username/password by logging into the web ui

2.  verified that server id in settings.xml matches the distribution
repository id in the pom.xml

3.  verified correct settings.xml was being used.  I used

               mvn help:effective-settings

4.  verified the url is correct and the protocol being used is http and not
https

5.  using one of the latest versions of maven i.e. 3.3.3





On Tue, Feb 9, 2016 at 4:03 AM, Adrien Rivard <[email protected]>
wrote:

> Hi,
>
>
> I'm guessing you have a mismatch between the repositories ids you have at
> execution and the configured <server><id> in your settings.xml (where the
> username/password are).
> Probably the repository id for upload-zip stuff is different that the one
> for upload-jars?
>
>
>
> On Tue, Feb 9, 2016 at 1:54 AM, Mehul Sanghvi <[email protected]>
> wrote:
>
> >
> >
> > I have attached a copy of the pom.xml that I am using.
> >
> >
> >
> > On Mon, Feb 8, 2016 at 4:05 AM, Karl Heinz Marbaise <[email protected]>
> > wrote:
> >
> >> Hi,
> >>
> >> On 2/8/16 6:43 AM, Mehul Sanghvi wrote:
> >>
> >>> I have a project with multiple modules and sub-modules.   Two of the
> >>> modules, use
> >>> the same maven-deploy-plugin:deploy-file logic, just the artefacts they
> >>> are
> >>> working
> >>>
> >>
> >>
> >> Can you show an example of your deploy-file logic? Cause if you are
> >> really using deploy-file goal within your pom file and in your life
> cycle
> >> there is something wrong...
> >>
> >> Kind regards
> >> Karl Heinz Marbaise
> >>
> >> with are different.  One module uploads designated JARs to Nexus.  The
> >>> other is
> >>> meant for uploading ZIP files.  Both are activated only if their
> >>> respective
> >>> profiles
> >>> are activated, -Pupload-jars and -Pupload-zips respectively.  Both
> >>> modules
> >>> share the same settings.xml information regarding repositories and
> >>> servers.
> >>>
> >>>
> >>> Upload-jars is able to successfully upload the JARs using deploy-file.
> >>> Upload-zips always fails with:
> >>>
> >>>      Return code is: 401, ReasonPhrase:Unauthorized
> >>>
> >>> How do I figure out the credentials that are being used ?  When I use
> >>>
> >>>      mvn -X
> >>>
> >>> I do not see anything that would indicate what user/passwd combination
> is
> >>> being used.   Any thoughts or suggestions ?
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >
> >
> > --
> > Mehul N. Sanghvi
> > email: [email protected]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
>
>
> --
> Adrien Rivard
>



--
Mehul N. Sanghvi
email: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to