How to add “Maven Managed Dependencies” library in build path eclipse?

后端 未结 15 1658
心在旅途
心在旅途 2020-12-04 11:04

I have created a Maven project and I want to add all Maven dependencies in build path of the project in Eclipse. When I go to Java Bui

15条回答
  •  佛祖请我去吃肉
    2020-12-04 11:44

    You could also consider to maven-dependency-plugin to your pom:

    
    ... 
         
            maven-dependency-plugin 
                 
                     
                        process-resources 
                         
                            copy-dependencies 
                         
                           
                            ${project.build.directory}/lib 
                         
                     
                 
         
    ...
    
    

    Than you can run "mvn package" and maven will copy all needed dependencies to your_project_path/target/your_project_name/WEB-INF/lib/ directory. From there you can copy them to your project/lib dir and add as external jars (configuring your project settings buildpath)

提交回复
热议问题