Author: sisbell Date: Wed Sep 10 00:48:16 2008 New Revision: 693722 URL: http://svn.apache.org/viewvc?rev=693722&view=rev Log: Setting of report artifacts and plugin artifacts through mutator methods previously ignored. Fixed this.
Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=693722&r1=693721&r2=693722&view=diff ============================================================================== --- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java (original) +++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java Wed Sep 10 00:48:16 2008 @@ -282,11 +282,6 @@ parentFile = new File( project.getParentFile().getAbsolutePath() ); } - // if ( project.getPluginArtifacts() != null ) - // { - // setPluginArtifacts( Collections.unmodifiableSet( project.getPluginArtifacts() ) ); - // } - if ( project.getReportArtifacts() != null ) { setReportArtifacts( Collections.unmodifiableSet( project.getReportArtifacts() ) ); @@ -1284,7 +1279,6 @@ { artifactMap = ArtifactUtils.artifactMapByVersionlessId( getArtifacts() ); } - return artifactMap; } @@ -1348,7 +1342,12 @@ public Set getReportArtifacts() { - Set reportArtifacts = new HashSet(); + if( reportArtifacts != null ) + { + return reportArtifacts; + } + + reportArtifacts = new HashSet(); List reports = getReportPlugins(); if ( reports != null ) { @@ -1406,7 +1405,11 @@ public Set getExtensionArtifacts() { - Set extensionArtifacts = new HashSet(); + if( extensionArtifacts != null ) + { + return extensionArtifacts; + } + extensionArtifacts = new HashSet(); List extensions = getBuildExtensions(); if ( extensions != null ) { @@ -1484,7 +1487,7 @@ { if ( getModel().getReporting() == null ) { - return null; + return Collections.EMPTY_LIST; } return getModel().getReporting().getPlugins(); @@ -1494,7 +1497,7 @@ { if ( getModel().getBuild() == null ) { - return null; + return Collections.EMPTY_LIST; } return getModel().getBuild().getPlugins(); }