[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2017-08-02 Thread Erwin Hoeckx (JIRA)

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

Erwin Hoeckx commented on MNG-5900:
---

We have the same situation that [~FlorianSchaetz] is sketching (although in a 
bit different style).

Wrt the discussion about _this_ (although I think _this_ is clear): 'this' in 
the context of a 'parent' pom lands when developers understand the relationship 
between the parent/child pom, and the notion of a project. As [~schulte77] 
points out, it can be a bit confusing if you think in terms of OO, but proper 
documentation should sort this out. Perhaps 'pom' (referring to the the current 
POM you're looking at)?


+1 for this making it into maven 4!

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation, POM
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-12-04 Thread Florian Schaetz (JIRA)

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

Florian Schaetz commented on MNG-5900:
--

Personally, I stumbled upon the issue when trying to retrieve the "grandparent" 
version, since {code}${project.parent.parent.version}{code} doesn't work 
(anymore?).

Let's assume I have a parent project, let's call it "example-parent" with 
version "0.0.1-SNAPSHOT". There I set a property...

{code}

   ${project.version}
{code}

No surprise there, the effective pom shows me that example-parent has the 
property example.parent.version=0.0.1-SNAPSHOT

Then I make a new project, let's call it "example-child" which has 
"example-parent" as a parent. Let's give example-child now version 
0.0.2-SNAPSHOT and the effective pom of example-child shows us...

{code}

   0.0.2-SNAPSHOT
{code}

...because the {code}${project.version}{code} now is resolved by calling the 
example-child's version. And the information that was stored in the property is 
effectively overwritten. 

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-04 Thread Paul Benedict (JIRA)

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

Paul Benedict commented on MNG-5900:


I'd like further background on the ticket's requirement: "So it is not possible 
that parent poms can lock values, ie avoid child poms override". Can you please 
give an example why something like this is necessary? Why is the child POM so 
problematic for your use case?

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-03 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on MNG-5900:
-

Only if there's a usecase for it. I cannot think of one where the project is 
interested in the value of one if its supers (which is different compared to 
the current one). 
MNG-5763 is a pretty good example when to use {{this}}. The most important 
thing is to explain when to use {{this}}. It is about having a property for 
something which is used multiple times within this pom.xml, but you don't want 
to overridden by any project using it as a parent.

{code:xml}
pom


  ${project.groupId}
  someArtifactId

{code}

If a different project using this as its parent, but has a different groupId, 
then the dependency cannot be found. Here you need early interpolation. 
this.groupId will do the trick.
I don't expect {{this}} to be used very much, but in some edgecases it is the 
only solution.

 

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-03 Thread Christian Schulte (JIRA)

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

Christian Schulte commented on MNG-5900:


{noformat}${this.declared-in-a-parent-only}{noformat}

For consistency with OO languages the properties would need to be fully 
qualified so that it's clear what value to interpolate.

{noformat}${g:a:v:property}{noformat}

 Just call it {noformat}${this.*}{noformat} and be done with it.


> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-03 Thread JIRA

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

Hervé Boutemy commented on MNG-5900:


given everything happens in a XML file (not a code source file), with a 
specific expression syntax and usual {{$\{project.*}}} expressions, I don't 
really understand what confusion you fear by having now {{$\{this.*}}} 
expressions
But for sure, we'll add any explanation that you'll feel useful

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-02 Thread Christian Schulte (JIRA)

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

Christian Schulte commented on MNG-5900:


I meant documenting that {{this}} is not to be confused with the way the Java 
keyword {{this}} works.

{code}
class A
{
void method()
{
this.effectiveMethod();
 It's that 'this' I am talking about.
}

void effectiveMethod()
{
System.out.println("A");
}
}

class B extends A
{
void effectiveMethod()
{
System.out.println("B");
}
}
{code}

{code}
new A().method();
A
new B().method();
B
{code}

The {{this}} in class A will lead to the method in class B getting called. So 
{{this}} refers to the effective object (A or B) and not A and only A. That's 
what I find misleading. Linking to this issue in the documentation would 
already be sufficient as everything is mentioned here now already.

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-02 Thread JIRA

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

Hervé Boutemy commented on MNG-5900:


even documented, a new syntax is less expressive and more abstract: that was my 
first bet before Robert idea, and I could not find any syntax that wouldn't 
look cryptic regarding classical  $\{*} variables

and for sure, when {{this}} will be implemented (in Maven 4), it will be 
documented in http://maven.apache.org/ref/3-LATEST/maven-model-builder/ the 
same way I did it for doxia-siterenderer integration-tools 
http://maven.apache.org/doxia/doxia-sitetools-archives/doxia-sitetools-LATEST/doxia-integration-tools/index.html

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-02 Thread Christian Schulte (JIRA)

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

Christian Schulte commented on MNG-5900:


Just needs to be documented.

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-02 Thread JIRA

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

Hervé Boutemy commented on MNG-5900:


{{this}} references the effective model of the immediate "early" project, while 
{{project}} references the effective model of the last "late" project

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-02 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on MNG-5900:
-

{{final}} is indeed another discussion, let's not mix them.

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-01 Thread Christian Schulte (JIRA)

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

Christian Schulte commented on MNG-5900:


Just noticed myself that

{code}
${immediate.interpolation.due.to.final}
{code}

is yet a different use-case. Let's just not call it {{this}}, please. Maybe 
{{current}} just to avoid using a Java keyword?

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-01 Thread Christian Schulte (JIRA)

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

Christian Schulte commented on MNG-5900:


I would expect {{this}} to reference the effective model the same way the Java 
{{this}} keyword references the "effective" object.

??{{this}} has been the best name so far??

I think {{final}} would be the matching Java keyword with comparable semantics. 

There already is an issue filed requesting to add {{final}} and {{override}} 
attributes to all POM elements to control inheritance processing. We already 
have {{combine.children}} etc. attributes so maybe we just add {{final}} and 
{{override}} attributes the same way and control property inteprolation based 
on the existence of those attributes?

So a parent pom.xml could declare

{code}
${immediate.interpolation.due.to.final}
{code}


> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-01 Thread Robert Scholte (JIRA)

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

Robert Scholte commented on MNG-5900:
-

What's misleading about it? It will be replaced with its value within this 
pom.xml, whereas {{$\{project.*\}}} will be replaced with the effective project 
value. The comparison with Java's 'this' is quite good, hence that's why I 
suggested it.
I don't like the idea of different delimiters, it'll make parsing extra complex 
and I don't see advantage of it. Introducing a new variable makes more sense 
and {{this}} has been the best name so far.

> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (MNG-5900) early interpolation: support ${this.*} as expression

2016-04-01 Thread Christian Schulte (JIRA)

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

Christian Schulte commented on MNG-5900:


Regarding {noformat}${this.*}{noformat} properties: I think {{this}} is 
misleading. I would prefer introducing a different syntax. For example: 
Immediate interpolation is requested by using a different syntax like 
{noformat}$${project.url}{noformat} or {noformat}@{project.url}{noformat}, etc. 
WDYT


> early interpolation: support ${this.*} as expression
> 
>
> Key: MNG-5900
> URL: https://issues.apache.org/jira/browse/MNG-5900
> Project: Maven
>  Issue Type: New Feature
>  Components: Inheritance and Interpolation
>Reporter: Robert Scholte
> Fix For: Issues to be reviewed for 4.x
>
>
> Right now we have $\{project.\*} which always interpolates values based on 
> the final project: "classical" interpolation is "late" interpolation. So it 
> is not possible that parent poms can lock values, ie avoid child poms 
> override. By adding $\{this} for "early" interpolation, it will be possible 
> to have intermediate interpolation.
> If a pomfile depends on a parent, that parent will first resolve all 
> $\{this.\*} values for itself. Once the fully inherited pom is there, all 
> $\{project.\*} will be resolved. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)