Reputation: 1244
I am starting with a project where I want to use latest versions of hibernate and the hibernate spatial extension. Therefore I decided to start with a maven project to manage all the dependencies. I have to say, that I am pretty unexperienced both in using maven an the maven netbeans plugin, but I think it is the best option for my requirements. I am using Netbeans 7.2.1.
There is a short and simple description how to add the remote repos for hibernate spatial to maven (http://www.hibernatespatial.org/mavenquick.html).
I added these repo's in netbeans - services - maven repositories. Then I clicked on "Update Index" but nothing happens.
I also tried to open the repo Url in my Browser and I got all the files that it should deliver.
Why is Netbeans not updating the index? Is there a possibility to index the remote repo on maven commandline so that I am able to bypass netbeans and possibly get more info about what is happening?
Upvotes: 0
Views: 5918
Reputation: 149
Using version 11 of Netbeans I have been able to force the download of last archetype-catalog.xml from remote repo by deleting the cache ([].netbeans.cache\11\mavenarchetypes).
Upvotes: 0
Reputation: 2321
I added these repo's in netbeans - services - maven repositories. Then I clicked on "Update Index" but nothing happens.
The Services/Maven repositories node only deals with indexes that help with some IDE searching capabilities. It's not affecting build in any way. If you want to change your build, either add it to pom.xml or to settings.xml in the usual maven manner. Please note that such active repositories should effectively show up in your Services node in the end.
Update Index action attempts to download the index from the remote location. There are multiple points of failure here. The repository might not provide an index, or your maven proxy settings don't allow you to connect (we use explicitly maven settings, not IDE proxy settings), your mirrors defined in settings.xml mirror this repository but don't provide the content for it.
Even if the index is downloaded and processed (you can browse the content in Services node), the individual artifacts might be missing from the index because the server side job updates only occasionally.
In any case you are not limited in any way when not having the index around. You can still add the dependency to the project if you know the coordinates. Either through the UI or by editing the pom.xml file.
Upvotes: 1
Reputation: 31649
I recommend you adding the repo you need into your {home}/.m2/settings.xml file (or alternatively your pom file in the project). That's where your Maven installation takes the configurations from at first. So that way you avoid using NetBeans to do that and you'll be sure that Maven will be using that repo no matter the way you call it (NetBeans embedded, command line...).
Add this repositories into your file:
<repository>
<id>OSGEO GeoTools repo</id>
<url>http://download.osgeo.org/webdav/geotools</url>
</repository>
<repository>
<id>Hibernate Spatial repo</id>
<url>http://www.hibernatespatial.org/repository</url>
</repository>
You'll probably find this guide from Maven official site useful.
Upvotes: 1