简体   繁体   中英

unable to download artifact from nexus repo

I am using a nexus repo in a linux system which downloads missing artifacts for me in my windows system when i build my project, by using:

mvn install command

The artifacts are downloaded by my nexus repo from a remote repo which is mapped to the nexus repo.

This connection between the nexus repo set up in linux system and the remote repo used to work earlier and thus I used to get all the required artifacts for my maven build automatically when i used to build my project using maven.

But due to some reasons the nexus repo in linux is not downloading artifacts from the remote repo.I want this connection to happen so that i could get the required artifact say, tomcat-catalina-7.0.16.jar,downloaded from the remote repo.

I am new to nexus..so may be I would not have been able to explain my problem properly or would have been technically unsound in my question.But I eagerly want to solve my problem.So please if any one could help, please do.

hi, i checked nexus.log and found the following exception while mvn install command was running and when nexus was trying to download the missing tomcat-catalina-7.0.16.jar artifact from the remote repo:

2012-01-18 11:58:35 ERROR [http-8090-23 ] - osnpmmM2Repos~ - Got Storage Exception while storing remote artifact, will attempt next mirror, cause: org.sonatype.nexus.proxy.RemoteStorageException: The method execution returned result code 407. [repositoryId="central", requestPath="/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.jar.sha1", remoteUrl="http://repo.ibsplc.com/artifactory/repo/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.jar.sha1"]

2012-01-18 11:58:35 ERROR [http-8090-23 ] - osnrContentPlex~ - Got exception during processing request "GET http://192.168.4.8:8090/nexus/content/repositories/central/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.jar.sha1 ": org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed

2012-01-18 11:58:35 ERROR [http-8090-23 ] - osnpmmM2Repos~ - Got Storage Exception while storing remote artifact, will attempt next mirror, cause: org.sonatype.nexus.proxy.RemoteStorageException: The method execution returned result code 407. [repositoryId="central", requestPath="/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.jar.sha1", remoteUrl="http://repo.ibsplc.com/artifactory/repo/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.jar.sha1"]

2012-01-18 11:58:35 ERROR [http-8090-23 ] - osnrContentPlex~ - Got exception during processing request "GET http://192.168.4.8:8090/nexus/content/repositories/central/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.jar.sha1 ": org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed

2012-01-18 11:58:25 INFO [http-8090-23 ] - oachaAuthChall~ - Basic authentication scheme selected

2012-01-18 11:58:25 INFO [http-8090-23 ] - oachHttpMethodD~ - Failure authenticating with BASIC 'Squid proxy-caching web server'@192.168.0.46:80

2012-01-18 11:58:25 ERROR [http-8090-23 ] - osnpmmM2Repos~ - Got Storage Exception while storing remote artifact, will attempt next mirror, cause: org.sonatype.nexus.proxy.RemoteStorageException: The method execution returned result code 407. [repositoryId="central", requestPath="/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.pom", remoteUrl="http://repo.ibsplc.com/artifactory/repo/org/apache/tomcat/tomcat-catalina/7.0.16/tomcat-catalina-7.0.16.pom"]

If anyone can find a solution.please do help

The tomcat-catalina is available from Maven Central, so this is the repository mirror to hone in on.

I suggest checking the following:

Maven client configured?

Are you sure the problem is with your Nexus instance? Have you setup a central mirror in your settings.xml file?

<mirror>
  <id>nexus</id>
  <url>http://myhost.com/nexus/content/central</url>
  <mirrorOf>central</mirrorOf>
</mirror>

The URL should match the proxy repository URL from your Nexus repo

Repository blocked?

When you look at the Maven repositories (via Nexus GUI) is the Maven central proxy repo marked as being " blocked "?

If so that would indicate that there are connectivity issues between it and the remote Maven central repo.

The Nexus log files might give some clues.

HTTP proxy?

Are you running nexus behind a corporate firewall? A common problem is forgetting to setup the HTTP proxy settings in Nexus.

I know this post is a bit old but neither of this options helped me, what did help was my settings.xml was set to use a local repo:

<settings>
<localRepository>E:/maven</localRepository>
</settings>

I have no E: drive (duh)... but this incidently stopped maven from downloading from Nexus. Changed this to C: drive and magic! Worked again!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM