栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

在Maven插件执行中禁用目标

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

在Maven插件执行中禁用目标

通常,您只能使用技巧来禁用执行:

将执行阶段设置为不存在阶段(

dont-execute
)。但是请注意,您必须使用两个不同的执行ID才能分别关闭两个目标:

<plugin>    <groupId>org.eclipse.xtend</groupId>    <artifactId>xtend-maven-plugin</artifactId>    <version>2.5.3</version>    <executions>        <execution> <id>xtend-compile</id> <goals>     <goal>compile</goal>     <goal>testCompile</goal> </goals>        </execution>        <execution> <id>xtend-testCompile</id> <goals>     <goal>testCompile</goal> </goals>        </execution>    </executions></plugin>

子模块:

<plugin>    <groupId>org.eclipse.xtend</groupId>    <artifactId>xtend-maven-plugin</artifactId>    <version>2.5.3</version>    <executions>        <execution> <id>xtend-testCompile</id> <phase>dont-execute</phase>        </execution>    </executions></plugin>

当然,在您的特定情况下,您当然也可以

skipXtend
在每次执行中使用configuration属性来不跳过执行,而只是阻止插件执行任何操作:

<plugin>    <groupId>org.eclipse.xtend</groupId>    <artifactId>xtend-maven-plugin</artifactId>    <version>2.5.3</version>    <executions>        <execution> <id>xtend-testCompile</id> <configuration>     <skipXtend>xtend-testCompile</skipXtend> </configuration>        </execution>    </executions></plugin>


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/574281.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号