Maven
[MAVEN] maven-dependency-plugin 모든 의존관계 JAR 복사
Kim, Lucas
2014. 11. 21. 16:18
# 네이버블로그에서 이사 (http://blog.naver.com/rkdmfql1540)
copy all dependency jar files to target/dependency directory
pom.xml example
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.egtry</groupId> <version>1</version> <artifactId>dependency_copy</artifactId> <dependencies> <dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-servlet</artifactId> <version>8.1.0.v20120127</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>copy-dependencies</id> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
build and copy command
mvn package