Assemblies
Build/Maven : 2007. 12. 4. 23:37
maven-assembly-plugin 플러그인은 프로젝트를 특정 파일로 묶을 때 사용할 수 있습니다.
이 플러그인은 다음의 7개의 goal을 제공합니다.
assembly
attached
directory
directory-inline
single
directory-single
unpack
가장 간단하게 이 플러그인을 사용하는 방법은 미리 정의되어 있는 타입으로 패키징을 하는 것입니다. 제가 참조하는 문서가 작성되는 시점에서 다음과 4가지 타입으로 묶을 수 있습니다.
묶을 프로젝트의 POM의 configuration 엘리먼트를 다음과 같이 설정합니다.
물론 위와 같이 이미 정의되어 있는 묶기 방식을 사용해도 되지만, 이것도 역시 커스터마이징 할 수 있습니다. 그 방법은.. 밤이 깊어져가는 관계로.. 나중에 봐야겠네요.
이 플러그인은 다음의 7개의 goal을 제공합니다.
assembly
attached
directory
directory-inline
single
directory-single
unpack
가장 간단하게 이 플러그인을 사용하는 방법은 미리 정의되어 있는 타입으로 패키징을 하는 것입니다. 제가 참조하는 문서가 작성되는 시점에서 다음과 4가지 타입으로 묶을 수 있습니다.
- bin : 프로젝트 base 폴더 위치한 README*, LICENSE*, NOTICE* 파일들을 묶어줍니다.
- src : 프로젝트의 src 폴더에 위치한 모든 파일과 README*, LICENSE*, NOTICE*, pom.xml 파일들을 묶어줍니다.
- project : 프로젝트의 target 디렉터리와 CVC>> 나 <<.svn과 같은 파일들을 제외한 모든 파일을 묶어줍니다.
- jar-with-dependencies : Explodes all dependencies of this project and packages the exploded forms into a jar along with the project's outputDirectory. Note that this default assembly descriptor only creates a jar, not the three zip types.
mvn assembly:assembly -DdescriptorId=jar-with-dependencies
묶을 프로젝트의 POM의 configuration 엘리먼트를 다음과 같이 설정합니다.
<project>
...
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
<descriptorRef>src</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
...
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
<descriptorRef>src</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
물론 위와 같이 이미 정의되어 있는 묶기 방식을 사용해도 되지만, 이것도 역시 커스터마이징 할 수 있습니다. 그 방법은.. 밤이 깊어져가는 관계로.. 나중에 봐야겠네요.
'Build > Maven' 카테고리의 다른 글
기본적인 managed dependency 사용법 (2) | 2008.04.17 |
---|---|
Managed Depedency 네 녀석의 정체를 드디어 알았다. (0) | 2008.04.17 |
Managed dependency는 무슨 뜻인가요? (0) | 2008.04.14 |
Maven을 쓴다고 해서 종속성을 안중에서 Out 시킬 수 있느냐? (2) | 2008.03.03 |
Archetype 만들기 (4) | 2007.12.21 |
Assemblies (0) | 2007.12.04 |
Maven 괜찮은데~ (0) | 2007.12.04 |
Site Generation (0) | 2007.12.03 |
http://mvnrepository.com/ (0) | 2007.12.02 |
Profile (0) | 2007.11.30 |
Archetype (0) | 2007.11.29 |