/
maven plugins 와 pluginManagement 구문의 차이
maven plugins 와 pluginManagement 구문의 차이
maven 의 pom 파일에 <plugins/> 태그와 <pluginManagement/> 로 maven plugin 설정을 할수 있다.
둘 다 plugin 에 대한 설정을 할수 있지만 차이점은 <pluginManagement/>는 여러 모듈들간에 설정 내용을 공유할 때 사용(Ex: parent-pom 에 지정후 child-pom 에서 상속받아 사용)하고 <plugins/> 는 해당 파일에서만 사용할 경우에 쓰면 된다.
parent, child 구성의 pom 이 아니라면 <pluginManagement/> 를 쓸 필요가 없어 보인다.
<plugins>
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.4</version> <executions> <execution> <phase>install</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <!-- ...... --> </configuration> </execution> </executions> </plugin> </plugins>
<pluginManagement/>
<pluginManagement> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.4</version> <executions> <execution> <phase>install</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <!-- ...... --> </configuration> </execution> </executions> </plugin> </pluginManagement>
Ref
, multiple selections available,
Related content
Maven Javadoc Plugin
Maven Javadoc Plugin
More like this
maven site plugin
maven site plugin
More like this
Maven project 의 build 및 각종 설정 정보를 볼수 있는 maven help plugin
Maven project 의 build 및 각종 설정 정보를 볼수 있는 maven help plugin
More like this
maven PMD plugin 사용해서 문제되는 코드 검출하기
maven PMD plugin 사용해서 문제되는 코드 검출하기
More like this
내가 만든 PHP Composer 패키지를 Packagist.org 에 등록하는 방법
내가 만든 PHP Composer 패키지를 Packagist.org 에 등록하는 방법
More like this
uber-jar 를 만들기 위한 maven shade plugin
uber-jar 를 만들기 위한 maven shade plugin
More like this