0

i cannot download artifacts from my nexus server through maven but i can access the urls from my browsers without proxy. I am getting

    java.net.ConnectException: Connection timed out:connect
       at java.net.PlainSocketImpl.socketConnect...
    Repository will be blacklisted

I am using maven 2.2.1

Frank Smith
  • 1,717
  • 4
  • 18
  • 32

2 Answers2

0

Try mvn -U to force updates, even if they are blacklisted.

Did you specify your repository in your pom.xml? It could be a DNS problem. Try to specify your repository with your IP instead of the hostname.

Martin Seeler
  • 6,874
  • 3
  • 33
  • 45
  • No.. i just added the repositories in the settings.xml in maven conf and .m2 folder and added the username and password of each repo in the section. Is it still needed in pom.xml of each module? – Frank Smith Dec 17 '13 at 10:32
0

You may have forgotten to add repository credential in you settings.xml, if it require authentication (that you fulfill wia your browser, even whithout knowing it):

Settings.xml :

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  ...
  <servers>
    <server>
      <id>corporate-nexus</id>
      <username>login</username>
      <password>password</password>
    </server>
  </servers>
  ...
</settings>

pom.xml

<repositories>
    <repository>
      <id>corporate-nexus</id>
      <name>My Corporate repository</name>
      <url>http://url.to.your.repo.corp</url>
    </repository>
</repositories>

Be carefull, the id tags must have the same value.

Please add more information about your configuration if you want a more accurate answer

More information here : http://maven.apache.org/guides/mini/guide-multiple-repositories.html

Jean-Rémy Revy
  • 5,607
  • 3
  • 39
  • 65