[ 
https://issues.apache.org/jira/browse/MNG-8058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818787#comment-17818787
 ] 

Michael Osipov commented on MNG-8058:
-------------------------------------

This is not a problem of {{.mvn/maven.config}}, but are deliberate restriction 
in {{<version />}}. It can contain only CI-friendly expressions.  
[~sjaranowski], [~gnodet].
Personal opinion: We should not open that gate to resolution hell.

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

Reply via email to