maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Kiemes (JIRA)" <>
Subject [jira] [Created] (MNG-6727) Using version range in parent and CI Friendly Version fails
Date Mon, 05 Aug 2019 16:05:00 GMT
Tom Kiemes created MNG-6727:

             Summary: Using version range in parent and CI Friendly Version fails
                 Key: MNG-6727
             Project: Maven
          Issue Type: Bug
          Components: Inheritance and Interpolation, POM, Reactor and workspace
    Affects Versions: 3.6.1
            Reporter: Tom Kiemes

We would like to pass a [version range|[]]
to the parent which should be possible since 3.5.0

At the same time, we would like to use [CI friendly versions|[]]
for the artifact itself.

Both on their own work well, but combined they don't.

{{<?xml version="1.0" encoding="UTF-8"?>}}
 {{<project xmlns="" xmlns:xsi="" }}{{xsi:schemaLocation="[] []">}}
 {{  <modelVersion>4.0.0</modelVersion>}}

{{  <parent>}}
 {{    <groupId>org.springframework.boot</groupId>}}
 {{    <artifactId>spring-boot-starter-parent</artifactId>}}
 {{    <version>[2.1,3.0)</version>}}
 {{  </parent>}}

{{  <groupId>com.example</groupId>}}
 {{  <artifactId>test</artifactId>}}
 {{  <version>${revision}</version>}}
 {{  <packaging>pom</packaging>}}

{{  <properties>}}
 {{    <revision>0.0.1</revision>}}
 {{  </properties>}}


The resulting error is:

{{The project com.example:test:${revision} (/Users/d045390/scratch/test.pom) has 1 error}}
{{[ERROR] Version must be a constant @ line 13, column 12}}


Changing the version range of the parent to a fixed version e.g. \{{2.1.5.Release}}, building

Changing the artifact version from ${revision} to a fixed version e.g. 0.0.1 without using
the {{properties}} works as well.

So it somehow must be the combination of both features which are actually not really related
or am I missing something?

PS: I left the modules out for abbreviation purpose. The pom itself can still be used to reproduced

This message was sent by Atlassian JIRA

View raw message