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 19:26:08 UTC
svn commit: r1078530 - in /maven/plugins/branches/maven-site-plugin-3.x: ./
src/main/java/org/apache/maven/plugins/site/ src/site/apt/examples/
Author: ltheussl
Date: Sun Mar 6 18:26:07 2011
New Revision: 1078530
URL: http://svn.apache.org/viewvc?rev=1078530&view=rev
Log:
merge r1070079 - r1075018 from trunk
Modified:
maven/plugins/branches/maven-site-plugin-3.x/ (props changed)
maven/plugins/branches/maven-site-plugin-3.x/pom.xml
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/CategorySummaryDocumentRenderer.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/EffectiveSiteMojo.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorArtifactMetadata.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorAttachMojo.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteJarMojo.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteRunMojo.java
maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/multimodule.apt
maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/site-deploy-to-sourceforge.net.apt
Propchange: maven/plugins/branches/maven-site-plugin-3.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Mar 6 18:26:07 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,1065576,1065582,1066038,1067103,1067120
+/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,1065582,1066038,1067103,1067120,1070079-1070080,1070100,1070104,1074118,1075018
Modified: maven/plugins/branches/maven-site-plugin-3.x/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/pom.xml?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/pom.xml (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/pom.xml Sun Mar 6 18:26:07 2011
@@ -161,10 +161,6 @@ under the License.
</contributor>
</contributors>
- <prerequisites>
- <maven>${mavenVersion}</maven>
- </prerequisites>
-
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/branches/maven-site-plugin-3.x</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/branches/maven-site-plugin-3.x</developerConnection>
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java Sun Mar 6 18:26:07 2011
@@ -25,8 +25,6 @@ import java.net.URL;
import java.util.List;
-import org.apache.commons.lang.StringUtils;
-
import org.apache.maven.artifact.manager.WagonManager;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.MavenSession;
@@ -65,6 +63,7 @@ import org.codehaus.plexus.configuration
import org.codehaus.plexus.context.Context;
import org.codehaus.plexus.context.ContextException;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
+import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
/**
@@ -409,8 +408,9 @@ public abstract class AbstractDeployMojo
if ( StringUtils.contains( nonProxyHost, "*" ) )
{
// Handle wildcard at the end, beginning or middle of the nonProxyHost
- String nonProxyHostPrefix = StringUtils.substringBefore( nonProxyHost, "*" );
- String nonProxyHostSuffix = StringUtils.substringAfter( nonProxyHost, "*" );
+ final int pos = nonProxyHost.indexOf( '*' );
+ String nonProxyHostPrefix = nonProxyHost.substring( 0, pos );
+ String nonProxyHostSuffix = nonProxyHost.substring( pos + 1 );
// prefix*
if ( StringUtils.isNotEmpty( nonProxyHostPrefix ) && host.startsWith( nonProxyHostPrefix )
&& StringUtils.isEmpty( nonProxyHostSuffix ) )
@@ -451,10 +451,10 @@ public abstract class AbstractDeployMojo
// but the real protocol (transport layer) is http(s)
// and it's the one use in wagon to find the proxy arghhh
// so we will check both
- if (StringUtils.equalsIgnoreCase( "dav", protocol ) && StringUtils.startsWith( url, "dav:" ))
+ if ( StringUtils.equalsIgnoreCase( "dav", protocol ) && url.startsWith( "dav:" ) )
{
- url = StringUtils.substringAfter( url, "dav:" );
- if (StringUtils.startsWith( url, "http" ))
+ url = url.substring( 4 );
+ if ( url.startsWith( "http" ) )
{
try
{
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/CategorySummaryDocumentRenderer.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/CategorySummaryDocumentRenderer.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/CategorySummaryDocumentRenderer.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/CategorySummaryDocumentRenderer.java Sun Mar 6 18:26:07 2011
@@ -19,6 +19,13 @@ package org.apache.maven.plugins.site;
* under the License.
*/
+import java.io.FileNotFoundException;
+import java.io.Writer;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.render.RenderingContext;
import org.apache.maven.doxia.siterenderer.DocumentRenderer;
@@ -29,13 +36,8 @@ import org.apache.maven.doxia.siterender
import org.apache.maven.doxia.tools.MojoLogWrapper;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.reporting.MavenReport;
-import org.codehaus.plexus.i18n.I18N;
-import java.io.FileNotFoundException;
-import java.io.Writer;
-import java.util.Collections;
-import java.util.List;
-import java.util.Locale;
+import org.codehaus.plexus.i18n.I18N;
/**
* Renders a Maven report.
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/EffectiveSiteMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/EffectiveSiteMojo.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/EffectiveSiteMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/EffectiveSiteMojo.java Sun Mar 6 18:26:07 2011
@@ -23,8 +23,10 @@ import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
+
import java.text.DateFormat;
import java.text.SimpleDateFormat;
+
import java.util.Date;
import java.util.List;
import java.util.Locale;
@@ -34,6 +36,7 @@ import org.apache.maven.doxia.site.decor
import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
+
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.WriterFactory;
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/ReportDocumentRenderer.java Sun Mar 6 18:26:07 2011
@@ -19,14 +19,15 @@ package org.apache.maven.plugins.site;
* under the License.
*/
-import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
+import java.io.File;
+
import java.util.ArrayList;
-import java.util.List;
import java.util.Locale;
+import java.util.List;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.sink.SinkFactory;
@@ -41,6 +42,7 @@ import org.apache.maven.plugin.logging.L
import org.apache.maven.reporting.MavenMultiPageReport;
import org.apache.maven.reporting.MavenReport;
import org.apache.maven.reporting.MavenReportException;
+
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.WriterFactory;
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorArtifactMetadata.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorArtifactMetadata.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorArtifactMetadata.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDescriptorArtifactMetadata.java Sun Mar 6 18:26:07 2011
@@ -19,6 +19,10 @@ package org.apache.maven.plugins.site;
* under the License.
*/
+import java.io.File;
+import java.io.IOException;
+import java.io.Writer;
+
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.metadata.AbstractArtifactMetadata;
import org.apache.maven.artifact.metadata.ArtifactMetadata;
@@ -26,13 +30,10 @@ import org.apache.maven.artifact.reposit
import org.apache.maven.artifact.repository.metadata.RepositoryMetadataStoreException;
import org.apache.maven.doxia.site.decoration.DecorationModel;
import org.apache.maven.doxia.site.decoration.io.xpp3.DecorationXpp3Writer;
+
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.WriterFactory;
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-
/**
* Attach a POM to an artifact.
*
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=1078530&r1=1078529&r2=1078530&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 18:26:07 2011
@@ -23,15 +23,16 @@ import java.io.File;
import java.io.IOException;
import java.io.StringReader;
import java.io.Writer;
+
import java.util.List;
import java.util.Locale;
-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.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProjectHelper;
+
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.WriterFactory;
@@ -97,7 +98,7 @@ public class SiteDescriptorAttachMojo
}
finally
{
- IOUtils.closeQuietly( reader );
+ IOUtil.close( reader );
}
// Calculate the classifier to use
@@ -134,7 +135,7 @@ public class SiteDescriptorAttachMojo
}
finally
{
- IOUtils.closeQuietly( writer );
+ IOUtil.close( writer );
}
}
}
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteJarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteJarMojo.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteJarMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteJarMojo.java Sun Mar 6 18:26:07 2011
@@ -19,15 +19,16 @@ package org.apache.maven.plugins.site;
* under the License.
*/
+import java.io.File;
+import java.io.IOException;
+
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProjectHelper;
+
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.jar.JarArchiver;
-import java.io.File;
-import java.io.IOException;
-
/**
* Bundles the site output into a JAR so that it can be deployed to a repository.
*
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteMojo.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteMojo.java Sun Mar 6 18:26:07 2011
@@ -21,6 +21,7 @@ package org.apache.maven.plugins.site;
import java.io.File;
import java.io.IOException;
+
import java.util.Collections;
import java.util.List;
import java.util.Locale;
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteRunMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteRunMojo.java?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteRunMojo.java (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteRunMojo.java Sun Mar 6 18:26:07 2011
@@ -24,6 +24,7 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
+
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
@@ -35,7 +36,9 @@ import org.apache.maven.plugin.MojoExecu
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.site.webapp.DoxiaBean;
import org.apache.maven.plugins.site.webapp.DoxiaFilter;
+
import org.codehaus.plexus.util.IOUtil;
+
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/multimodule.apt
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/multimodule.apt?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/multimodule.apt (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/multimodule.apt Sun Mar 6 18:26:07 2011
@@ -72,9 +72,11 @@ Building multi-module sites
In Maven 3 you must attach the site descriptor yourself, even for projects
with packaging set to "pom".
- By default, only the basic settings are inherited. From the body, <<only>>
- the links and breadcrumbs are inherited, and these accumulate to contain all the parents'
+ By default, all the parent descriptor settings are inherited with the only exception of menus, see below.
+ From the body, the links and breadcrumbs accumulate to contain all the parent's
site descriptor links and breadcrumbs.
+ If the parent contains some breadcrumb and the inheriting site descriptor doesn't,
+ a breadcrumb with the current site descriptor's name will be added automatically.
However, it is possible to inherit menus as well. To do so, use the <<<inherit>>> attribute in the site descriptor. This can
be either <<<top>>> or <<<bottom>>>, indicating where the inherited menu will be placed. For example:
Modified: maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/site-deploy-to-sourceforge.net.apt
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/site-deploy-to-sourceforge.net.apt?rev=1078530&r1=1078529&r2=1078530&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/site-deploy-to-sourceforge.net.apt (original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/site/apt/examples/site-deploy-to-sourceforge.net.apt Sun Mar 6 18:26:07 2011
@@ -35,7 +35,7 @@ ssh -t <username>,<project name>@shell.s
...
<site>
<id>your_project.sf.net</id>
- <url>scp://shell.sourceforge.net/home/groups/y/yo/your_project/htdocs</url>
+ <url>scp://shell.sourceforge.net/home/project-web/your_project/htdocs</url>
</site>
</distributionManagement>
---
@@ -78,7 +78,7 @@ For path information and login help, typ
...
<site>
<id>qifcon.sf.net</id>
- <url>scp://shell.sourceforge.net/home/groups/q/qi/qifcon/htdocs</url>
+ <url>scp://shell.sourceforge.net/home/project-web/qifcon/htdocs</url>
</site>
</distributionManagement>
...