Maven, how to add additional libs not available in repo

前端 未结 5 1626
深忆病人
深忆病人 2020-12-11 05:57

I have a maven project that has a set of library dependancies that are not available via any maven repository. How can I add those libraries to the pom? I want to do this s

5条回答
  •  不思量自难忘°
    2020-12-11 06:32

    You have 3 options:

    • Add your libraries to your local repository via install:install-file (obviously, this is not portable, you won't be able to build the project on another machine without doing the same).
    • Install and run an "enterprise repository" like Nexus, Archiva, or Artifactory and add your libraries via deploy:deploy-file.
    • Setup a file based repository as described in this previous answer and put your libraries in there.

    Then, declare your libraries in your pom like any other dependency.

提交回复
热议问题