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 246414 - Artifactory's virtual repos' indexes fail
Summary: Artifactory's virtual repos' indexes fail
Status: RESOLVED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: PC Windows 8 x64
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 18:10 UTC by ferhat.savci
Modified: 2014-08-20 11:41 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 ferhat.savci 2014-08-12 18:10:08 UTC
When using Artifactory, mirrors for remote repos and local repos work correctly (their indexes are updated and artifacts they contain can be found and downloaded) when added to the Maven repositories in the Services tab.

Artifactory also provides virtual repos that combine one or more remote/local repos. When one of these is added, the index is not updated, and there a lot of sockets to the repo with state TIME_WAIT on the netstat list. Needless to say searches for the artifacts they contain return nil and dependencies are not downloaded.

The IDE Log contains:

INFO [org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl]: could not (re-)index libs-release
org.apache.maven.wagon.ResourceDoesNotExistException: File: http://localhost:8081/artifactory/libs-release/.index/nexus-maven-repository-index.properties , ReasonPhrase:Not Found.
	at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:939)
	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.FileNotFoundException: Resource nexus-maven-repository-index.properties does not exist
	at org.apache.maven.index.updater.WagonHelper$WagonFetcher.retrieve(WagonHelper.java:233)
	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)

As far as I see, virtual repos have an empty .index folder, whereas the working "concrete" repos don't even have an .index folder. 

And it's the same when I use the bundled Maven or a freshly installed apache-maven-3.2.2.
Comment 1 Martin Entlicher 2014-08-15 10:42:43 UTC
This may not be a NetBeans issue. See:
http://forums.jfrog.org/Cannot-retrieve-nexus-maven-repository-index-properties-td5457644.html
Comment 2 Martin Entlicher 2014-08-15 10:51:18 UTC
I'm not really familiar with Maven to that extent, but at
http://forums.jfrog.org/Cannot-retrieve-nexus-maven-repository-index-properties-td5457644.html#message5460902
they talk about this URL:
http://mavenrep.da.sa:8081/artifactory/libs-releases/.index/nexus-maven-repository-index.properties
and in this issue this URL can not be found:
http://localhost:8081/artifactory/libs-release/.index/nexus-maven-repository-index.properties
Isn't it a configuration issue that it uses localhost instead of mavenrep.da.sa?
Can you please check, ferhat.savci?
Comment 3 ferhat.savci 2014-08-20 11:41:32 UTC
@mentlicher

Yup, looks like it.

We can close the issue, it's not NetBeans related.

Artifactory virtual repos seem to work with Maven only after you index them. "Concrete" repos work witout indexing. Artifactory adds an empty .index directory to virtual repos even when they are not indexed. When it detects the .index directory Maven presumes the index and properties files reside in it and does not fall back to directory scanning if they do not.