maven project 를 사용해서 여러 project를 release할 필요가 있을 경우
parent, child를 설정해서 한번에 컴파일 가능하다.
<parent> pom.xml
<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.sds.ump</groupId> <artifactId>SATotalCompile</artifactId> <version>1.0.1</version> <packaging>pom</packaging> <name>SA Total compile</name>
<profiles> <profile> <id>sa</id> <modules> <module>../../../SACompile/SMB/smb</module> </modules> </profile>
<profile> <id>Emul</id> <modules> <module>../../../SACompile/SMB/smb</module> <module>../../../Source/workspace/UMPServerEmul</module> </modules> </profile>
<profile> <id>release</id> <modules> <module>../../../SACompile/SMB/smb</module> <module>../../../Source/workspace/UMPServerEmul</module> <module>../../../Source/workspace/UMP_SA_TOOLS_saEmul</module> </modules> </profile>
<profile> <id>acc</id> <modules> <module>../../../Source/workspace/UMPServerEmul</module> <module>../../../Source/workspace/UMP_SA_TOOLS_saEmul</module> </modules> </profile>
</profiles>
</project> |
child pom의 경우, 아래 parent tag만 추가 하면 된다.
<child pom.xml>
<parent> <groupId>com.sds.ump</groupId> <artifactId>SATotalCompile</artifactId> <version>1.0.1</version> <relativePath>../../../Source/workspace/SATotalCompile/pom.xml</relativePath> </parent> |
relativePath는 parent가 상위 폴더가 아닌, 다른 폴더에 있는 경우,
해당 폴더의 상대경로 혹은 절대 경로를 적어 준다.