You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stefan Bischof (Jira)" <ji...@apache.org> on 2024/10/11 21:07:00 UTC
[jira] [Commented] (MNG-8058) Allow variables defined in .mvn/maven.config used as constants
[ https://issues.apache.org/jira/browse/MNG-8058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888775#comment-17888775 ]
Stefan Bischof commented on MNG-8058:
-------------------------------------
does this now work with the change:
https://issues.apache.org/jira/browse/MNG-8230
https://github.com/apache/maven/pull/1710
> 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)