Skip to content

[MNG-6802] FileProfileActivator changes FileProfileActivator.exists which lets flattened resolveCiFriendliesOnly depending fail activating profile #8480

Closed

Description

@jira-importer

Stefan Cordes opened MNG-6802 and commented

In my pom.xml I have

 

...
 <profile> 
    <profile> 
       <id>cas-mule4-app</id> 
    <activation> 
       <file> 
          <exists>mule-artifact.json</exists> 
       </file>
    </activation> 
...

 

which worked fine.

After switching to ci-friendly pom.xml with revision and flatten the published .flattened-pom.xml contains absolute path:

 

<profile>
  <id>cas-mule4-app</id>
  <activation>
    <file>
      <exists>D:\jenkins\workspace\mulestac-multibranch_mule4-DWHLMU7ZMPDNCYK6LVMSYLB6GODEIQS7CUNRQQVSISU47ME72PRQ\mule-artifact.json</exists>
    </file>
  </activation>

 

(which is the temporary path of our jenkins container)

and so other projects using that pom.xml as parent will fail to activate the profile.

 

This came in with MNG-1775 or a related issue via adding

// replace activation value with interpolated value
if ( missing )
{
    file.setMissing( path );
}
else
{
    file.setExists( path );
}

in org.apache.maven.model.profile.activation.FileProfileActivator.

 


Affects: 3.2.2, 3.6.2

Issue Links:

  • MNG-6912 File based profile activation results in absolute paths in OriginalModel
    ("is duplicated by")
  • MNG-5612 effective pom should not contain file-based profile activation fully interpolated but with limited interpolation like seen during profile activation
    ("is caused by")

Remote Links:

Backported to: 4.0.0-alpha-2, 3.8.5

Activity

  1. jira-importer commented on Nov 13, 2019

    @jira-importer
    Author

    Stefan Cordes commented

    // replace activation value with interpolated value
    

    came in with https://issues.apache.org/jira/browse/MNG-5612

    (commit c175789 )

     

  2. jira-importer commented on Jul 28, 2021

    @jira-importer
    Author

    Michael Osipov commented

    The PR has been merged, why is this ticket still open?

  3. jira-importer commented on Jan 6, 2022

    @jira-importer
    Author
  4. added
    bug
    priority:major
    on Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority:major

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions