简体   繁体   English

如何将一个Maven Release Plugin“pre step”添加到Jenkins项目中

[英]How to add a Maven Release Plugin “pre step” to a Jenkins project

I'm trying to add support for the "Maven Release Plugin" to an existing Maven project that has been defined inside of our Jenkins server . 我正在尝试将“Maven Release Plugin”的支持添加到已在Jenkins服务器内定义的现有Maven项目中。 We have some Maven projects on the server that already use the release plugin, but I am unable to duplicate their configuration onto the Maven projects that don't already have access to the Maven Release Plugin. 我们在已经使用release插件的服务器上有一些Maven项目,但我无法将他们的配置复制到尚未访问Maven Release Plugin的Maven项目中。

I notice that in the non-plugin projects, I don't appear to have the ability to add a " pre step " to the project. 我注意到在非插件项目中,我似乎没有能力为项目添加“ 预备步骤 ”。 The projects that can perform a Maven Release have such pre steps defined, and those pre steps seem directly related to the release plugin. 可以执行Maven版本的项目已经定义了这些预先步骤,这些预先步骤似乎与发布插件直接相关。

So my question is two-fold: how do I add a pre-step to a project configuration? 所以我的问题有两个: 如何在项目配置中添加前置步骤? If the pre-steps are only available when an appropriate plugin is associated with a project, how do I associate the Maven Release Plugin with a project? 如果预先步骤仅在适当的插件与项目关联时可用, 我如何将Maven Release Plugin与项目相关联?

Right now I could clone a project with the release plugin and then alter it to replace the project I wanted to add the release plugin to, but that seems somewhat ignorant. 现在我可以使用release插件克隆一个项目,然后改变它以替换我想要添加发布插件的项目,但这似乎有些无知。

I have been unable to find references to these pre-steps in my Google searches. 我在Google搜索中无法找到对这些预处理步骤的引用。 Any help would be appreciated . 任何帮助将不胜感激

The options depend on the job type chosen when creating a new one. 选项取决于创建新作业时选择的作业类型。 Only the Maven Project includes the Maven Release options. 只有Maven项目包含Maven Release选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM