maven release plugin with parameterized version

好久不见. 提交于 2019-12-06 23:14:23

问题


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?

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

[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]

Here is my plugin definition:

<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>

Thanks in advance!


回答1:


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



来源:https://stackoverflow.com/questions/8926605/maven-release-plugin-with-parameterized-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!