참조 : http://maven.apache.org/ref/2.0.8/maven-settings/settings.html
사용자 삽입 이미지
현재 제가 사용하고 있는 settings.xml 파일에서 1단계 엘리먼트만 보여주고 있습니다.

1. settings

최상위 엘리먼트로, 하위 엘리먼트들로 메이븐 설정함.

2. pluginGroups

  <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>

흠..그럼 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>

이렇게 설정되어 있습니다. 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>

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>