How to add local jar files to a Maven project?

后端 未结 30 3268
悲&欢浪女
悲&欢浪女 2020-11-21 04:58

How do I add local jar files (not yet part of the Maven repository) directly in my project\'s library sources?

30条回答
  •  闹比i
    闹比i (楼主)
    2020-11-21 05:19

    Note that it is NOT necessarily a good idea to use a local repo. If this project is shared with others then everyone else will have problems and questions when it doesn't work, and the jar won't be available even in your source control system!

    Although the shared repo is the best answer, if you cannot do this for some reason then embedding the jar is better than a local repo. Local-only repo contents can cause lots of problems, especially over time.

提交回复
热议问题