Compilation with maven and nexus stuck while loading artifacts

we use nexus 1.9.2.4 and maven 2.2.1 here and on one PC (and only one), when we try to compile our code using maven, it gets stuck when loading jars. For example, it will be stuck:

Download: http: // mainserver: 8081 / nexus / content / groups / public / org / codehaus / mojo / javascript / javascript-maven-plugin / 1.0-alpha-1-SNAPSHOT / javascript-maven-plugin-1.0-alpha- 1-20090530.211438-7.jar 17 / 54K

and will not continue at all. tried using maven 3.0.4, but with the same result.

the machine launches windows 7.

any advice would be appreciated

+6
source share
2 answers

This is apparently a bug related to using Maven on Java 7 and 64-bit Windows. I had similar problems.

The maven bug report and some discussions can be found here:

http://jira.codehaus.org/browse/MNG-5162

A workaround is described here:

https://cwiki.apache.org/confluence/display/MAVEN/ConnectException

Add -Djava.net.preferIPv4Stack = true to MAVEN_OPTS

+4
source

Maven really needs some kind of mirror support and crashes for qurkeyness on the Internet. In fact, not everyone will be able to have a minimized connection to the Oracle and Apache repositories. Every internet connection is going to drop the packet here and there, the answer “get a new ISP” from Maven fans would not help, even if it were an option.

I watched a 400 kg load for 10 minutes. I noticed that he was stuck in the same files every time I wipe my repo (maybe maybe a bad sector)? This is a complete lavash, because it does not seem that I can specify mirrors for it (apart from hacking the hosts file). If you're a Maven project manager, look at Aptitude for ideas on what Maven might be.

EDIT: I found a solution to my problem with Maven here.

https://jira.codehaus.org/browse/MNG-5162

In Ubuntu 13.10, just ...

sudo gedit / etc / environment

Add

MAVEN_OPTS = "- Djava.net.preferIPv4Stack = true"

Save

Close

Update terminal.

0
source

Source: https://habr.com/ru/post/908325/


All Articles