You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Yves Van Steen (JIRA)" <ji...@codehaus.org> on 2007/05/11 10:15:12 UTC

[jira] Updated: (MNG-2982) Profile of a pom doesn't execute when running a reactor build of a child pom

     [ http://jira.codehaus.org/browse/MNG-2982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yves Van Steen updated MNG-2982:
--------------------------------

    Attachment: bug.png

The result of mvn help:active-profiles

> Profile of a pom doesn't execute when running a reactor build of a child pom
> ----------------------------------------------------------------------------
>
>                 Key: MNG-2982
>                 URL: http://jira.codehaus.org/browse/MNG-2982
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Profiles
>    Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6
>         Environment: Windows
>            Reporter: Yves Van Steen
>         Attachments: bug.png, bugtest2.rar
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira