[
https://issues.apache.org/jira/browse/MNG-6802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16973234#comment-16973234
]
Stefan Cordes edited comment on MNG-6802 at 11/13/19 10:54 AM:
---------------------------------------------------------------
See example pom.xml here:
[https://bitbucket.org/capublic/flatten-file-expands-path/src/master/pom.xml]
and the generated .flattened-pom.xml after performing
{noformat}
mvn clean package -Drevision=local-SNAPSHOT{noformat}
[https://bitbucket.org/capublic/flatten-file-expands-path/src/1a0de49d81a292451c4d7b635383c311841fb03f/.flattened-pom.xml#lines-62]
was (Author: ca-stefan-cordes):
See example pom.xml here:
[https://bitbucket.org/capublic/flatten-file-expands-path/src/master/pom.xml]
and the generated .flattened-pom.xml after performing
{noformat}
mvn clean package -Drevision=local-SNAPSHOT{noformat}
[https://bitbucket.org/capublic/flatten-file-expands-path/src/master/.flattened-pom.xml]
> FileProfileActivator changes FileProfileActivator.exists which lets flattened
> resolveCiFriendliesOnly depending fail activating profile
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MNG-6802
> URL: https://issues.apache.org/jira/browse/MNG-6802
> Project: Maven
> Issue Type: Bug
> Reporter: Stefan Cordes
> Priority: Major
>
> In my pom.xml I have
>
> {noformat}
> ...
> <profile>
> <profile>
> <id>cas-mule4-app</id>
> <activation>
> <file>
> <exists>mule-artifact.json</exists>
> </file>
> </activation>
> ...{noformat}
>
> which worked fine.
> After switching to ci-friendly pom.xml with revision and flatten the
> published .flattened-pom.xml contains absolute path:
>
> {noformat}
> <profile>
> <id>cas-mule4-app</id>
> <activation>
> <file>
>
> <exists>D:\jenkins\workspace\mulestac-multibranch_mule4-DWHLMU7ZMPDNCYK6LVMSYLB6GODEIQS7CUNRQQVSISU47ME72PRQ\mule-artifact.json</exists>
> </file>
> </activation>
> {noformat}
>
> (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
> {noformat}
> // replace activation value with interpolated value
> if ( missing )
> {
> file.setMissing( path );
> }
> else
> {
> file.setExists( path );
> }
> {noformat}
> in org.apache.maven.model.profile.activation.FileProfileActivator.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)