If I recall correctly, in this specific place you are still supposed to use
${basedir} instead of project.basedir

Am 23.06.2017 3:02 nachm. schrieb "Justin Georgeson" <jgeorge...@lgc.com>:



> -----Original Message-----
> From: Jörg Schaible [mailto:joerg.schai...@bpm-inspire.com]
> Sent: Friday, June 23, 2017 1:03 AM
> To: users@maven.apache.org
> Subject: [EXTERNAL] Re: project.basedir in file-based profile activation
>
> External Sender: Use caution with links/attachments.
>
>
>
> 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.

So it's a bad message in that the problem is having used a property at all,
rather than having used that specific property?

> > 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: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org


----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient.  Any
review, use, distribution, or disclosure by others is strictly prohibited.
If you are not the intended recipient (or authorized to receive information
for the intended recipient), please contact the sender by reply e-mail and
delete all copies of this message.

Reply via email to