Maven Enforcer Plugin
개요
maven-enforcer-plugin 은 maven version, JDK, OS famaily 등 여러 제약사항등을 관리하는 기능을 수행하는 플러그인이다.
Goals
다음과 같은 두 개의 goal 이 있다.
- enforcer:enforce executes rules for each project in a multi-project build.
- enforcer:display-info display the current information as detected by the standard rules.
사용
pluginManagement 에 등록
설정
<pluginManagement> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>1.3.1/version> </plugin> </pluginManagement>
maven 3.04 및 JDK1.6 constraint 를 설정한 enforcer-plugin 설정 예
설정
<build> <plugins> <plugin> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> <id>enforce-build-environment</id> <phase>verify</phase> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireMavenVersion> <version>3.0.4</version> </requireMavenVersion> <requireJavaVersion> <version>1.6</version> </requireJavaVersion> </rules> </configuration> </execution> </executions> </plugin> </plugins> </build>
Ref