2
votes

I am using NetBeans IDE 8.2 with Maven 3.5.0. When one of the actions from NetBeans tries to download a plugin, it fails:

Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/xml-maven-plugin/1.0/xml-maven-plugin-1.0.pom

Failed to retrieve plugin descriptor for org.codehaus.mojo:xml-maven-plugin:1.0: Plugin org.codehaus.mojo:xml-maven-plugin:1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:xml-maven-plugin:jar:1.0

I defined the proxy at:

  • NetBeans: Tools -> Options -> General
  • C:\Program Files\apache-maven-3.5.0\conf\settings.xml
  • C:\Users[MyUser].m2

In both settings files, I tried to add proxy for both http and https, with and without optional id, and also tried to change the order.

<proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>https</protocol>
      <host>RealProxyIP</host>
      <port>RealProxyPort</port>
</proxy>

Every time, it looks like working from the command line works properly (I also used mvn help:effective-settings to verify the settings changes), but from NetBeans the download still fails (and it takes about 30 minutes for NetBeans to stop trying to download the plugins).

Any advice?

Thanks

2
Check your Net Beans proxy settings under Tools -> Options -> General. Select the appropriate proxy setting for your local workstation (non, System, or Manual + url and Port). Then test.Michael Peacock
I did. That is the first bullet in the above list of proxy definitions. ThanksSivan R
According to the NetBeans FAQ, the IDE proxy settings don't apply to maven. See wiki.netbeans.org/FaqMavenProxySettings.Corey
The problem was caused because of one of the values in the "No Proxy Hosts" (in Advanced proxy settings). I deleted the values there, and everything worked.Sivan R

2 Answers

1
votes

The problem was caused because of one of the values in the "No Proxy Hosts" (in Advanced proxy settings). I deleted the values there, and everything worked.

0
votes

Appending -J-Djava.net.preferIPv4Stack=true to the netbeans_default_options variable in ./netbeans/etc/netbeans.conf did work for me.

Although this issue was reported in 2008, it still seems to come back sometimes. Comment #24 reports this solution doesn't work, but #28 confirms success: https://bz.apache.org/netbeans/show_bug.cgi?id=136036