Maven-14插件管理

 pluginManagement插件管理.

同dependencyManagement一样pluginManagement可管理插件

父模块中的配置如下

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-sources</id>
							<phase>verify</phase>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				
			</plugins>
		</pluginManagement>
	</build>


子模块配置如下

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>


 

发布了55 篇原创文章 · 获赞 14 · 访问量 17万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章