[jira] [Comment Edited] (MNG-6727) Using version range in parent and CI Friendly Version fails

2021-01-05 Thread Jeff Maxwell (Jira)


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

Jeff Maxwell edited comment on MNG-6727 at 1/5/21, 4:47 PM:


I believe the root causes is this 
[section|https://github.com/apache/maven/blob/2caed6218a5ec0a0b7fce2975743331e5ec76c89/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L1203-L1208]

The code attempts to prevent parent version ranges being used as the child 
version, which is a good thing, but the solution, checking if the child version 
starts with $\{ breaks the combined usage of parent version ranges and property 
based versions.

Can this check just be replaced with a check if the version is set via either 
{{$\{project.version}}} or {{$\{project.parent.version}}}?

Or can the contents of the {{childModel.getVersion()}} be evaluated at this 
point and checked if the value is truly a version range?


was (Author: jeff.maxwell):
I believe the root causes is this 
[section|https://github.com/apache/maven/blob/2caed6218a5ec0a0b7fce2975743331e5ec76c89/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L1203-L1208]

The code attempts to prevent parent version ranges being used as the child 
version, which is a good thing, but the solution, checking if the child version 
starts with $\{ breaks the combined usage of parent version ranges and property 
based versions.

Can this check just be replaced with a check if the version is set to 
{{$\{project.version}}}?

Or can the contents of the {{childModel.getVersion()}} be evaluated at this 
point and checked if the value is truly a version range?

> Using version range in parent and CI Friendly Version fails
> ---
>
> Key: MNG-6727
> URL: https://issues.apache.org/jira/browse/MNG-6727
> Project: Maven
>  Issue Type: Bug
>  Components: Inheritance and Interpolation, POM, Reactor and workspace
>Affects Versions: 3.5.2, 3.6.1, 3.6.2, 3.6.3
>Reporter: Tom Kiemes
>Priority: Major
>
> We would like to pass a [version 
> range|https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html] to 
> the parent which should be possible since 3.5.0
> At the same time, we would like to use [CI friendly 
> versions|https://maven.apache.org/maven-ci-friendly.html] for the artifact 
> itself.
> Both on their own work well, but combined they don't.
> {{}}
>  {{http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> }}{{xsi:schemaLocation="[http://maven.apache.org/POM/4.0.0] 
> [http://maven.apache.org/xsd/maven-4.0.0.xsd];>}}
>  {{  4.0.0}}
> {{  }}
>  {{    org.springframework.boot}}
>  {{    spring-boot-starter-parent}}
>  {{    [2.1,3.0)}}
>  {{  }}
> {{  com.example}}
>  {{  test}}
>  {{  ${revision}}}
>  {{  pom}}
> {{  }}
>  {{    0.0.1}}
>  {{  }}
>  {{}}
>  
> 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 works.
> 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
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-6727) Using version range in parent and CI Friendly Version fails

2020-12-29 Thread Jeff Maxwell (Jira)


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

Jeff Maxwell edited comment on MNG-6727 at 12/29/20, 10:36 PM:
---

I believe the root causes is this 
[section|https://github.com/apache/maven/blob/2caed6218a5ec0a0b7fce2975743331e5ec76c89/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L1203-L1208]

The code attempts to prevent parent version ranges being used as the child 
version, which is a good thing, but the solution, checking if the child version 
starts with $\{ breaks the combined usage of parent version ranges and property 
based versions.

Can this check just be replaced with a check if the version is set to 
{{$\{project.version}}}?

Or can the contents of the {{childModel.getVersion()}} be evaluated at this 
point and checked if the value is truly a version range?


was (Author: jeff.maxwell):
I believe the root causes is this 
[section|https://github.com/apache/maven/blob/2caed6218a5ec0a0b7fce2975743331e5ec76c89/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java#L1203-L1208]

The code attempts to prevent parent version ranges being used as the child 
version, which is a good thing, but the solution, checking if the child version 
starts with $\{ breaks the combined usage of parent version ranges and property 
based versions.

Can this check just be replaced with a check to ${parent.version}?

> Using version range in parent and CI Friendly Version fails
> ---
>
> Key: MNG-6727
> URL: https://issues.apache.org/jira/browse/MNG-6727
> Project: Maven
>  Issue Type: Bug
>  Components: Inheritance and Interpolation, POM, Reactor and workspace
>Affects Versions: 3.5.2, 3.6.1, 3.6.2, 3.6.3
>Reporter: Tom Kiemes
>Priority: Major
>
> We would like to pass a [version 
> range|https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html] to 
> the parent which should be possible since 3.5.0
> At the same time, we would like to use [CI friendly 
> versions|https://maven.apache.org/maven-ci-friendly.html] for the artifact 
> itself.
> Both on their own work well, but combined they don't.
> {{}}
>  {{http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> }}{{xsi:schemaLocation="[http://maven.apache.org/POM/4.0.0] 
> [http://maven.apache.org/xsd/maven-4.0.0.xsd];>}}
>  {{  4.0.0}}
> {{  }}
>  {{    org.springframework.boot}}
>  {{    spring-boot-starter-parent}}
>  {{    [2.1,3.0)}}
>  {{  }}
> {{  com.example}}
>  {{  test}}
>  {{  ${revision}}}
>  {{  pom}}
> {{  }}
>  {{    0.0.1}}
>  {{  }}
>  {{}}
>  
> 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 works.
> 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
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-6727) Using version range in parent and CI Friendly Version fails

2020-10-22 Thread Ralf (Jira)


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

Ralf edited comment on MNG-6727 at 10/22/20, 10:14 AM:
---

Yes. "Unfortunately I have to confirm that as well."
 Too much time spend finding out what the issue actually is. Searching the 
problem in my poms. Both features work fine for themselves. The parent version 
range and cli friendly versions - but once you combine them - your screwed. I 
have no real solution :( 
The only work around I found in a multi module project - when I'm not 
interested in the parent-artifacts anyways - that I set the parent version to a 
fixed SNAPSHOT like "dev-SNAPSHOT" and only apply the correct ${revision} to 
the child modules. Not very elegant and not a solution for single module 
projects...


was (Author: mineralf):
Yes. "Unfortunately I have to confirm that as well."
Too much time spend finding out what the issue actually is. Searching the 
problem in my poms Both features work fine for themselves. The parent version 
range and cli friendly versions - but once you combine it your screwed :(

> Using version range in parent and CI Friendly Version fails
> ---
>
> Key: MNG-6727
> URL: https://issues.apache.org/jira/browse/MNG-6727
> Project: Maven
>  Issue Type: Bug
>  Components: Inheritance and Interpolation, POM, Reactor and workspace
>Affects Versions: 3.5.2, 3.6.1, 3.6.2, 3.6.3
>Reporter: Tom Kiemes
>Priority: Major
>
> We would like to pass a [version 
> range|https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html] to 
> the parent which should be possible since 3.5.0
> At the same time, we would like to use [CI friendly 
> versions|https://maven.apache.org/maven-ci-friendly.html] for the artifact 
> itself.
> Both on their own work well, but combined they don't.
> {{}}
>  {{http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> }}{{xsi:schemaLocation="[http://maven.apache.org/POM/4.0.0] 
> [http://maven.apache.org/xsd/maven-4.0.0.xsd];>}}
>  {{  4.0.0}}
> {{  }}
>  {{    org.springframework.boot}}
>  {{    spring-boot-starter-parent}}
>  {{    [2.1,3.0)}}
>  {{  }}
> {{  com.example}}
>  {{  test}}
>  {{  ${revision}}}
>  {{  pom}}
> {{  }}
>  {{    0.0.1}}
>  {{  }}
>  {{}}
>  
> 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 works.
> 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
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-6727) Using version range in parent and CI Friendly Version fails

2019-11-27 Thread Karl Heinz Marbaise (Jira)


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

Karl Heinz Marbaise edited comment on MNG-6727 at 11/27/19 10:29 PM:
-

Based on MNG-2199 this has been fixed with Maven 3.5.0-alpha,3.5.0. The error 
message looks like using an older version of Maven not one which able to handle 
revision property for version tags?.


was (Author: khmarbaise):
Based on MNG-2199 this has been fixed. The error message looks like using an 
older version of Maven not one which able to handle revision property for 
version tags?.

> Using version range in parent and CI Friendly Version fails
> ---
>
> Key: MNG-6727
> URL: https://issues.apache.org/jira/browse/MNG-6727
> Project: Maven
>  Issue Type: Bug
>  Components: Inheritance and Interpolation, POM, Reactor and workspace
>Affects Versions: 3.6.1
>Reporter: Tom Kiemes
>Priority: Major
>
> We would like to pass a [version 
> range|https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html] to 
> the parent which should be possible since 3.5.0
> At the same time, we would like to use [CI friendly 
> versions|https://maven.apache.org/maven-ci-friendly.html] for the artifact 
> itself.
> Both on their own work well, but combined they don't.
> {{}}
>  {{http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> }}{{xsi:schemaLocation="[http://maven.apache.org/POM/4.0.0] 
> [http://maven.apache.org/xsd/maven-4.0.0.xsd];>}}
>  {{  4.0.0}}
> {{  }}
>  {{    org.springframework.boot}}
>  {{    spring-boot-starter-parent}}
>  {{    [2.1,3.0)}}
>  {{  }}
> {{  com.example}}
>  {{  test}}
>  {{  ${revision}}}
>  {{  pom}}
> {{  }}
>  {{    0.0.1}}
>  {{  }}
>  {{}}
>  
> 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 works.
> 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
(v8.3.4#803005)