Maven 2 & 3

settings.xml doesn't handle profile from pom.xml

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
  • Number of attachments :
    3

Description

I have profile specified in pom.xml (attached). And I try to specify it in settings.xml's <activeProfile> (attache as nonworking-settings.xml) Accordng to help:active-profiles I get:

mvn help:active-profiles
Active Profiles for Project 'test:test:jar:1.0-SNAPSHOT':

There are no active profiles.

When I specify the same profile name in settings.xml (attached as working-settings.xml) maven see both profiles (from pom.xml and from settings.xml):

mvn help:active-profiles
Active Profiles for Project 'test:test:jar:1.0-SNAPSHOT':

The following profiles are active:

 - env-test (source: pom)
 - env-test (source: settings.xml)
  1. nonworking-settings.xml
    13/Jun/07 9:48 AM
    0.1 kB
    Den Orlov
  2. pom.xml
    13/Jun/07 9:48 AM
    1.0 kB
    Den Orlov
  3. working-settings.xml
    13/Jun/07 9:48 AM
    0.2 kB
    Den Orlov

Issue Links

Activity

Hide
Krystian Nowak added a comment -

It seems to be a duplicate of http://jira.codehaus.org/browse/MNG-2234
I've got the same issue. Quick fix is to add an empty dummy <profile> in your settings.xml file for <activeProfiles> to be read.

Show
Krystian Nowak added a comment - It seems to be a duplicate of http://jira.codehaus.org/browse/MNG-2234 I've got the same issue. Quick fix is to add an empty dummy <profile> in your settings.xml file for <activeProfiles> to be read.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: