我想阻止Jenkins构建(因此重新部署)Maven项目的已发布版本.Artifactory(正确)不允许重新部署已发布的版本.
我正在使用Maven配置文件"jenkins"来运行Jenkins中的所有版本
<profile>
<id>jenkins</id>
<!-- This profile is activated by the "-P jenkins" switch when run on
the build server by Jenkins (continuous integration) -->
<build>
<plugins>
<!-- Jenkins should only build -SNAPSHOTs -->
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<evaluateBeanshell>
<condition>"${project.version}".endsWith("-SNAPSHOT")</condition>
<message>Jenkins should only build -SNAPSHOT versions</message>
</evaluateBeanshell>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
676 次 |
| 最近记录: |