You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Qureshi,Shahzad [Ontario]" <Sh...@ec.gc.ca> on 2010/01/28 23:21:36 UTC

Upload snapshot on nexus

Hi all,

I am having problem uploading a snapshot of my project to our internal
nexus repository. Everything else is working fine, I can download
plugins/dependencies, I am able to upload releases using the browser but
when I try to do mvn deploy for a snapshot of my project, I get 

[INFO] Error retrieving previous build number for artifact
'test:Archive:jar': repository metadata for: 'snapshot
test:Archive:1.0-SNAPSHOT' could not be retrieved from repository:
central due to an error: Authentication failed: Cannot connect. Reason:
connection is closed by foreign host

I've done what this link mentioned here:
http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-gro
up.html i.e. included snapshot repository to the public group and
created the settings.xml and everything is working except deploying of
the snapshot

I don't have <distributionManagement> section in my pom file though,
does that matter? If so, what should go in there? Because I don't seem
to need it when deploying releases

It seems to me that the reason its failing is because I need to proivde
login and password for the server where I am trying to upload the
snapshot("Authentication failed"), where do I specify that?

Any help will be great

Thanks

--------------------------------------------
Shahzad Qureshi


RE: Upload snapshot on nexus

Posted by "Qureshi,Shahzad [Ontario]" <Sh...@ec.gc.ca>.
Http didn't work for me in the past so I didn't try that, I just did, providing it with the 'deployment' user credentials and it worked and I was able to upload the snapshot

Thanks Anders 


--------------------------------------------
Shahzad Qureshi
Systems Analyst/Programmer
Applications Directorate | La direction générale des applications
Chief Information 
Environment Canada
416-739-4702
shahzad.qureshi@ec.gc.ca

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Friday, January 29, 2010 1:47 AM
To: Maven Users List
Subject: Re: Upload snapshot on nexus

Why are you using scp and not http?

/Anders

On Fri, Jan 29, 2010 at 03:47, Qureshi,Shahzad [Ontario] < Shahzad.Qureshi@ec.gc.ca> wrote:

> Ahh, forgot that it should be <snapshotRepository> and not 
> <repository> below
>
> So it should be
>
> <distributionManagement>
>        <snapshotRepository>
>                 <id>nexus</id>
>
>  <url>scp://serveraddress/usr/local/sonatype-work/nexus/storage/snapshots</url>
>         </snapshotRepository>
> </distributionManagement>
>
> Its working now, well not entirely since the account I am usng doesn't 
> write permission on the directory I am trying to write this snapshot 
> to but that's a different issue and will be solved by tmrw. I will 
> report back when I do successfully write the snapshot to the snapshot 
> repo
>
> Thanks for your help Ron
>
> --------------------------------------------
> Shahzad Qureshi
> Systems Analyst/Programmer
> Applications Directorate | La direction générale des applications 
> Chief Information Environment Canada
> 416-739-4702
> shahzad.qureshi@ec.gc.ca
>
> -----Original Message-----
> From: Qureshi,Shahzad [Ontario] [mailto:Shahzad.Qureshi@ec.gc.ca]
> Sent: Thursday, January 28, 2010 9:30 PM
> To: Maven Users List
> Subject: *****SPAM***** RE: Upload snapshot on nexus
>
> Did that, also added a distributionManagement section in the pom like 
> the following
>
> <distributionManagement>
>        <repository>
>                <id>nexus</id>
>
>  <url>scp://serveraddress/usr/local/sonatype-work/nexus/storage/snapshots</url>
>        </repository>
> </distributionManagement>
>
>
> And I still get the exact same error
>
> --------------------------------------------
> Shahzad Qureshi
> Systems Analyst/Programmer
> Applications Directorate | La direction générale des applications 
> Chief Information Environment Canada
> 416-739-4702
> shahzad.qureshi@ec.gc.ca
>
> -----Original Message-----
> From: Ron Wheeler [mailto:rwheeler@artifact-software.com]
> Sent: Thursday, January 28, 2010 8:50 PM
> To: Maven Users List
> Subject: Re: Upload snapshot on nexus
>
> http://www.sonatype.com/books/nexus-book/reference/ch14s04.html
>
> Qureshi,Shahzad [Ontario] wrote:
> > Hi all,
> >
> > I am having problem uploading a snapshot of my project to our 
> > internal nexus repository. Everything else is working fine, I can 
> > download plugins/dependencies, I am able to upload releases using 
> > the browser but when I try to do mvn deploy for a snapshot of my 
> > project, I get
> >
> > [INFO] Error retrieving previous build number for artifact
> > 'test:Archive:jar': repository metadata for: 'snapshot 
> > test:Archive:1.0-SNAPSHOT' could not be retrieved from repository:
> > central due to an error: Authentication failed: Cannot connect. Reason:
> > connection is closed by foreign host
> >
> > I've done what this link mentioned here:
> > http://www.sonatype.com/books/nexus-book/reference/maven-sect-single
> > -g ro up.html i.e. included snapshot repository to the public group 
> > and created the settings.xml and everything is working except 
> > deploying of the snapshot
> >
> > I don't have <distributionManagement> section in my pom file though, 
> > does that matter? If so, what should go in there? Because I don't 
> > seem to need it when deploying releases
> >
> > It seems to me that the reason its failing is because I need to 
> > proivde login and password for the server where I am trying to 
> > upload the snapshot("Authentication failed"), where do I specify that?
> >
> > Any help will be great
> >
> > Thanks
> >
> > --------------------------------------------
> > Shahzad Qureshi
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Upload snapshot on nexus

Posted by Anders Hammar <an...@hammar.net>.
Why are you using scp and not http?

/Anders

On Fri, Jan 29, 2010 at 03:47, Qureshi,Shahzad [Ontario] <
Shahzad.Qureshi@ec.gc.ca> wrote:

> Ahh, forgot that it should be <snapshotRepository> and not <repository>
> below
>
> So it should be
>
> <distributionManagement>
>        <snapshotRepository>
>                 <id>nexus</id>
>
>  <url>scp://serveraddress/usr/local/sonatype-work/nexus/storage/snapshots</url>
>         </snapshotRepository>
> </distributionManagement>
>
> Its working now, well not entirely since the account I am usng doesn't
> write permission on the directory I am trying to write this snapshot to but
> that's a different issue and will be solved by tmrw. I will report back when
> I do successfully write the snapshot to the snapshot repo
>
> Thanks for your help Ron
>
> --------------------------------------------
> Shahzad Qureshi
> Systems Analyst/Programmer
> Applications Directorate | La direction générale des applications
> Chief Information
> Environment Canada
> 416-739-4702
> shahzad.qureshi@ec.gc.ca
>
> -----Original Message-----
> From: Qureshi,Shahzad [Ontario] [mailto:Shahzad.Qureshi@ec.gc.ca]
> Sent: Thursday, January 28, 2010 9:30 PM
> To: Maven Users List
> Subject: *****SPAM***** RE: Upload snapshot on nexus
>
> Did that, also added a distributionManagement section in the pom like the
> following
>
> <distributionManagement>
>        <repository>
>                <id>nexus</id>
>
>  <url>scp://serveraddress/usr/local/sonatype-work/nexus/storage/snapshots</url>
>        </repository>
> </distributionManagement>
>
>
> And I still get the exact same error
>
> --------------------------------------------
> Shahzad Qureshi
> Systems Analyst/Programmer
> Applications Directorate | La direction générale des applications Chief
> Information Environment Canada
> 416-739-4702
> shahzad.qureshi@ec.gc.ca
>
> -----Original Message-----
> From: Ron Wheeler [mailto:rwheeler@artifact-software.com]
> Sent: Thursday, January 28, 2010 8:50 PM
> To: Maven Users List
> Subject: Re: Upload snapshot on nexus
>
> http://www.sonatype.com/books/nexus-book/reference/ch14s04.html
>
> Qureshi,Shahzad [Ontario] wrote:
> > Hi all,
> >
> > I am having problem uploading a snapshot of my project to our internal
> > nexus repository. Everything else is working fine, I can download
> > plugins/dependencies, I am able to upload releases using the browser
> > but when I try to do mvn deploy for a snapshot of my project, I get
> >
> > [INFO] Error retrieving previous build number for artifact
> > 'test:Archive:jar': repository metadata for: 'snapshot
> > test:Archive:1.0-SNAPSHOT' could not be retrieved from repository:
> > central due to an error: Authentication failed: Cannot connect. Reason:
> > connection is closed by foreign host
> >
> > I've done what this link mentioned here:
> > http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-g
> > ro up.html i.e. included snapshot repository to the public group and
> > created the settings.xml and everything is working except deploying of
> > the snapshot
> >
> > I don't have <distributionManagement> section in my pom file though,
> > does that matter? If so, what should go in there? Because I don't seem
> > to need it when deploying releases
> >
> > It seems to me that the reason its failing is because I need to
> > proivde login and password for the server where I am trying to upload
> > the snapshot("Authentication failed"), where do I specify that?
> >
> > Any help will be great
> >
> > Thanks
> >
> > --------------------------------------------
> > Shahzad Qureshi
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Upload snapshot on nexus

Posted by "Qureshi,Shahzad [Ontario]" <Sh...@ec.gc.ca>.
Ahh, forgot that it should be <snapshotRepository> and not <repository> below

So it should be

<distributionManagement>
	<snapshotRepository>
		<id>nexus</id>
		<url>scp://serveraddress/usr/local/sonatype-work/nexus/storage/snapshots</url>
	</snapshotRepository>
</distributionManagement>  

Its working now, well not entirely since the account I am usng doesn't write permission on the directory I am trying to write this snapshot to but that's a different issue and will be solved by tmrw. I will report back when I do successfully write the snapshot to the snapshot repo

Thanks for your help Ron

--------------------------------------------
Shahzad Qureshi
Systems Analyst/Programmer
Applications Directorate | La direction générale des applications
Chief Information 
Environment Canada
416-739-4702
shahzad.qureshi@ec.gc.ca

-----Original Message-----
From: Qureshi,Shahzad [Ontario] [mailto:Shahzad.Qureshi@ec.gc.ca] 
Sent: Thursday, January 28, 2010 9:30 PM
To: Maven Users List
Subject: *****SPAM***** RE: Upload snapshot on nexus

Did that, also added a distributionManagement section in the pom like the following

<distributionManagement>
	<repository>
		<id>nexus</id>
		<url>scp://serveraddress/usr/local/sonatype-work/nexus/storage/snapshots</url>
	</repository>
</distributionManagement> 


And I still get the exact same error

--------------------------------------------
Shahzad Qureshi
Systems Analyst/Programmer
Applications Directorate | La direction générale des applications Chief Information Environment Canada
416-739-4702
shahzad.qureshi@ec.gc.ca

-----Original Message-----
From: Ron Wheeler [mailto:rwheeler@artifact-software.com]
Sent: Thursday, January 28, 2010 8:50 PM
To: Maven Users List
Subject: Re: Upload snapshot on nexus

http://www.sonatype.com/books/nexus-book/reference/ch14s04.html

Qureshi,Shahzad [Ontario] wrote:
> Hi all,
>
> I am having problem uploading a snapshot of my project to our internal 
> nexus repository. Everything else is working fine, I can download 
> plugins/dependencies, I am able to upload releases using the browser 
> but when I try to do mvn deploy for a snapshot of my project, I get
>
> [INFO] Error retrieving previous build number for artifact
> 'test:Archive:jar': repository metadata for: 'snapshot 
> test:Archive:1.0-SNAPSHOT' could not be retrieved from repository:
> central due to an error: Authentication failed: Cannot connect. Reason:
> connection is closed by foreign host
>
> I've done what this link mentioned here:
> http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-g
> ro up.html i.e. included snapshot repository to the public group and 
> created the settings.xml and everything is working except deploying of 
> the snapshot
>
> I don't have <distributionManagement> section in my pom file though, 
> does that matter? If so, what should go in there? Because I don't seem 
> to need it when deploying releases
>
> It seems to me that the reason its failing is because I need to 
> proivde login and password for the server where I am trying to upload 
> the snapshot("Authentication failed"), where do I specify that?
>
> Any help will be great
>
> Thanks
>
> --------------------------------------------
> Shahzad Qureshi
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Upload snapshot on nexus

Posted by "Qureshi,Shahzad [Ontario]" <Sh...@ec.gc.ca>.
Did that, also added a distributionManagement section in the pom like the following

<distributionManagement>
	<repository>
		<id>nexus</id>
		<url>scp://serveraddress/usr/local/sonatype-work/nexus/storage/snapshots</url>
	</repository>
</distributionManagement> 


And I still get the exact same error

--------------------------------------------
Shahzad Qureshi
Systems Analyst/Programmer
Applications Directorate | La direction générale des applications
Chief Information 
Environment Canada
416-739-4702
shahzad.qureshi@ec.gc.ca

-----Original Message-----
From: Ron Wheeler [mailto:rwheeler@artifact-software.com] 
Sent: Thursday, January 28, 2010 8:50 PM
To: Maven Users List
Subject: Re: Upload snapshot on nexus

http://www.sonatype.com/books/nexus-book/reference/ch14s04.html

Qureshi,Shahzad [Ontario] wrote:
> Hi all,
>
> I am having problem uploading a snapshot of my project to our internal 
> nexus repository. Everything else is working fine, I can download 
> plugins/dependencies, I am able to upload releases using the browser 
> but when I try to do mvn deploy for a snapshot of my project, I get
>
> [INFO] Error retrieving previous build number for artifact
> 'test:Archive:jar': repository metadata for: 'snapshot 
> test:Archive:1.0-SNAPSHOT' could not be retrieved from repository:
> central due to an error: Authentication failed: Cannot connect. Reason:
> connection is closed by foreign host
>
> I've done what this link mentioned here:
> http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-g
> ro up.html i.e. included snapshot repository to the public group and 
> created the settings.xml and everything is working except deploying of 
> the snapshot
>
> I don't have <distributionManagement> section in my pom file though, 
> does that matter? If so, what should go in there? Because I don't seem 
> to need it when deploying releases
>
> It seems to me that the reason its failing is because I need to 
> proivde login and password for the server where I am trying to upload 
> the snapshot("Authentication failed"), where do I specify that?
>
> Any help will be great
>
> Thanks
>
> --------------------------------------------
> Shahzad Qureshi
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Upload snapshot on nexus

Posted by Ron Wheeler <rw...@artifact-software.com>.
http://www.sonatype.com/books/nexus-book/reference/ch14s04.html

Qureshi,Shahzad [Ontario] wrote:
> Hi all,
>
> I am having problem uploading a snapshot of my project to our internal
> nexus repository. Everything else is working fine, I can download
> plugins/dependencies, I am able to upload releases using the browser but
> when I try to do mvn deploy for a snapshot of my project, I get 
>
> [INFO] Error retrieving previous build number for artifact
> 'test:Archive:jar': repository metadata for: 'snapshot
> test:Archive:1.0-SNAPSHOT' could not be retrieved from repository:
> central due to an error: Authentication failed: Cannot connect. Reason:
> connection is closed by foreign host
>
> I've done what this link mentioned here:
> http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-gro
> up.html i.e. included snapshot repository to the public group and
> created the settings.xml and everything is working except deploying of
> the snapshot
>
> I don't have <distributionManagement> section in my pom file though,
> does that matter? If so, what should go in there? Because I don't seem
> to need it when deploying releases
>
> It seems to me that the reason its failing is because I need to proivde
> login and password for the server where I am trying to upload the
> snapshot("Authentication failed"), where do I specify that?
>
> Any help will be great
>
> Thanks
>
> --------------------------------------------
> Shahzad Qureshi
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org