Maven: keeping dependent jars in project version control

后端 未结 5 1939
猫巷女王i
猫巷女王i 2021-01-02 01:37

So, I have a war project with several dependent jars that are not available in any repository. Up until recently, I\'d been keeping them in src/main/webapp/WEB-INF/lib

5条回答
  •  醉酒成梦
    2021-01-02 01:59

    There are lots of good answers here already, and you should strongly consider setting up a repository manager such as Archiva for your group as it'll provide other benefits both now and over time.

    However, to directly answer your question, here is a pattern for storing dependencies in version control with Maven: http://brettporter.wordpress.com/2009/06/10/a-maven-friendly-pattern-for-storing-dependencies-in-version-control/

    Please keep in mind the caveat that it limits the project to being used self-contained itself - if you start wanting to share it as a dependency for other Maven projects you'll still need a repository set up.

提交回复
热议问题