Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 914
kpentchev Avatar asked Jan 19 '12 13:01

kpentchev


People also ask

How does Maven release plugin work?

Performing the release. The plugin will extract file revisions associated with the current release. Maven will compile, test and package the versioned project source code into an artifact. The final deliverable will then be released into an appropriate maven repository.

What is Maven release version?

Maven Release Plugin/ Performing a Non-interactive Release. | Last Published: 2022-06-05. Version: 3.0.0-M6.

What does Mvn release clean do?

Cleaning a Release will: delete the release descriptor (release. properties) delete any backup POM files.

What is mixin Maven plugin?

Mixin Maven Plugin is a Maven Extension that allows including multiple pom plugin Management sections without the need to inherit them from a single root parent. By having this ability, SDK developers can provide mixin pom files that define the build behaviour.


1 Answers

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

like image 155
kpentchev Avatar answered Nov 15 '22 20:11

kpentchev