Ale*_*lex 187
在禁用子POM中的Findbugs时,以下内容适用于我:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<executions>
<execution>
<phase>none</phase>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
注意:Findbugs插件的完整定义在我们的父/超级POM中,因此它将继承版本等等.
在Maven 3中,您需要使用:
<configuration>
<skip>true</skip>
</configuration>
Run Code Online (Sandbox Code Playgroud)
对于插件.
bma*_*ies 56
查看插件是否具有"skip"配置参数.几乎所有人都这样做.如果是,只需将其添加到子项中的声明:
<plugin>
<groupId>group</groupId>
<artifactId>artifact</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
如果没有,那么使用:
<plugin>
<groupId>group</groupId>
<artifactId>artifact</artifactId>
<executions>
<execution>
<id>TheNameOfTheRelevantExecution</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
小智 35
线程很旧,但也许有人仍然感兴趣.我发现的最短形式是对λlex和bmargulies的例子的进一步改进.执行标记如下所示:
<execution>
<id>TheNameOfTheRelevantExecution</id>
<phase/>
</execution>
Run Code Online (Sandbox Code Playgroud)
我要强调2点:
发布后发现它已经在stackoverflow中: 在Maven多模块项目中,如何在一个子节点中禁用插件?
归档时间: |
|
查看次数: |
83697 次 |
最近记录: |