[
https://issues.apache.org/jira/browse/MNG-8058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818807#comment-17818807
]
Michael Osipov edited comment on MNG-8058 at 2/20/24 1:23 PM:
--------------------------------------------------------------
There is no constant. The POM contains an expression. The source does not
matter because we cannot track the source of the expression value so there is
no guarantee that the POM will be complete and build time.
was (Author: michael-o):
There is not constant. The POM contains an expression. The source does not
matter because we cannot track the source of the expression value so there is
no guarantee that the POM will be complete and build time.
> Allow variables defined in .mvn/maven.config used as constants
> --------------------------------------------------------------
>
> Key: MNG-8058
> URL: https://issues.apache.org/jira/browse/MNG-8058
> Project: Maven
> Issue Type: Improvement
> Affects Versions: 3.9.6, 4.0.0-alpha-12
> Reporter: Stefan Bischof
> Priority: Major
>
> I would like to have all variables defined in .mvn/maven.config to be allowed
> as constants.
> My setup uses different versions on each module but i want to define them
> central.
> in my `.mvn/maven.config` file I define the variables
>
> {code:java}
> -Drevision.org.aaa.bbb=0.0.1-SNAPSHOT
> -Drevision.org.aaa.bbb.ccc=0.0.2-SNAPSHOT
> -Drevision.org.aaa.bbb.ddd=0.0.3-SNAPSHOT {code}
>
> In my pom i want to use this variables to set version of perant ans artifact
> itsselfe
> {code:java}
> <parent>
> <groupId>org.aaa</groupId>
> <artifactId>org.aaa.bbb</artifactId>
> <version>${revision.org.aaa.bbb}</version>
> </parent>
> <artifactId>org.aaa.bbb.ccc</artifactId>
> <version>${revision.org.aaa.bbb.ccc}</version> {code}
> I am getting the warning
>
> {code:java}
> 'version' contains an expression but should be a constant. {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)