You are viewing a plain text version of this content. The canonical link for it is here.
Posted to repository@apache.org by Ian Boston <ia...@gmail.com> on 2016/09/12 15:52:59 UTC

mvn deploy fails.

Hi,
I am trying to test my setup to do a release for sling as recommended at [0]
I can login to [1]. I can see the staging repository and artifacts being
released by others. I have released using repository.apache.org but it was
a long time ago, before people.apache.org became sftp only.

I have setup (and double checked) ~/.m2/settings.xml, verified that they
are being picked.
I am using mvn -ep, but even with a clear text password

When I try mvn deploy I get

[WARNING] Encountered issue during deployment: Failed to deploy artifacts:
Could not transfer artifact
org.apache.sling:org.apache.sling.engine:jar:2.6.3-20160912.150940-1
from/to apache.snapshots.https (
https://repository.apache.org/content/repositories/snapshots): Failed to
transfer file:
https://repository.apache.org/content/repositories/snapshots/org/apache/sling/org.apache.sling.engine/2.6.3-SNAPSHOT/org.apache.sling.engine-2.6.3-20160912.150940-1.jar.
Return code is: 401, ReasonPhrase: Unauthorized.


Judging by the stack trace its using

        at
org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)


which was configured with

DEBUG] Using transporter WagonTransporter with priority -1.0 for
https://repository.apache.org/content/repositories/snapshots

[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for
https://repository.apache.org/content/repositories/snapshots with
username=ieb, password=***


Any ideas ?


Best Regards
Ian

0 http://www.apache.org/dev/publishing-maven-artifacts.html#publish-snapshot
1 https://repository.apache.org

Re: mvn deploy fails.

Posted by Ian Boston <ie...@tfd.co.uk>.
Hi,
Found the problem.

I had a UTF-8 char in my password identified by echo <password> | od -a
producing 2 ? chars in the output. The terminal is UTF-8 capable since echo
<password> | od -x reports the correct UTF-8 sequence. SInce authN will be
base64 encoded, and the logging via the browser works there may be
something wrong with the way maven processes setting.xml or decryption of
passwords as both clear text and encrypted passwords fail.

Removing the UTF-8 char from my password has fixed the problem.

Best Regards
Ian

On 12 September 2016 at 18:43, Lukasz Lenart <lu...@apache.org>
wrote:

> 2016-09-12 17:52 GMT+02:00 Ian Boston <ia...@gmail.com>:
> > I have setup (and double checked) ~/.m2/settings.xml, verified that they
> are
> > being picked.
> > I am using mvn -ep, but even with a clear text password
>
> You meant this:
>
> <settings>
> ...
>   <servers>
>     <!-- To publish a snapshot of some part of Maven -->
>     <server>
>       <id>apache.snapshots.https</id>
>       <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
>       <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
>     </server>
>     <!-- To stage a release of some part of Maven -->
>     <server>
>       <id>apache.releases.https</id>
>       <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
>       <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
>     </server>
>    ...
>   </servers>
> </settings>
>
> ?
>
> Does your pom.xml use Apache's parent?
>
> <parent>
>     <groupId>org.apache</groupId>
>     <artifactId>apache</artifactId>
>     <version>16</version>
> </parent>
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>

Re: mvn deploy fails.

Posted by Lukasz Lenart <lu...@apache.org>.
2016-09-12 17:52 GMT+02:00 Ian Boston <ia...@gmail.com>:
> I have setup (and double checked) ~/.m2/settings.xml, verified that they are
> being picked.
> I am using mvn -ep, but even with a clear text password

You meant this:

<settings>
...
  <servers>
    <!-- To publish a snapshot of some part of Maven -->
    <server>
      <id>apache.snapshots.https</id>
      <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
      <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
    </server>
    <!-- To stage a release of some part of Maven -->
    <server>
      <id>apache.releases.https</id>
      <username> <!-- YOUR APACHE LDAP USERNAME --> </username>
      <password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
    </server>
   ...
  </servers>
</settings>

?

Does your pom.xml use Apache's parent?

<parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>16</version>
</parent>


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/