具有参数化版本的Maven发布插件 [英] maven release plugin with parameterized version

查看:198
本文介绍了具有参数化版本的Maven发布插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将maven版本插件用于多模块项目,其中某些模块间依赖项是使用父pom的参数指定的?

is it possible to use the maven release plugin with a multi-module project, where some of the inter-module dependencies are specified using a parameter from the parent pom?

当我尝试调用release:prepare时,出现以下错误:

When I try to call release:prepare i get the following error:

[错误]无法在项目林父上执行目标org.apache.maven.plugins:maven-release-plugin:2.1:prepare(default-cli):无法更新版本:$ {some.version }-> [帮助1]

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project forest-parent: The version could not be updated: ${some.version} -> [Help 1]

这是我的插件定义:

<plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.1</version>
            <configuration>
                <goals>deploy</goals>
                <tagBase>https://svn.domain.com/svn/project/tags</tagBase>
                <autoVersionSubmodules>true</autoVersionSubmodules>
                <tagNameFormat>@{project.version}</tagNameFormat>
            </configuration>
        </plugin>

提前谢谢!

推荐答案

该插件当前不支持来自父级的参数化版本(也尝试过v2.2.2).解决方案是使用{project.version}.

The plugin currently doesn't support parameterized versions from parent (tried v2.2.2 as well). The solution was to use {project.version}.

这篇关于具有参数化版本的Maven发布插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆