When the maven repository requires authentication to PUT jars,
1- the deploy plugin first triggers a HTTP PUT query without login/pwd, trying to send the jar
2- then the repo rejects this query as 401 "need authentication" error
3- then the deploy plugin triggers again same HTTP PUT query with the login/pwd and sends the jar again
4- then the repo accepts this second query and uploads the jar
This sequence consumes useless I/O (trying to send the jar on first query)
and causes issues on some configurations like HTTPS with a frontend webserver : randomly the HTTPS connection is cut (Nginx HTTPS forwarding to Nexus HTTPS).
It will be better (by default or with some config var) to provide immediately the login/pwd on PUT queries
=> aka: sending the HTTP header "Authentication: BASIC xxxxx"
Tested with Maven 2.2.1, Deploy 2.5, Nexus 1.7.2, Nginx