o Restored backward-compat

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@819758 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-09-28 22:41:26 +00:00
parent 5063731cb6
commit 663f9db7f4
1 changed files with 38 additions and 0 deletions

View File

@ -54,6 +54,7 @@ import org.apache.maven.model.Model;
import org.apache.maven.model.Organization;
import org.apache.maven.model.Parent;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginExecution;
import org.apache.maven.model.PluginManagement;
import org.apache.maven.model.Prerequisites;
import org.apache.maven.model.Profile;
@ -1416,6 +1417,43 @@ public class MavenProject
return attachedArtifacts;
}
public Xpp3Dom getGoalConfiguration( String pluginGroupId, String pluginArtifactId, String executionId,
String goalId )
{
Xpp3Dom dom = null;
if ( getBuildPlugins() != null )
{
for ( Plugin plugin : getBuildPlugins() )
{
if ( pluginGroupId.equals( plugin.getGroupId() ) && pluginArtifactId.equals( plugin.getArtifactId() ) )
{
dom = (Xpp3Dom) plugin.getConfiguration();
if ( executionId != null )
{
PluginExecution execution = plugin.getExecutionsAsMap().get( executionId );
if ( execution != null )
{
// NOTE: The PluginConfigurationExpander already merged the plugin-level config in
dom = (Xpp3Dom) execution.getConfiguration();
}
}
break;
}
}
}
if ( dom != null )
{
// make a copy so the original in the POM doesn't get messed with
dom = new Xpp3Dom( dom );
}
return dom;
}
@Deprecated
public Xpp3Dom getReportConfiguration( String pluginGroupId, String pluginArtifactId, String reportSetId )
{
Xpp3Dom dom = null;