Maven 2 & 3

Can't activate a profile by checking for the presence of a file in ${user.home}

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.4
  • Fix Version/s: 2.0.9, 3.0-alpha-1
  • Component/s: Profiles
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

The following won't activate. If I move it to a path without a space it works. This is for windows xp.
<file><exists>${user.home}/.m2/ydoc/lib/ydoc.jar</exists></file>

Issue Links

Activity

Hide
Mark Proctor added a comment -

Actually I'm not sure if this is spaces. I tried it using ${basedir} with a path that didn't have spaces, it iddn't activate. I looked at the help:effective-pom and cut and pasted the whole url it was displaying there and it worked. Does that mean that profiles are being decided before the variable resolving is done?

Show
Mark Proctor added a comment - Actually I'm not sure if this is spaces. I tried it using ${basedir} with a path that didn't have spaces, it iddn't activate. I looked at the help:effective-pom and cut and pasted the whole url it was displaying there and it worked. Does that mean that profiles are being decided before the variable resolving is done?
Hide
Wendy Smoak added a comment -

This works: <file><exists>c:/Documents and Settings/wsmoak/file.txt</exists></file>

This doesn't: <file><exists>${user.home}/file.txt</exists></file>

Show
Wendy Smoak added a comment - This works: <file><exists>c:/Documents and Settings/wsmoak/file.txt</exists></file> This doesn't: <file><exists>${user.home}/file.txt</exists></file>
Hide
Vincent Siveton added a comment -

Fixed with r609976

Show
Vincent Siveton added a comment - Fixed with r609976
Hide
Daniel Pfeifer added a comment -

Still does not work (Maven 2.0.10) with ${basedir} as described in the related issue.

Show
Daniel Pfeifer added a comment - Still does not work (Maven 2.0.10) with ${basedir} as described in the related issue.
Hide
Paul Benedict added a comment -

Daniel, can you please provide a ZIP of the most basic project to demonstrate this error?

Show
Paul Benedict added a comment - Daniel, can you please provide a ZIP of the most basic project to demonstrate this error?
Hide
Brett Porter added a comment -

Paul, it's in MNG-3017.

Show
Brett Porter added a comment - Paul, it's in MNG-3017.
Hide
Brett Porter added a comment -

note that it is not a regression, it does work with ${user.home}

Show
Brett Porter added a comment - note that it is not a regression, it does work with ${user.home}

People

Vote (2)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: