[ 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