1

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?

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
Maven
  • 11
  • 2

2 Answers2

4

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</url>
    </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

Community
  • 1
  • 1
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
0

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 K
  • 11,996
  • 7
  • 37
  • 65