B.3. Maven 설정 파일
Maven settings.xml 파일에는 Maven에 대한 사용자별 구성 정보가 포함되어 있습니다. 여기에는 개발자 ID, 프록시 정보, 로컬 리포지토리 위치 및 사용자와 관련된 기타 설정과 같이 pom.xml 파일과 함께 배포해서는 안 되는 정보가 포함되어 있습니다.
settings.xml 파일은 다음 두 위치에 있습니다.
Maven 설치에서 다음을 수행합니다.
settings.xml파일은 <maven-install-dir>/conf/디렉터리에 있습니다. 이러한 설정을전역설정이라고 합니다. 기본 Maven 설정 파일은 사용자 설정 파일의 시작점으로 복사하고 사용할 수 있는 템플릿입니다.사용자 설치 시:
settings.xml파일은${user.home}/.m2/디렉터리에 있습니다. Maven 및 usersettings.xml파일이 모두 있는 경우 콘텐츠가 병합됩니다. 중복되는 경우 사용자의settings.xml파일이 우선합니다.
예 B.2. Maven 설정 파일
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<!-- Configure the JBoss AMQ Maven repository -->
<profile>
<id>jboss-amq-maven-repository</id>
<repositories>
<repository>
<id>jboss-amq</id>
<url>file:///path/to/repo/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-amq-maven-plugin-repository</id>
<url>file://path/to/repo</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!-- Optionally, make the repository active by default -->
<activeProfile>jboss-amq-maven-repository</activeProfile>
</activeProfiles>
</settings>
추가 리소스
-
settings.xml파일의 스키마는 http://maven.apache.org/xsd/settings-1.0.0.xsd 에서 사용할 수 있습니다. - Maven 설정 파일에 대한 자세한 내용은 설정 참조 를 참조하십시오.
2024-06-11에 최종 업데이트된 문서