在定义了插件的情况下
<pluginManagement>,您实际上是在告诉maven在调用插件时将在整个项目中使用哪个版本的插件。我通常希望
<pluginManagement>标签出现在父pom中。
要调用插件-只需放置
<plugins/>元素。它可能会或可能不会从
因此,要使用该插件,您只需通过输入以下内容来调用该插件
<plugins> <plugin> <groupId>org.prehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.3</version> <executions> <execution> <id>build-test-environment</id> <phase>generate-test-resources</phase> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>main.java._tools.BuildTestEnvironment</mainClass> </configuration> </plugin> ...AnyOtherPlugin <plugins>
没有任何
<pluginManagement>标签



