Maven: keeping dependent jars in project version control

后端 未结 5 1924
猫巷女王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条回答
  •  旧时难觅i
    2021-01-02 01:44

    If setting up Nexus or just a simple fileserver repo as suggested by Jan is really too much trouble, here are some other options:

    • Simply include the JARs and a script that'll install them all in a directory of your choosing in version control. No need for the Maven structure to sanction it.
    • Use your version control system as a host for the repository, either on a branch by itself in your main project or as a separate project. Let any backup, security, etc. you already have on version control apply to the repository without including the jars in the set of files that are actually being checked out and committed.
    • Include the jars in a folder that acts as a mini-repository that is checked out with the rest of the code. Have pom.xml point to that folder as a repository it uses. I'm not 100% sure this is possible, but it seems likely that it is.

提交回复
热议问题