You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2011/03/06 08:53:31 UTC
svn commit: r1078415 - in /maven/plugins/branches/maven-site-plugin-3.x: ./
src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java
Author: ltheussl
Date: Sun Mar 6 07:53:30 2011
New Revision: 1078415
URL: http://svn.apache.org/viewvc?rev=1078415&view=rev
Log:
merge r1065576 from trunk
Modified:
maven/plugins/branches/maven-site-plugin-3.x/ (props changed)
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java
Propchange: maven/plugins/branches/maven-site-plugin-3.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Mar 6 07:53:30 2011
@@ -1 +1 @@
-/maven/plugins/trunk/maven-site-plugin:801155,801171,801470,806898-806906,807943-808180,809252,810298,884137,886844,886847,890094,890124,891014,891688,920027,920041,942622,943455,944145,950463,956681,984466,984960,984991,984996,1029307,1033379,1037476,1039137,1039143,1049020,1051139-1051449,1055019,1055033,1055047,1055089,1060289,1063639,1064626
+/maven/plugins/trunk/maven-site-plugin:801155,801171,801470,806898-806906,807943-808180,809252,810298,884137,886844,886847,890094,890124,891014,891688,920027,920041,942622,943455,944145,950463,956681,984466,984960,984991,984996,1029307,1033379,1037476,1039137,1039143,1049020,1051139-1051449,1055019,1055033,1055047,1055089,1060289,1063639,1064626,1065576
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java?rev=1078415&r1=1078414&r2=1078415&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java Sun Mar 6 07:53:30 2011
@@ -23,18 +23,14 @@ import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.io.Writer;
-import java.util.HashMap;
import java.util.List;
import java.util.Locale;
-import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.apache.maven.doxia.site.decoration.DecorationModel;
import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Reader;
import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Writer;
-import org.apache.maven.doxia.tools.SiteToolException;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
@@ -82,10 +78,6 @@ public class SiteDescriptorAttachMojo
if ( descriptorFile.exists() )
{
- Map<String, String> props = new HashMap<String, String>();
- props.put( "reports", "<menu ref=\"reports\"/>" );
- props.put( "modules", "<menu ref=\"modules\"/>" );
-
DecorationModel decoration;
XmlStreamReader reader = null;
try
@@ -93,10 +85,6 @@ public class SiteDescriptorAttachMojo
reader = ReaderFactory.newXmlReader( descriptorFile );
String siteDescriptorContent = IOUtil.toString( reader );
- siteDescriptorContent =
- siteTool.getInterpolatedSiteDescriptorContent( props, project, siteDescriptorContent,
- getInputEncoding(), getOutputEncoding() );
-
decoration = new DecorationXpp3Reader().read( new StringReader( siteDescriptorContent ) );
}
catch ( XmlPullParserException e )
@@ -107,29 +95,11 @@ public class SiteDescriptorAttachMojo
{
throw new MojoExecutionException( "Error reading site descriptor", e );
}
- catch ( SiteToolException e )
- {
- throw new MojoExecutionException( "Error when interpolating site descriptor", e );
- }
finally
{
IOUtils.closeQuietly( reader );
}
- MavenProject parentProject = siteTool.getParentProject( project, reactorProjects, localRepository );
- if ( parentProject != null && project.getUrl() != null && parentProject.getUrl() != null )
- {
- siteTool.populateParentMenu( decoration, locale, project, parentProject, true );
- }
- try
- {
- siteTool.populateModulesMenu( project, reactorProjects, localRepository, decoration, locale, true );
- }
- catch ( SiteToolException e )
- {
- throw new MojoExecutionException( "Error when populating modules", e );
- }
-
// Calculate the classifier to use
String classifier = null;
int index = descriptorFile.getName().lastIndexOf( '.' );