我是新手。我的产品结构如下
myWebProduct
pom.xml
coreModule
webModule
htmlTestModule
maven 发布插件是在公司级别的pom.xml
文件中定义的,该文件是myWebProduct
. 它设置了发布插件运行的默认目标deploy
和默认的preparationGoals clean verify install
。
我想在myWebProduct
工作正常的级别发布产品,但我想跳过发布htmlTestModule
. 因为deploy
生命周期开启htmlTestModule
会导致将war文件部署到远程Tomcat服务器,我不希望在发布期间发生这种情况。
我试图pom.xml
在htmlTestModule
.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
<configuration>
<skip>true</skip>
<preparationGoals>clean validate</preparationGoals>
<goals>testCompile</goals>
</configuration>
</plugin>
但是在运行 'mvn release:perform' 时myWebProduct
。我已经看到部署目标仍然在htmlTestModule
. 有人可以帮忙吗?
我还尝试了以下操作htmlTestModule
:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>donotRunMe</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
尽管如此,部署目标始终在htmlTestModule
. 谢谢