This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 255325 - Cannot download sources, Javadoc from Artifactory - MAVEN_OPTS/settings.xml ignored?
Summary: Cannot download sources, Javadoc from Artifactory - MAVEN_OPTS/settings.xml i...
Status: RESOLVED DUPLICATE of bug 247988
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-16 10:48 UTC by Leperous
Modified: 2016-06-23 10:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leperous 2015-09-16 10:48:38 UTC
My company recently moved our Artifactory instance from HTTP to HTTPS, so we need to provide Maven with a path to a trust store. I have set a global environment variable in Windows:

MAVEN_OPTS=-Djavax.net.ssl.trustStore=C:\path\to\store -Djavax.net.ssl.trustStorePassword=password

This is picked up fine by Maven when I build, either within Netbeans or in cmd/cygwin/etc.

However, since the move, I can no longer download sources for my dependencies (from the right-click menu, either directly on a particular artifact or download-all). There are no errors in the IDE log.

It seems to me that the Netbeans Maven plugin is ignoring, or overriding, the system MAVEN_OPTS.

When I try to index, I get the following related error:

INFO [org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl]: could not (re-)index central
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
	at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431)
	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126)
	at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572)
	at org.apache.maven.wagon.shared.http4.ConfigurableSSLSocketFactoryDecorator.connectSocket(ConfigurableSSLSocketFactoryDecorator.java:64)
	at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
	at org.apache.maven.wagon.providers.http.httpclient.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
	at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
	at org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
	at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
	at org.apache.maven.wagon.providers.http.httpclient.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
	at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:746)
	at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:886)
Caused: org.apache.maven.wagon.TransferFailedException: peer not authenticated
	at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:892)
	at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
	at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
	at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
	at org.apache.maven.index.updater.WagonHelper$WagonFetcher.retrieve(WagonHelper.java:219)
Caused: java.io.IOException: Transfer for nexus-maven-repository-index.properties failed; peer not authenticated
	at org.apache.maven.index.updater.WagonHelper$WagonFetcher.retrieve(WagonHelper.java:241)
	at org.apache.maven.index.updater.WagonHelper$WagonFetcher.retrieve(WagonHelper.java:201)
	at org.apache.maven.index.updater.DefaultIndexUpdater.downloadIndexProperties(DefaultIndexUpdater.java:459)
	at org.apache.maven.index.updater.DefaultIndexUpdater.access$000(DefaultIndexUpdater.java:76)
	at org.apache.maven.index.updater.DefaultIndexUpdater$IndexAdaptor.setProperties(DefaultIndexUpdater.java:589)
	at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:814)
	at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:157)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexLoadedRepo(NexusRepositoryIndexerImpl.java:505)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.access$200(NexusRepositoryIndexerImpl.java:119)
[catch] at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$2$1.run(NexusRepositoryIndexerImpl.java:550)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$2$1.run(NexusRepositoryIndexerImpl.java:547)
	at org.openide.util.Mutex.writeAccess(Mutex.java:404)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$2.run(NexusRepositoryIndexerImpl.java:547)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 1 Leperous 2015-09-16 10:55:34 UTC
"Peer not authenticated" is because a server/username/password block in my Maven settings.xml is not being picked up. Probably because of the same problem.
Comment 2 Leperous 2015-09-16 10:55:42 UTC
"Peer not authenticated" is because a server/username/password block in my Maven settings.xml is not being picked up. Probably because of the same problem.
Comment 3 Tomas Stupka 2016-06-23 10:03:27 UTC
source download is done by the bundled 3.0.5 mvn client which does not support https
Comment 4 Tomas Stupka 2016-06-23 10:03:59 UTC

*** This bug has been marked as a duplicate of bug 247988 ***