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-2982

Profile of a pom doesn't execute when running a reactor build of a child pom

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6
  • Fix Version/s: None
  • Component/s: Profiles
  • Labels:
    None
  • Environment:
    Windows
  • Complexity:
    Intermediate

Description

I created a top pom toghether with a profile in a seperate file (profiles.xml). The problem is as follows when I execute the top pom the profile is available. When I execute the lowest pom the profile is available. When I access one of the middle poms the profile is not available.

The profile just overrides one of the properties defined in the top pom. The property has to be used in different project who inherit of this pom.

I'm guessing this is a bug cause If It was expected workflow it is really strange. I tested It using mvn help:active-profiles. The profile seems active when i run this command on the top pom. I added a example project that you can use to check the problem.

This setup adds a profile that overrides property defined in the top pom. The profile is defined in the profiles.xml. Execute mvn install on the top pom and the property gets overriden. Execute the lowest pom (the level4-2 pom) and the property gets overriden. Execute (level2 or level3 pom) and the property has the old value and doesn't get overriden. You know if it gets overriden when you execute level4-2 project and check the echo statement that is added when i execute the antrun plugin.

Property name is file.path.
<file.path>C:\path\main\blabla</file.path> => in the top pom
<file.path>C:\path\custom\blabla</file.path> => in the profiles.xml

The problem with this setup is that when you run the top pom of the lowest pom no problem. But if you execute the reactor build of one of the middle pom functionality breaks.

I solved this by placing the profile in settings.xml against the wishes of my supervisor who would have liked the profiles.xml way to work.

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

Attachments

  1. File
    bugtest2.rar
    11/May/07 3:13 AM
    49 kB
    Yves Van Steen
  1. bug.png
    54 kB
    11/May/07 3:14 AM

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MNG-2157 Properties defined in top-level profiles.xml do no propagate to child modules

  • Blocker - Blocks development and/or testing work, production could not run
  • 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
Yves Van Steen added a comment - 11/May/07 3:13 AM

An example of the problem

Show
Yves Van Steen added a comment - 11/May/07 3:13 AM An example of the problem
Hide
Permalink
Yves Van Steen added a comment - 11/May/07 3:14 AM

The result of mvn help:active-profiles

Show
Yves Van Steen added a comment - 11/May/07 3:14 AM The result of mvn help:active-profiles

People

  • Assignee:
    Unassigned
    Reporter:
    Yves Van Steen
Vote (1)
Watch (0)

Dates

  • Created:
    11/May/07 3:11 AM
    Updated:
    18/Dec/08 8:17 AM
    Resolved:
    18/Dec/08 8:17 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.