You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Aaron Anderson (JIRA)" <ji...@codehaus.org> on 2006/04/22 22:22:19 UTC

[jira] Created: (MNG-2236) DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml

DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml
----------------------------------------------------------------------------------------------------------------------------------------

         Key: MNG-2236
         URL: http://jira.codehaus.org/browse/MNG-2236
     Project: Maven 2
        Type: Bug

  Components: Inheritence and Interpolation  
    Versions: 2.0.4    
    Reporter: Aaron Anderson


I have a custom plugin that performs JMX operations using properties defined in a profile. I have defined an active profile in the settings.xml that specifies properties that the plugin uses and everything works fine when a POM is present. Now I would like the plugin to work from any directory and have added the plugin annotation "requiresProject=false" to it. 

If I run the plugin in a directory without a POM the profile properties from settings.xml are never loaded. After performing some debugging I have determined that the default super-pom's model  that is used when no POM xml file is available does not contain the profile properties defined in settings.xml while if a POM.xml is available the settings.xml profiles are loaded into the POM.

This all appears to boil down to the lack of a ProfileManager parameter to thebuildStandaloneSuperProject method defined in the  MavenProjectBuilder interface. While  DefaultMaven's invocation of the component has a globalProfileManager available (with the active settings profiles set) it cannot be passed into the MavenProjectBuilder component. Alternatively, If the DefaultMavenProjectBuilder had the Settings component injected into it could pass it into the constructor of the DefaultProfileManager instance it creates and then the DefaultProfileManager would load the active profiles into the POM.

By enabling this fix it would make plugins useful for management tasks, for example starting or stoping an application server.


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


[jira] Updated: (MNG-2236) DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml

Posted by "Aaron Anderson (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2236?page=all ]

Aaron Anderson updated MNG-2236:
--------------------------------

    Attachment: patch.txt

> DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-2236
>          URL: http://jira.codehaus.org/browse/MNG-2236
>      Project: Maven 2
>         Type: Bug

>   Components: Inheritence and Interpolation
>     Versions: 2.0.4
>     Reporter: Aaron Anderson
>  Attachments: patch.txt
>
>
> I have a custom plugin that performs JMX operations using properties defined in a profile. I have defined an active profile in the settings.xml that specifies properties that the plugin uses and everything works fine when a POM is present. Now I would like the plugin to work from any directory and have added the plugin annotation "requiresProject=false" to it. 
> If I run the plugin in a directory without a POM the profile properties from settings.xml are never loaded. After performing some debugging I have determined that the default super-pom's model  that is used when no POM xml file is available does not contain the profile properties defined in settings.xml while if a POM.xml is available the settings.xml profiles are loaded into the POM.
> This all appears to boil down to the lack of a ProfileManager parameter to thebuildStandaloneSuperProject method defined in the  MavenProjectBuilder interface. While  DefaultMaven's invocation of the component has a globalProfileManager available (with the active settings profiles set) it cannot be passed into the MavenProjectBuilder component. Alternatively, If the DefaultMavenProjectBuilder had the Settings component injected into it could pass it into the constructor of the DefaultProfileManager instance it creates and then the DefaultProfileManager would load the active profiles into the POM.
> By enabling this fix it would make plugins useful for management tasks, for example starting or stoping an application server.

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


[jira] Updated: (MNG-2236) DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2236?page=all ]

John Casey updated MNG-2236:
----------------------------

    Fix Version: 2.0.5

> DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-2236
>          URL: http://jira.codehaus.org/browse/MNG-2236
>      Project: Maven 2
>         Type: Bug

>   Components: Inheritence and Interpolation
>     Versions: 2.0.4
>     Reporter: Aaron Anderson
>      Fix For: 2.0.5
>  Attachments: patch.txt
>
>
> I have a custom plugin that performs JMX operations using properties defined in a profile. I have defined an active profile in the settings.xml that specifies properties that the plugin uses and everything works fine when a POM is present. Now I would like the plugin to work from any directory and have added the plugin annotation "requiresProject=false" to it. 
> If I run the plugin in a directory without a POM the profile properties from settings.xml are never loaded. After performing some debugging I have determined that the default super-pom's model  that is used when no POM xml file is available does not contain the profile properties defined in settings.xml while if a POM.xml is available the settings.xml profiles are loaded into the POM.
> This all appears to boil down to the lack of a ProfileManager parameter to thebuildStandaloneSuperProject method defined in the  MavenProjectBuilder interface. While  DefaultMaven's invocation of the component has a globalProfileManager available (with the active settings profiles set) it cannot be passed into the MavenProjectBuilder component. Alternatively, If the DefaultMavenProjectBuilder had the Settings component injected into it could pass it into the constructor of the DefaultProfileManager instance it creates and then the DefaultProfileManager would load the active profiles into the POM.
> By enabling this fix it would make plugins useful for management tasks, for example starting or stoping an application server.

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


[jira] Closed: (MNG-2236) DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-2236?page=all ]
     
John Casey closed MNG-2236:
---------------------------

     Assign To: John Casey
    Resolution: Duplicate

More description in MNG-2261, and that's the issue I'm working against as I resolve this.

> DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-2236
>          URL: http://jira.codehaus.org/browse/MNG-2236
>      Project: Maven 2
>         Type: Bug

>   Components: Inheritence and Interpolation
>     Versions: 2.0.4
>     Reporter: Aaron Anderson
>     Assignee: John Casey
>      Fix For: 2.0.5
>  Attachments: patch.txt
>
>
> I have a custom plugin that performs JMX operations using properties defined in a profile. I have defined an active profile in the settings.xml that specifies properties that the plugin uses and everything works fine when a POM is present. Now I would like the plugin to work from any directory and have added the plugin annotation "requiresProject=false" to it. 
> If I run the plugin in a directory without a POM the profile properties from settings.xml are never loaded. After performing some debugging I have determined that the default super-pom's model  that is used when no POM xml file is available does not contain the profile properties defined in settings.xml while if a POM.xml is available the settings.xml profiles are loaded into the POM.
> This all appears to boil down to the lack of a ProfileManager parameter to thebuildStandaloneSuperProject method defined in the  MavenProjectBuilder interface. While  DefaultMaven's invocation of the component has a globalProfileManager available (with the active settings profiles set) it cannot be passed into the MavenProjectBuilder component. Alternatively, If the DefaultMavenProjectBuilder had the Settings component injected into it could pass it into the constructor of the DefaultProfileManager instance it creates and then the DefaultProfileManager would load the active profiles into the POM.
> By enabling this fix it would make plugins useful for management tasks, for example starting or stoping an application server.

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


[jira] Commented: (MNG-2236) DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml

Posted by "Aaron Anderson (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-2236?page=comments#action_65036 ] 

Aaron Anderson commented on MNG-2236:
-------------------------------------

This is a gating issue for my plugin and archetype project http://bobber.javaforge.com/ 

> DefaultMavenProjectBuilder.buildStandaloneSuperProject() should include a ProfileManager that includes active profiles from settings.xml
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MNG-2236
>          URL: http://jira.codehaus.org/browse/MNG-2236
>      Project: Maven 2
>         Type: Bug

>   Components: Inheritence and Interpolation
>     Versions: 2.0.4
>     Reporter: Aaron Anderson
>  Attachments: patch.txt
>
>
> I have a custom plugin that performs JMX operations using properties defined in a profile. I have defined an active profile in the settings.xml that specifies properties that the plugin uses and everything works fine when a POM is present. Now I would like the plugin to work from any directory and have added the plugin annotation "requiresProject=false" to it. 
> If I run the plugin in a directory without a POM the profile properties from settings.xml are never loaded. After performing some debugging I have determined that the default super-pom's model  that is used when no POM xml file is available does not contain the profile properties defined in settings.xml while if a POM.xml is available the settings.xml profiles are loaded into the POM.
> This all appears to boil down to the lack of a ProfileManager parameter to thebuildStandaloneSuperProject method defined in the  MavenProjectBuilder interface. While  DefaultMaven's invocation of the component has a globalProfileManager available (with the active settings profiles set) it cannot be passed into the MavenProjectBuilder component. Alternatively, If the DefaultMavenProjectBuilder had the Settings component injected into it could pass it into the constructor of the DefaultProfileManager instance it creates and then the DefaultProfileManager would load the active profiles into the POM.
> By enabling this fix it would make plugins useful for management tasks, for example starting or stoping an application server.

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