You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Eugeny N Dzhurinsky <bo...@redwerk.com> on 2007/11/26 11:07:02 UTC

maven goal deploy:deploy-file skips the authentication?

Hello, gentlemen, we are using Artifactory to hold the modules we're using in
Maven, for some weird reason we can't upload an artifact to the repository.

For example I want to deploy the artifact with such command:

mvn deploy:deploy-file -DgroupId=org.apache.hadoop \
    -DartifactId=hadoop-core \
    -Dversion=0.14.3 \
    -Dpackaging=jar \
    -Dfile=hadoop-0.14.3-core.jar \
    -DpomFile=/home/user/tmp/hadoop-0.14.3/hadoop-pom.xml \
    -DrepositoryId=ourrepository \
    -Durl=http://our.domain.com:8080/artifactory/3rd-party@repo

in the ~/.m2/settings.xml I have:

<settings>
    <servers>
	<server>
	    <id>ourrepository</id>
	    <username>username</username>
	    <password>password</password>
	</server>
    </servers>
</settings>

and when doing the dump of server request/response I can see following:

============================request======================
PUT /artifactory/3rd-party@repo/org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar HTTP/1.1
User-Agent: Java/1.6.0_03-p3
Host: our.domain.com:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 1360922
============================/request=====================

===========================response======================
HTTP/1.1 401 Authentication_is_required
WWW-Authenticate: Basic realm="Artifactory Realm"
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1481
Server: Jetty(6.1.4)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 401 </title>
</head>
<body><h2>HTTP ERROR: 401</h2><pre>Authentication is required.</pre>
<p>RequestURI=/artifactory/3rd-party@repo/org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar</p><
p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/>
===========================/response=====================

So it looks like the authentication credentials were not even sent to the
server. I double checked the repositoryId used in the command line and in the
settings.xml and found there's no typo. So could somebody please explain what
else I could miss and how to fix the problem or what do I need to do to
provide more details?

Thank you in advance!

-- 
Eugene N Dzhurinsky

Re: maven goal deploy:deploy-file skips the authentication?

Posted by Eugeny N Dzhurinsky <bo...@redwerk.com>.
On Mon, Nov 26, 2007 at 11:13:43AM +0100, nicklist@planet.nl wrote:
> If I recall correctly, there is a bug in the settings.
> 
> When you have a repository and a server with the same id, Maven gets confused.
> 
> So, do you also have a repository configured with id ourrepository?
> 
> Normally I postfix every server id with .server, so in this case the server id becomes ourrepository.server.

No, I don't have any repository with same ID defined in settings.xml.

-- 
Eugene N Dzhurinsky

RE: maven goal deploy:deploy-file skips the authentication?

Posted by ni...@planet.nl.
If I recall correctly, there is a bug in the settings.

When you have a repository and a server with the same id, Maven gets confused.

So, do you also have a repository configured with id ourrepository?

Normally I postfix every server id with .server, so in this case the server id becomes ourrepository.server.

Hth,

Nick Stolwijk


-----Original Message-----
From: Eugeny N Dzhurinsky [mailto:bofh@redwerk.com]
Sent: Mon 11/26/2007 11:07 AM
To: users@maven.apache.org
Subject: maven goal deploy:deploy-file skips the authentication?
 
Hello, gentlemen, we are using Artifactory to hold the modules we're using in
Maven, for some weird reason we can't upload an artifact to the repository.

For example I want to deploy the artifact with such command:

mvn deploy:deploy-file -DgroupId=org.apache.hadoop \
    -DartifactId=hadoop-core \
    -Dversion=0.14.3 \
    -Dpackaging=jar \
    -Dfile=hadoop-0.14.3-core.jar \
    -DpomFile=/home/user/tmp/hadoop-0.14.3/hadoop-pom.xml \
    -DrepositoryId=ourrepository \
    -Durl=http://our.domain.com:8080/artifactory/3rd-party@repo

in the ~/.m2/settings.xml I have:

<settings>
    <servers>
	<server>
	    <id>ourrepository</id>
	    <username>username</username>
	    <password>password</password>
	</server>
    </servers>
</settings>

and when doing the dump of server request/response I can see following:

============================request======================
PUT /artifactory/3rd-party@repo/org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar HTTP/1.1
User-Agent: Java/1.6.0_03-p3
Host: our.domain.com:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 1360922
============================/request=====================

===========================response======================
HTTP/1.1 401 Authentication_is_required
WWW-Authenticate: Basic realm="Artifactory Realm"
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1481
Server: Jetty(6.1.4)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 401 </title>
</head>
<body><h2>HTTP ERROR: 401</h2><pre>Authentication is required.</pre>
<p>RequestURI=/artifactory/3rd-party@repo/org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar</p><
p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/>
===========================/response=====================

So it looks like the authentication credentials were not even sent to the
server. I double checked the repositoryId used in the command line and in the
settings.xml and found there's no typo. So could somebody please explain what
else I could miss and how to fix the problem or what do I need to do to
provide more details?

Thank you in advance!

-- 
Eugene N Dzhurinsky


Re: maven goal deploy:deploy-file skips the authentication?

Posted by Eugeny N Dzhurinsky <bo...@redwerk.com>.
On Mon, Nov 26, 2007 at 12:28:44PM +0100, Nicole Lacoste wrote:
> Please don't address the list as gentlemen!  It isn't nice for the
> gentlewomen who are on the list too :-)

Ouch, please excuse me, I didn't mind to offend you ;)
Probably I had to use "Gentlehomo"? ;)

-- 
Eugene N Dzhurinsky

Re: maven goal deploy:deploy-file skips the authentication?

Posted by Nicole Lacoste <ni...@gmail.com>.
Please don't address the list as gentlemen!  It isn't nice for the
gentlewomen who are on the list too :-)

Nicole

On 26/11/2007, Eugeny N Dzhurinsky <bo...@redwerk.com> wrote:
>
> Hello, gentlemen, we are using Artifactory to hold the modules we're using
> in
> Maven, for some weird reason we can't upload an artifact to the
> repository.
>
> For example I want to deploy the artifact with such command:
>
> mvn deploy:deploy-file -DgroupId=org.apache.hadoop \
>    -DartifactId=hadoop-core \
>    -Dversion=0.14.3 \
>    -Dpackaging=jar \
>    -Dfile=hadoop-0.14.3-core.jar \
>    -DpomFile=/home/user/tmp/hadoop-0.14.3/hadoop-pom.xml \
>    -DrepositoryId=ourrepository \
>    -Durl=http://our.domain.com:8080/artifactory/3rd-party@repo
>
> in the ~/.m2/settings.xml I have:
>
> <settings>
>    <servers>
>        <server>
>            <id>ourrepository</id>
>            <username>username</username>
>            <password>password</password>
>        </server>
>    </servers>
> </settings>
>
> and when doing the dump of server request/response I can see following:
>
> ============================request======================
> PUT /artifactory/3rd-party@repo
> /org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar HTTP/1.1
> User-Agent: Java/1.6.0_03-p3
> Host: our.domain.com:8080
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> Connection: keep-alive
> Content-Length: 1360922
> ============================/request=====================
>
> ===========================response======================
> HTTP/1.1 401 Authentication_is_required
> WWW-Authenticate: Basic realm="Artifactory Realm"
> Content-Type: text/html; charset=iso-8859-1
> Content-Length: 1481
> Server: Jetty(6.1.4)
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
> <title>Error 401 </title>
> </head>
> <body><h2>HTTP ERROR: 401</h2><pre>Authentication is required.</pre>
> <p>RequestURI=/artifactory/3rd-party@repo
> /org/apache/hadoop/hadoop-core/0.14.3/hadoop-core-0.14.3.jar</p><
> p><i><small><a href="http://jetty.mortbay.org/">Powered by
> Jetty://</a></small></i></p><br/>
> ===========================/response=====================
>
> So it looks like the authentication credentials were not even sent to the
> server. I double checked the repositoryId used in the command line and in
> the
> settings.xml and found there's no typo. So could somebody please explain
> what
> else I could miss and how to fix the problem or what do I need to do to
> provide more details?
>
> Thank you in advance!
>
> --
> Eugene N Dzhurinsky
>
>