tags:

views:

20

answers:

2

Is there a Maven repository with more recent versions of the jars that I need? The main repository is often behind a few minor releases... Also, how do I go about adding additional repositories in my pom.xml file?

+3  A: 

Is there a Maven repository with more recent versions of the jars that I need? The main repository is often behind a few minor releases...

Since I can't read minds, I don't know :) There is no general answer, be more specific. But in a corporate environment, one would typically run a repository manager like Nexus and deploy anything non available in public repositories (but approved) in it.

Also, how do I go about adding additional repositories in my pom.xml file?

To add a repository for dependencies, you need to specify a repositories element as follows:

<project>
  ...
  <repositories>
    <repository>
      <id>my-internal-site</id>
      <url>http://myserver/repo&lt;/url&gt;
    </repository>
  </repositories>
  ...
</project>

And if you want to add a repository for plugins, you need to specify a pluginRepositories element (its structure is similar to the above one).

Related questions

References

Pascal Thivent
A: 

Nothing precludes you from creating your own artifacts, in fact maven supports adding 3rd party jars to your local repository:

http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

Chris Kaminski