jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-3017

Profile activation by file fails when maven is run outside the pom's directory

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0.6
  • Fix Version/s: None
  • Component/s: Profiles
  • Labels:
    None
  • Environment:
    Darwin Kernel Version 8.9.1
    java version "1.6.0-dp"
    Java(TM) SE Runtime Environment (build 1.6.0-dp-b88-34)
    Java HotSpot(TM) Client VM (build 1.6.0-b88-17-release, mixed mode, sharing)
  • Complexity:
    Intermediate

Description

When calling maven outside the pom's directory, the profile activation fails:

macb:~/Development/maven-test/parent jl$ mvn install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Example parent
[INFO] Example module1
[INFO] Example module2
[INFO] ----------------------------------------------------------------------------
....

macb:~/Development/maven-test jl$ mvn -f parent/pom.xml install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Example parent
[INFO] Example module1
[INFO] ----------------------------------------------------------------------------
....

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. File
    maven-test.tgz
    29/May/07 9:09 PM
    0.8 kB
    Jean-Luc Wasmer

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MNG-2363 <profile><activation><file><exists/> does not work in a multi-project build

  • Critical - Crashes, loss of data, severe memory leak.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-2809 Can't activate a profile by checking for the presence of a file in ${user.home}

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Nathaniel Harward added a comment - 06/May/08 6:44 PM

I would like to add that using variables does not seem to work inside the <missing/> or <exists/> elements. I would like to suggest that variable interpolation be implemented in these elements to solve this problem and allow for more flexibility than, for example, just looking for files relative to the pom directory as a fix.

I tried to get around this problem by using a value of "${basedir}/xxx" or "${project.basedir}/xxx" with no success. "${basedir}" does not work when run inside the pom's directory either, so I know no interpolation is not being done with these elements.

Show
Nathaniel Harward added a comment - 06/May/08 6:44 PM I would like to add that using variables does not seem to work inside the <missing/> or <exists/> elements. I would like to suggest that variable interpolation be implemented in these elements to solve this problem and allow for more flexibility than, for example, just looking for files relative to the pom directory as a fix. I tried to get around this problem by using a value of "${basedir}/xxx" or "${project.basedir}/xxx" with no success. "${basedir}" does not work when run inside the pom's directory either, so I know no interpolation is not being done with these elements.
Hide
Permalink
Nathaniel Harward added a comment - 08/May/08 2:54 PM

Also does not work in 2.0.9:

Maven version: 2.0.9
Java version: 1.5.0_13
OS name: "mac os x" version: "10.5.2" arch: "i386" Family: "unix"

I thought MNG-2809 might fix this by looking for any/all variables, but apparently not; it seems to only look for ${user.home}

Show
Nathaniel Harward added a comment - 08/May/08 2:54 PM Also does not work in 2.0.9: Maven version: 2.0.9 Java version: 1.5.0_13 OS name: "mac os x" version: "10.5.2" arch: "i386" Family: "unix" I thought MNG-2809 might fix this by looking for any/all variables, but apparently not; it seems to only look for ${user.home}
Hide
Permalink
Daniel Pfeifer added a comment - 04/Mar/09 9:11 AM

Does not work in 2.0.10 either...

Show
Daniel Pfeifer added a comment - 04/Mar/09 9:11 AM Does not work in 2.0.10 either...
Hide
Permalink
Trevor L. Torrez added a comment - 21/May/09 2:02 PM

I added another vote. I'm using maven 2.0.9; when a child project has a profile activated by a missing file, the profile is always active when run from the parent folder because the file is never created in the parent folder.

Show
Trevor L. Torrez added a comment - 21/May/09 2:02 PM I added another vote. I'm using maven 2.0.9; when a child project has a profile activated by a missing file, the profile is always active when run from the parent folder because the file is never created in the parent folder.

People

  • Assignee:
    Benjamin Bentmann
    Reporter:
    Jean-Luc Wasmer
Vote (11)
Watch (7)

Dates

  • Created:
    29/May/07 9:09 PM
    Updated:
    27/Mar/10 8:26 AM
    Resolved:
    27/Mar/10 8:26 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.