[ https://issues.apache.org/jira/browse/MNG-7895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17774939#comment-17774939 ]
Jimisola Laursen edited comment on MNG-7895 at 10/13/23 3:05 PM: ----------------------------------------------------------------- Related to this issue and I suspect that I miss an already reported issue. [The official docs|https://maven.apache.org/guides/introduction/introduction-to-profiles.html#:~:text=Profiles%20can%20be%20activated%20in,containing%20a%20profile%2Did%20inside.&text=Profiles%20listed%20in%20the%20%3CactiveProfiles,time%20a%20project%20use%20it.] clearly states that: "The tags <exists> and <missing> can be interpolated. Supported variables are system properties like ${user.home} and environment variables like ${env.HOME}. Please note that properties and values defined in the POM itself are not available for interpolation here, e.g. the above example activator cannot use ${project.build.directory} but needs to hard-code the path target." We have a use-case where another maven run will create an artifact which we want to attach at a later run if a particular file exists. However, this file is generated as ${project.build.directory}/${project.build.finalName}-classifier.zip ${project.*} can be used in file, so I'm wondering if there is a workaround. The documentation does not state if wildcards are available e.g, but there is [an issue|https://issues.apache.org/jira/browse/MNG-7495] so I guess it does not work. was (Author: JIRAUSER281352): Related to this issue and I suspect that I miss an already reported issue. [The official docs|https://maven.apache.org/guides/introduction/introduction-to-profiles.html#:~:text=Profiles%20can%20be%20activated%20in,containing%20a%20profile%2Did%20inside.&text=Profiles%20listed%20in%20the%20%3CactiveProfiles,time%20a%20project%20use%20it.] clearly states that: "The tags <exists> and <missing> can be interpolated. Supported variables are system properties like ${user.home} and environment variables like ${env.HOME}. Please note that properties and values defined in the POM itself are not available for interpolation here, e.g. the above example activator cannot use ${project.build.directory} but needs to hard-code the path target." We have a use-case where another maven run will create an artifact which we want to attach at a later run if a particular file exists. However, this file is generated as ${project.build.directory}/${project.build.finalName}-classifier.zip ${project.*} can be used in file, so I'm wondering if there is a workaround. The documentation does not state if wildcards are available e.g. > Support ${project.basedir} in file profile activation > ------------------------------------------------------ > > Key: MNG-7895 > URL: https://issues.apache.org/jira/browse/MNG-7895 > Project: Maven > Issue Type: Improvement > Components: Profiles > Reporter: Slawomir Jaranowski > Assignee: Slawomir Jaranowski > Priority: Major > Fix For: 3.8.9, 4.0.0-alpha-8, 3.9.5 > > > Profile activation by file exists or missing should allow to use > ${project.basedir} > Currently only {{${basedir}}} can be used ... but short properties are > deprecated > It can confusing users. > Documentation to fix: > https://maven.apache.org/pom.html#activation -- This message was sent by Atlassian Jira (v8.20.10#820010)