Justin Georgeson wrote:
> With 3.3.9 and 3.5.0 When I use this
>
> <profiles>
> <profile>
> <id>my-profile-id</id>
> <activation>
> <file>
> <exists>${project.basedir}${file.separator}somefile.txt</exists>
> </file>
> </activation>
> ....
> </profile>
> </profiles>
>
> I see this warning
>
> [WARNING] Some problems were encountered while building the effective
> [model for com.example:basedir:jar:1.0-SNAPSHOT WARNING]
> ['profiles.profile[my-profile-id].activation.file.exists' Failed to
> [interpolate file location ${project.basedir}${file.separator}somefile.txt
> [for profile jacoco-read-manifest: ${project.basedir} expression not
> [supported during profile activation, use ${basedir} instead
>
> I was under the impression that ${basedir} is deprecated in favor of
> ${project.basedir}, many years ago at that.
That won't help, because string substitution did not happen yet at the time
profiles are activated. There's only a special support for ${user.home} and
${env.HOME}, but that's it. Anything else cannot not work.
> Side note, is it actually worthwhile to use ${file.separator} like this,
> or is that generally only useful when you're outputting stuff to the user
> and want it to look pretty?
Use normal slashes.
Cheers,
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]