开发者

Maven Repository With More Recent Versions?

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.开发者_StackOverflow中文版xml file?


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

  • Maven, how to add additional libs not available in repo

References

  • Introduction to Repositories
  • POM Reference
    • 5.5 Repositories
    • 5.6 Plugin Repositories


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜