MAVEN

Diskutiere MAVEN im Java Basics - Anfänger-Themen Bereich.
D

direktor

I get this error when compiling Maven project. Can someone tell me what is wrong? By the way I'm in China (Great Firewall block) - is this why Maven dependency can't be downloaded?

cd E:\MyPrograms\Java\Tests\MavenTest2\mavenproject1; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_211" cmd /c "\"\"E:\\Software\\Java\\netbeans\\java\\maven\\bin\\mvn.cmd\" -Dexec.args=\"-classpath %classpath com.mymaven1.mavenproject1.NewMain\" -Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_211\\bin\\java.exe\" -Dmaven.ext.class.path=E:\\Software\\Java\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar -Dfile.encoding=UTF-8 process-classes org.codehaus.mojo:exec-maven-plugin:1.5.0:exec\""
Scanning for projects...
Downloading: https://repo.maven.apache.org/maven...aven-plugin/1.5.0/exec-maven-plugin-1.5.0.pom

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.777 s
Finished at: 2020-07-27T23:13:01+08:00
Final Memory: 6M/15M
------------------------------------------------------------------------
Plugin org.codehaus.mojo:exec-maven-plugin:1.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:exec-maven-plugin:jar:1.5.0: Could not transfer artifact org.codehaus.mojo:exec-maven-plugin:pom:1.5.0 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/127.0.1.2] failed: Connection refused: connect -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
 
H

httpdigest

By the way I'm in China (Great Firewall block) - is this why Maven dependency can't be downloaded?
Probably. Your DNS seems to have resolved repo.maven.apache.org to 127.0.1.2 (which is part of the "loopback" IP block 127.0.0.0/8), so not a routable internet address but meaning "yourself" (your computer).
1. try to click on https://repo.maven.apache.org/maven...aven-plugin/1.5.0/exec-maven-plugin-1.5.0.pom and see whether you get an XML result
2. if not: check `nslookup repo.maven.apache.org`
 
D

direktor

Not XML, just some text like this: 4.0.0 org.codehaus.mojo mojo-parent 38 exec-maven-plugin 1.5.0 maven-plugin Exec Maven Plugin A plugin to allow execution of system and Java programs http://www.mojohaus.org/........ and so on....
Thanks. Nevermind. I have to leave this hole to do some serious programming, nothing works here.
 
Thema: 

MAVEN

Passende Stellenanzeigen aus deiner Region:
Anzeige

Neue Themen

Anzeige

Anzeige
Oben