401 Unauthorized Error on mvn deploy

Hi, I’m not able to upload a artifact to my nexus instance. The login into Nexus UI is working. The request log shows no user was send, so authentication fails. The two dashes show, no user was send. When I login into the UI a user is logged.

123.45.67.8 - - [10/Nov/2020:14:31:03 +0100] "PUT /nexus/repository/thirdparty/org/hibersap/com.sap.conn.jco.sapjco3/3.0.16/com.sap.conn.jco.sapjco3-3.0.16.jar HTTP/1.1" 401 1482224 0 78 "Apache-Maven/3.6.3 (Java 1.8.0_252; Windows 10 10.0)" [qtp2073179777-54]

123.45.67.8 - admin [10/Nov/2020:14:32:23 +0100] "GET /nexus/service/outreach/images/logos/rubygems.png HTTP/1.1" 200 - 8135 14 "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0" [qtp2073179777-168]

Why is the user in the settings.xml not send to nexus or ignored?

Edit
When running a curl the user is send sucessfully.
curl -u user:password http://123.45.67.8:54080/nexus/repository/thirdparty/org/hibersap/com.sap.conn.jco.sapjco3/3.0.16/com.sap.conn.jco.sapjco3-3.0.16.pom --request PUT --data com.sap.conn.jco.sapjco3-3.0.16.pom.xml

The “-“ doesn’t mean no user ID was sent, although that is likely the case. The request.log only prints user ID’s for requests where authentication succeeds. See here for things to check regarding this problem:

Thanks @rseddon for the reference. We use a redirect in apache, but maven seems to have a problem with redirects. A curl with the parameter --location-trusted works but the PUT by maven does not.

Solution was to use a ProxyPass not a Redirect, which worked.