Maven release plugin with parameterized version

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

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

[ERROR] Failed to fulfill the goal org.apache.maven.plugins: maven-release-plugin: 2.1: prepare (default-cli) for the project parent: version cannot 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!

+6
source share
1 answer

Currently, the plugin does not support parameterized versions from the parent (also tested v2.2.2). The solution was to use {project.version}.

+3
source

Source: https://habr.com/ru/post/906396/


All Articles