Adding external JAR to Maven project in NetBeans

后端 未结 5 712
挽巷
挽巷 2020-12-04 22:10

When I right click on my Maven project and choose the Add dependency option and I type my external jar\'s name in query, it is not found. How to add external jar to

5条回答
  •  情话喂你
    2020-12-04 22:36

    You can follow this tutorial: http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

    Example:

    Install the jar to your local maven repository:

    mvn install:install-file -Dfile=cxf-2.7.3.jar -DgroupId=org.apache.cxf -DartifactId=cxf-bundle -Dversion=2.7.3 -Dpackaging=jar
    

    Edit the pom.xml file in your project to include the newly added dependency:

    
    org.apache.cxf
    cxf-bundle
    2.7.3
    
    

    This should work regardless of the IDE you are using.

提交回复
热议问题