Adding external JAR to Maven project in NetBeans

后端 未结 5 714
挽巷
挽巷 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:31

    This answer is for jars that are in the maven repo

    Let's say I want to add log4j-1.2.17.jar to my project, all I have to do is find it in maven repository

    Step 2 is to copy that and place it inside the dependencies tag of your pom.xml` file:

    
        
            org.webjars
            bootstrap
            3.3.4
        
        
            log4j
            log4j
            1.2.17
        
         ....
         ....
      
    

    Step 3 Build and clean your project. The jar file will be in your dependencies folder afterwards

提交回复
热议问题