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

Michael Osipov edited comment on MNG-5612 at 1/6/22, 5:31 PM:
--------------------------------------------------------------

Hi Hervé,

this change lets
{noformat}
mvn flatten:flatten{noformat}
fail creating an "unchanged" pom with 
{{<flattenMode>resolveCiFriendliesOnly</flattenMode>}}, see MNG-6802

(which must replace ${revision}, ${sha1} and/or ${changelist} in the pom.xml 
only, see [https://maven.apache.org/maven-ci-friendly.html] )

Please find another solution for this problem. (maybe another field 
getResolvedExists() in org.apache.maven.model.ActivationFile or resolve each 
time the getExists() is called. (But do not change the field).


was (Author: ca-stefan-cordes):
Hi Hervé,

{{this change lets}}
{noformat}
mvn flatten:flatten{noformat}
{{fail creating an "unchanged" pom with 
<flattenMode>resolveCiFriendliesOnly</flattenMode>, see 
https://issues.apache.org/jira/browse/MNG-6802}}

(which must replace ${revision}, ${sha1} and/or ${changelist} in the pom.xml 
only, see [https://maven.apache.org/maven-ci-friendly.html] )

Please find another solution for this problem. (maybe another field 
getResolvedExists() in org.apache.maven.model.ActivationFile or resolve each 
time the getExists() is called. (But do not change the field).

> effective pom should not contain file-based profile activation fully 
> interpolated but with limited interpolation like seen during profile 
> activation
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-5612
>                 URL: https://issues.apache.org/jira/browse/MNG-5612
>             Project: Maven
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 3.2.1
>            Reporter: Herve Boutemy
>            Assignee: Herve Boutemy
>            Priority: Major
>             Fix For: 3.2.2
>
>
> mvn help:effective-pom on a pom.xml containing
> {code:xml}    <profile>
>       <activation>
>         <file>
>           <exists>${project.basedir}/pom.xml</exists>
>         </file>
>       </activation>{code}
> shows interpolated value, which points to an existing file then is misleading
> but the profile isn't activated since $\{project.basedir} isn't interpreted 
> during profile activation
> we added a warning in MNG-5608, but showing the value interpolated exactly as 
> done during profile interpolation would be more logic



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to