You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (Jira)" <ji...@apache.org> on 2020/12/18 09:59:00 UTC
[jira] [Closed] (MNG-6608) Why can't project.version in pom.xml be
set as a variable?
[ https://issues.apache.org/jira/browse/MNG-6608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MNG-6608.
-------------------------------
Assignee: Robert Scholte
Resolution: Information Provided
> Why can't project.version in pom.xml be set as a variable?
> ----------------------------------------------------------
>
> Key: MNG-6608
> URL: https://issues.apache.org/jira/browse/MNG-6608
> Project: Maven
> Issue Type: New Feature
> Components: Design, Patterns & Best Practices
> Affects Versions: 3.6.0
> Reporter: chenxiaoyong
> Assignee: Robert Scholte
> Priority: Major
> Attachments: example.zip, revision-test.zip
>
>
> we need modify project.version in pom.xml when we merge source code from develope branch to master branch in git. it‘s troublesome!
> Why can't project.version in pom.xml be set as a variable?
> for example:
> {code:xml}
> <project ... >
> <modelVersion>4.0.0</modelVersion>
> <groupId>org.example</groupId>
> <artifactId>example</artifactId>
> <version>${project-version}</version>
> <packaging>jar</packaging>
> <properties>
> <project-version>1.0.0-SNAPSHOT</project-version>
> </properties>
> <profiles>
> <profile>
> <!-- snapshot -->
> <id>dev</id>
> <properties>
> <profiles.active>dev</profiles.active>
> <project-version>1.0.0-SNAPSHOT</project-version>
> </properties>
> <activation>
> <activeByDefault>true</activeByDefault>
> </activation>
> </profile>
> <profile>
> <!-- RELEASE -->
> <id>release</id>
> <properties>
> <profiles.active>release</profiles.active>
> <project-version>1.0.0-RELEASE</project-version>
> </properties>
> </profile>
> </profiles>
>
> </project>
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)