How do I find out Apache Buildr/Maven 2 repo names
I'm just starting to use Apache Buildr and I'm constantly running into the problem of not knowing what repo urls and versions are available for me to use.
For example I开发者_Python百科 want to use Scala 2.8 in a build file, the id i previously used was:
2.8.0-SNAPSHOT
But now this is not found. I also want to use the latest version of Apache POI. If I look on the maven2 repo:
http://mirrors.ibiblio.org/maven2/
I can see that it only has up to version 3.2.
Is there any standard way of finding repos and searching them for what they have available?
Is there any standard way of finding repos and searching them for what they have available?
No, there is no directory of repositories (actually, having many repositories kinda defeats the concept of a central and unique repository but I guess that centralizing everything is a bit utopia).
But there are several repository search engines that index the most "famous" one (like central, java.net, codehaus, jboss):
- http://repository.apache.org/
- http://www.artifact-repository.org/
- http://mvnrepository.com/
- http://www.mvnbrowser.com/
- http://www.jarvana.com/
- http://mavensearch.net/
- http://maven.ozacc.com/
- http://www.mavenreposearch.com/
- http://www.mvnsearch.org/
- http://repository.sonatype.org/
In the particular case of Apache POI, version 3.6 is available in the central repo. To use it, just declare the following dependency:
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.6</version>
</dependency>
To search the repositories try NetBeans. It provides a nice repository browser, where you can add the repositories which you like.
Here are some (see Pascal's for more):
- http://download.java.net/maven/2/ ('java.net')
- http://repository.jboss.com/maven2/ ('jboss.org')
- http://bits.netbeans.org/maven2/
- http://repo1.maven.org/eclipse
NetBeans also provides autocompletion within the pom.xml for dependencies etc (e.g. to get the latest version) ... but for scala I am not sure if this is useful.
精彩评论