메이븐 settings.xml 살펴보기
Build/Maven : 2008. 9. 29. 11:44
참조 : http://maven.apache.org/ref/2.0.8/maven-settings/settings.html

현재 제가 사용하고 있는 settings.xml 파일에서 1단계 엘리먼트만 보여주고 있습니다.
1. settings
최상위 엘리먼트로, 하위 엘리먼트들로 메이븐 설정함.
2. pluginGroups
열어보면 이렇게 설정되어 있습니다. Maven-Clover2-Plugin 설치할 때 settings.xml에 추가한 기억이 납니다. 뭔 내용인지 몰랐는데, 지금 살펴봅니다.
흠..그럼 pom에서 저렇게 플러긴의 groupId를 명시했으니까, 설정을 지워도 되겠군요.
3. mirrors
이렇게 설정되어 있습니다. mirrors는
mirrorOf The server ID of the repository being mirrored, eg "central". This MUST NOT match the mirror id.
name The optional name that describes the mirror.
url The URL of the mirror repository.
id No description.
4. profiles
흠.. 이 녀석을 사용해서, JDK 버전 별 또는 OS 마다 빌드 구성을 달리 할 수 있는 거로군요. 하지만, 복잡하니까 나중에 다루기로 하고, pass
5. activeProfiles
6. servers
Configuration of server-specific settings, mainly authentication method. This allows configuration of authentication on a per-server basis.
서버와 관련된 설정으로, 주로 인증하는 방법을 제공. 이것을 통해 서버 당 인증 정보를 담고 있을 수 있다.
이 때, 위에서 사용한 id의 값은 pom에서 설정한 저장소의 id와 일치해야 하는 듯.. pom.xml을 보면 짐작할 수 습니다.
현재 제가 사용하고 있는 settings.xml 파일에서 1단계 엘리먼트만 보여주고 있습니다.
1. settings
최상위 엘리먼트로, 하위 엘리먼트들로 메이븐 설정함.
2. pluginGroups
<pluginGroups>
<pluginGroup>com.atlassian.maven.plugins</pluginGroup>
</pluginGroups>
<pluginGroup>com.atlassian.maven.plugins</pluginGroup>
</pluginGroups>
열어보면 이렇게 설정되어 있습니다. Maven-Clover2-Plugin 설치할 때 settings.xml에 추가한 기억이 납니다. 뭔 내용인지 몰랐는데, 지금 살펴봅니다.
List of groupIds to search for a plugin when that plugin groupId is not explicitly provided.groupid 리스트로 플러그인의 groupId가 명시적으로 설정되어 있지 않을 때 플러그인을 찾을 곳이로군요.
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<generateXml>true</generateXml>
<generateHtml>true</generateHtml>
<licenseLocation>/app/webapp/opensprout/clover/clover.license</licenseLocation>
<includesTestSourceRoots>
false
</includesTestSourceRoots>
</configuration>
</plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<generateXml>true</generateXml>
<generateHtml>true</generateHtml>
<licenseLocation>/app/webapp/opensprout/clover/clover.license</licenseLocation>
<includesTestSourceRoots>
false
</includesTestSourceRoots>
</configuration>
</plugin>
흠..그럼 pom에서 저렇게 플러긴의 groupId를 명시했으니까, 설정을 지워도 되겠군요.
3. mirrors
<mirrors>
<mirror>
<id>Nexus</id>
<name>Nexus Public Mirror</name>
<url>http://www.opensprout.org:8082/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<mirror>
<id>Nexus</id>
<name>Nexus Public Mirror</name>
<url>http://www.opensprout.org:8082/nexus/content/groups/public</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
이렇게 설정되어 있습니다. mirrors는
Configuration of download mirrors for repositories.저장소에 대한 다룬로드 미러들을 설정이로군요. 그럼. mirror는
A download mirror for a given repository.하나의 저장소에 대한 하나의 미러 설정이군요. 각각의 속성들은
mirrorOf The server ID of the repository being mirrored, eg "central". This MUST NOT match the mirror id.
name The optional name that describes the mirror.
url The URL of the mirror repository.
id No description.
4. profiles
흠.. 이 녀석을 사용해서, JDK 버전 별 또는 OS 마다 빌드 구성을 달리 할 수 있는 거로군요. 하지만, 복잡하니까 나중에 다루기로 하고, pass
5. activeProfiles
<activeProfiles>
<activeProfile>dev</activeProfile>
</activeProfiles>
List of manually-activated build profiles, specified in the order in which they should be applied.위에서 설정한 여러 프로파일중에서 직접 활성화 시킬 빌드 프로파일 목록. 설정한 순서대로 적용된다.
6. servers
<servers>
<server>
<id>release</id>
<username>admin</username>
<password>---</password>
</server>
<server>
<id>snapshot</id>
<username>admin</username>
<password>---</password>
</server>
</servers>
<server>
<id>release</id>
<username>admin</username>
<password>---</password>
</server>
<server>
<id>snapshot</id>
<username>admin</username>
<password>---</password>
</server>
</servers>
Configuration of server-specific settings, mainly authentication method. This allows configuration of authentication on a per-server basis.
서버와 관련된 설정으로, 주로 인증하는 방법을 제공. 이것을 통해 서버 당 인증 정보를 담고 있을 수 있다.
이 때, 위에서 사용한 id의 값은 pom에서 설정한 저장소의 id와 일치해야 하는 듯.. pom.xml을 보면 짐작할 수 습니다.
<distributionManagement>
<repository>
<id>release</id>
<url>http://www.opensprout.org:8082/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://www.opensprout.org:8082/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<repository>
<id>release</id>
<url>http://www.opensprout.org:8082/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://www.opensprout.org:8082/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
'Build > Maven' 카테고리의 다른 글
아키타입(메이븐 프로젝트 베이스) 만들기 (0) | 2008.11.03 |
---|---|
Maven 프로젝트 의존성 파일들 패키징하기 (2) | 2008.10.23 |
Maven 같지 않은 Maven 프로젝트 만들기 (2) | 2008.10.21 |
Maven 멀티 모듈 프로젝트 구성하기 (2) | 2008.10.20 |
OSAF 메이븐 저장소 사용하기 (13) | 2008.10.14 |
메이븐 settings.xml 살펴보기 (0) | 2008.09.29 |
메이븐으로 원격 저장소에 라이브러리 배포하기 (6) | 2008.09.08 |
Maven을 활용한 배포 (0) | 2008.09.08 |
Nexus - Maven Repository Manager 설치하기 (8) | 2008.08.18 |
로컬에서는 무사히 빌드가 되는데, 왜 서버로 올라가서 CI가 돌리면 컴파일 에러가 날까 (0) | 2008.07.28 |
메이븐 플러그인 탐험기1 - UMLGraph (0) | 2008.07.28 |