Java 有没有办法跳过不支持跳过配置的Maven插件的执行?
我想知道如果这个插件/目标不支持“跳过”配置,是否有办法跳过插件的执行 我正在使用,我想跳过特定项目的部署插件的部署文件goald的插件执行-因此将阶段更改为无不是一个选项 请参阅下面的一些示例代码-我基本上希望为某些项目执行部署文件目标Java 有没有办法跳过不支持跳过配置的Maven插件的执行?,java,maven,plugins,deployment,skip,Java,Maven,Plugins,Deployment,Skip,我想知道如果这个插件/目标不支持“跳过”配置,是否有办法跳过插件的执行 我正在使用,我想跳过特定项目的部署插件的部署文件goald的插件执行-因此将阶段更改为无不是一个选项 请参阅下面的一些示例代码-我基本上希望为某些项目执行部署文件目标 <plugin> <groupId>com.soebes.maven.plugins</groupId> <artifactId>iterator-maven-plugin</artifac
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>iterator-maven-plugin</artifactId>
<version>0.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>iterator</goal>
</goals>
<configuration>
<itemsWithProperties>
<itemWithProperty>
<name>test</name>
<properties>
<skipDeployment>true</skipDeployment>
</properties>
</itemWithProperty>
<itemWithProperty>
<name>prod</name>
<properties>
<skipDeployment>false</skipDeployment>
</properties>
</itemWithProperty>
</itemsWithProperties>
</configuration>
<pluginExecutors>
<pluginExecutor>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<goal>deploy-file</goal>
<configuration>
<pomFile>${basedir}/target/checkout/@item@/myFile.pom</pomFile>
<file>${basedir}/target/checkout/@item@/myFile.jar</file>
<repositoryId>${mavenRepositoryId}</repositoryId>
<url>${mavenRepositoryUrl}</url>
<!-- if the deploy plugin would support a skip configuration we could do sth. like this -->
<skip>${skipDeployment}</skip>
</configuration>
</pluginExecutor>
</pluginExecutors>
</configuration>
</execution>
</executions>
</plugin>
com.soebes.maven.plugins
迭代器maven插件
0.5.0
包裹
迭代器
测试
真的
戳
假的
org.apache.maven.plugins
maven部署插件
2.8.2
部署文件
${basedir}/target/checkout/@item@/myFile.pom
${basedir}/target/checkout/@item@/myFile.jar
${mavenRepositoryId}
${mavenRepositoryUrl}
${skipDeployment}
我不确定您希望实现什么,但看起来您做错了什么?您正在从目标文件夹部署什么类型的文件?很抱歉,配置过于简化-我对示例进行了一点扩展。所需的配置不是部署到测试环境,而是部署到prod环境。