maven导出工程pom文件中依赖的jar包

在工程的pom文件里加上下面plugin, 然后执行mvn clean package -Dmaven.test.skip=true命令,就可以lib包收集起来了

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
   <version>3.0.1</version>
    <executions>
        <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>
               <outputDirectory>lib</outputDirectory>
                <overWriteSnapshots>true</overWriteSnapshots>
            </configuration>
        </execution>
    </executions>
</plugin>

 

posted on 2019-12-12 14:41  cxhfuujust  阅读(821)  评论(0编辑  收藏  举报

导航