How to add local jar files to a Maven project?

后端 未结 30 3373
悲&欢浪女
悲&欢浪女 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条回答
  •  名媛妹妹
    2020-11-21 05:15

    This is a short syntax for newer versions:

    mvn install:install-file -Dfile=
    

    It works when the JAR was built by Apache Maven - the most common case. Then it'll contain a pom.xml in a subfolder of the META-INF directory, which will be read by default.

    Source: http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

提交回复
热议问题