Maven: How to include jars in Eclipse, which are not available in repository?

前端 未结 5 1466
自闭症患者
自闭症患者 2020-12-16 16:40

I have copied the JARs into src\\main\\webapp\\WEB-INF\\lib.
I use eclipse. If I add the jars one-by-one to Project-> Java Build Path-> Add jars, then I do

5条回答
  •  借酒劲吻你
    2020-12-16 17:18

    Not all libraries can be found in a public Maven repository, for example your own libraries or proprietary libraries. Anyway first you can search the Maven Repository, maybe some of them are there.

    In case they are really not there, and you don't want to install Nexus or Artifactory, you can choose one of these two approaches:

    • install the jars in your local repository cache, no need to create a special repository. See the instructions on mkyong.

    • another approach is using system dependencies, you just put a path to reach the Jar in the filesystem. It's a less recommended approach, but if you really want it will work. Here is the official documentation.

提交回复
热议问题