You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Schulte (JIRA)" <ji...@apache.org> on 2016/04/02 00:59:25 UTC
[jira] [Comment Edited] (MNG-5900) early interpolation: support
${this.*} as expression
[ https://issues.apache.org/jira/browse/MNG-5900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15222486#comment-15222486 ]
Christian Schulte edited comment on MNG-5900 at 4/1/16 10:59 PM:
-----------------------------------------------------------------
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 interpolation based on the existence of those attributes?
So a parent pom.xml could declare
{code}
<url final="true">${immediate.interpolation.due.to.final}</url>
{code}
was (Author: schulte77):
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}
<url final="true">${immediate.interpolation.due.to.final}</url>
{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)