aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven setup is not working in Eclipse or Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven setup is not working in Eclipse or Netbeans" Watch "Maven setup is not working in Eclipse or Netbeans" New topic
Author

Maven setup is not working in Eclipse or Netbeans

pratap tamatam
Greenhorn

Joined: Oct 21, 2008
Posts: 3
Hi-

When I am trying to setup Maven, got below error. I am not working under firewalls.

Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Jun 04, 2013 3:07:48 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
Jun 04, 2013 3:07:48 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
Jun 04, 2013 3:07:48 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
Jun 04, 2013 3:07:48 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
Jun 04, 2013 3:07:48 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
Jun 04, 2013 3:07:48 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect

INFO: Retrying connect

Can some body help me.

----------Pratap
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

If you enter the URL from the error message in your browser, what happens?

You mentioned NetBeans and Eclipse. Is this output generated from inside one of them? If so, which one? Also, could you try running mvn from the command prompt and see if that does something different.

You you have a proxy server in your browser configuration? (Which OS and browser are you using, we can provide more specific debugging guidance if we know)


JBoss In Action
pratap tamatam
Greenhorn

Joined: Oct 21, 2008
Posts: 3
Hi Peter-

I am able to access "http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom" from browser.Below error message is generated from Netbeans.

Command prompt:-
C:\Users\pc>mvn -version
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:28+0530)
Maven home: D:\apache-maven-3.0.5\bin\..
Java version: 1.7.0_11, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.7.0_11\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
C:\Users\pc>

Command prompt eror-

C:\Users\pc>mvn archetype:generate
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Jun 05, 2013 7:57:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
Jun 05, 2013 7:57:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
Jun 05, 2013 7:57:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Permission denied: connect
Jun 05, 2013 7:57:06 AM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect


I am using Win7 OS. I do not have proxy. I have added ' _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true'as Env variable and disabled IPv6.

Thank you.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

First thing I would do is upgrade to the latest JDK 7 - 7u11 is really old. Also, I don't have java.net.preferIPv4Stack set, try unsetting it. Finally, try running from the command line and not NetBeans.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven setup is not working in Eclipse or Netbeans