From 2259cea946cff15c654b6df81eaecbe2f7ecc0a9 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Thu, 21 Jul 2005 07:05:34 +0000 Subject: [PATCH] set eol style git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@220011 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/reporting/MavenReport.java | 108 +- .../maven/reporting/AbstractMavenReport.java | 416 ++--- .../maven/reporting/sink/MultiPageSink.java | 1498 ++++++++--------- .../maven/reporting/sink/SinkFactory.java | 158 +- maven-reporting/pom.xml | 34 +- 5 files changed, 1107 insertions(+), 1107 deletions(-) diff --git a/maven-reporting/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java b/maven-reporting/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java index 5ed074c3b6..5a44349d6f 100644 --- a/maven-reporting/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java +++ b/maven-reporting/maven-reporting-api/src/main/java/org/apache/maven/reporting/MavenReport.java @@ -1,54 +1,54 @@ -package org.apache.maven.reporting; - -/* - * Copyright 2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.doxia.sink.Sink; - -import java.io.File; -import java.util.Locale; - -/** - * The basis for a Maven report. - * - * @author Brett Porter - * @author Emmanuel Venisse - * @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $ - */ -public interface MavenReport -{ - String ROLE = MavenReport.class.getName(); - - String CATEGORY_PROJECT_INFORMATION = "Project Info"; - - String CATEGORY_PROJECT_REPORTS = "Project Reports"; - - void generate( Sink sink, Locale locale ) - throws MavenReportException; - - String getOutputName(); - - String getName( Locale locale ); - - String getCategoryName(); - - String getDescription( Locale locale ); - - // TODO: remove? - void setReportOutputDirectory( File outputDirectory ); - - File getReportOutputDirectory(); -} +package org.apache.maven.reporting; + +/* + * Copyright 2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.codehaus.doxia.sink.Sink; + +import java.io.File; +import java.util.Locale; + +/** + * The basis for a Maven report. + * + * @author Brett Porter + * @author Emmanuel Venisse + * @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $ + */ +public interface MavenReport +{ + String ROLE = MavenReport.class.getName(); + + String CATEGORY_PROJECT_INFORMATION = "Project Info"; + + String CATEGORY_PROJECT_REPORTS = "Project Reports"; + + void generate( Sink sink, Locale locale ) + throws MavenReportException; + + String getOutputName(); + + String getName( Locale locale ); + + String getCategoryName(); + + String getDescription( Locale locale ); + + // TODO: remove? + void setReportOutputDirectory( File outputDirectory ); + + File getReportOutputDirectory(); +} diff --git a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java index d5490f8a29..da073c0b42 100644 --- a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java +++ b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java @@ -1,208 +1,208 @@ -package org.apache.maven.reporting; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.project.MavenProject; -import org.codehaus.doxia.module.xhtml.XhtmlSink; -import org.codehaus.doxia.sink.Sink; -import org.codehaus.doxia.site.renderer.SiteRenderer; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.StringInputStream; -import org.codehaus.plexus.util.StringUtils; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; - -/** - * The basis for a Maven report. - * - * @author Emmanuel Venisse - * @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $ - */ -public abstract class AbstractMavenReport - extends AbstractMojo - implements MavenReport -{ - /** - * @todo share, use default excludes from plexus utils. - */ - protected static final String[] DEFAULT_EXCLUDES = {// Miscellaneous typical temporary files - "**/*~", "**/#*#", "**/.#*", "**/%*%", "**/._*", - - // CVS - "**/CVS", "**/CVS/**", "**/.cvsignore", - - // SCCS - "**/SCCS", "**/SCCS/**", - - // Visual SourceSafe - "**/vssver.scc", - - // Subversion - "**/.svn", "**/.svn/**", - - // Mac - "**/.DS_Store"}; - - private Sink sink; - - private Locale locale = Locale.ENGLISH; - - protected abstract SiteRenderer getSiteRenderer(); - - protected abstract String getOutputDirectory(); - - protected abstract MavenProject getProject(); - - private File reportOutputDirectory; - - /** - * @see org.apache.maven.plugin.Mojo#execute() - */ - public void execute() - throws MojoExecutionException - { - try - { - String outputDirectory = getOutputDirectory(); - - XhtmlSink sink = getSiteRenderer().createSink( new File( outputDirectory ), getOutputName() + ".html", - outputDirectory, getSiteDescriptor(), "maven" ); - - generate( sink, Locale.ENGLISH ); - - getSiteRenderer().copyResources( outputDirectory, "maven" ); - } - catch ( Exception e ) - { - throw new MojoExecutionException( "An error has occurred in " + getName( locale ) + " report generation.", e ); - } - } - - /** - * @see org.apache.maven.reporting.MavenReport#generate(org.codehaus.doxia.sink.Sink, java.util.Locale) - * @deprecated - */ - public void generate( Sink sink, Locale locale ) - throws MavenReportException - { - if ( sink == null ) - { - throw new MavenReportException( "You must specify a sink." ); - } - else - { - this.sink = sink; - } - - executeReport( locale ); - - closeReport(); - } - - protected abstract void executeReport( Locale locale ) - throws MavenReportException; - - protected void closeReport() - { - } - - public String getCategoryName() - { - return CATEGORY_PROJECT_REPORTS; - } - - private String getReportsMenu() - { - StringBuffer buffer = new StringBuffer(); - buffer.append( "\n" ); - - buffer.append( " \n" ); - - buffer.append( "\n" ); - - return buffer.toString(); - } - - private InputStream getSiteDescriptor() - throws MojoExecutionException - { - String siteDescriptorContent = ""; - - try - { - siteDescriptorContent = IOUtil.toString( getClass().getResourceAsStream( "/default-report.xml" ) ); - } - catch ( IOException e ) - { - throw new MojoExecutionException( "The site descriptor cannot be read!", e ); - } - - Map props = new HashMap(); - - props.put( "reports", getReportsMenu() ); - - // TODO: interpolate ${project.*} in general - - if ( getProject().getName() != null ) - { - props.put( "project.name", getProject().getName() ); - } - else - { - props.put( "project.name", "NO_PROJECT_NAME_SET" ); - } - - if ( getProject().getUrl() != null ) - { - props.put( "project.url", getProject().getUrl() ); - } - else - { - props.put( "project.url", "NO_PROJECT_URL_SET" ); - } - - siteDescriptorContent = StringUtils.interpolate( siteDescriptorContent, props ); - - return new StringInputStream( siteDescriptorContent ); - } - - public File getReportOutputDirectory() - { - if ( reportOutputDirectory == null ) - { - reportOutputDirectory = new File( getOutputDirectory() ); - } - return reportOutputDirectory; - } - - public void setReportOutputDirectory( File reportOutputDirectory ) - { - this.reportOutputDirectory = reportOutputDirectory; - } - - public Sink getSink() - { - return sink; - } -} +package org.apache.maven.reporting; + +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.project.MavenProject; +import org.codehaus.doxia.module.xhtml.XhtmlSink; +import org.codehaus.doxia.sink.Sink; +import org.codehaus.doxia.site.renderer.SiteRenderer; +import org.codehaus.plexus.util.IOUtil; +import org.codehaus.plexus.util.StringInputStream; +import org.codehaus.plexus.util.StringUtils; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; + +/** + * The basis for a Maven report. + * + * @author Emmanuel Venisse + * @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $ + */ +public abstract class AbstractMavenReport + extends AbstractMojo + implements MavenReport +{ + /** + * @todo share, use default excludes from plexus utils. + */ + protected static final String[] DEFAULT_EXCLUDES = {// Miscellaneous typical temporary files + "**/*~", "**/#*#", "**/.#*", "**/%*%", "**/._*", + + // CVS + "**/CVS", "**/CVS/**", "**/.cvsignore", + + // SCCS + "**/SCCS", "**/SCCS/**", + + // Visual SourceSafe + "**/vssver.scc", + + // Subversion + "**/.svn", "**/.svn/**", + + // Mac + "**/.DS_Store"}; + + private Sink sink; + + private Locale locale = Locale.ENGLISH; + + protected abstract SiteRenderer getSiteRenderer(); + + protected abstract String getOutputDirectory(); + + protected abstract MavenProject getProject(); + + private File reportOutputDirectory; + + /** + * @see org.apache.maven.plugin.Mojo#execute() + */ + public void execute() + throws MojoExecutionException + { + try + { + String outputDirectory = getOutputDirectory(); + + XhtmlSink sink = getSiteRenderer().createSink( new File( outputDirectory ), getOutputName() + ".html", + outputDirectory, getSiteDescriptor(), "maven" ); + + generate( sink, Locale.ENGLISH ); + + getSiteRenderer().copyResources( outputDirectory, "maven" ); + } + catch ( Exception e ) + { + throw new MojoExecutionException( "An error has occurred in " + getName( locale ) + " report generation.", e ); + } + } + + /** + * @see org.apache.maven.reporting.MavenReport#generate(org.codehaus.doxia.sink.Sink, java.util.Locale) + * @deprecated + */ + public void generate( Sink sink, Locale locale ) + throws MavenReportException + { + if ( sink == null ) + { + throw new MavenReportException( "You must specify a sink." ); + } + else + { + this.sink = sink; + } + + executeReport( locale ); + + closeReport(); + } + + protected abstract void executeReport( Locale locale ) + throws MavenReportException; + + protected void closeReport() + { + } + + public String getCategoryName() + { + return CATEGORY_PROJECT_REPORTS; + } + + private String getReportsMenu() + { + StringBuffer buffer = new StringBuffer(); + buffer.append( "\n" ); + + buffer.append( " \n" ); + + buffer.append( "\n" ); + + return buffer.toString(); + } + + private InputStream getSiteDescriptor() + throws MojoExecutionException + { + String siteDescriptorContent = ""; + + try + { + siteDescriptorContent = IOUtil.toString( getClass().getResourceAsStream( "/default-report.xml" ) ); + } + catch ( IOException e ) + { + throw new MojoExecutionException( "The site descriptor cannot be read!", e ); + } + + Map props = new HashMap(); + + props.put( "reports", getReportsMenu() ); + + // TODO: interpolate ${project.*} in general + + if ( getProject().getName() != null ) + { + props.put( "project.name", getProject().getName() ); + } + else + { + props.put( "project.name", "NO_PROJECT_NAME_SET" ); + } + + if ( getProject().getUrl() != null ) + { + props.put( "project.url", getProject().getUrl() ); + } + else + { + props.put( "project.url", "NO_PROJECT_URL_SET" ); + } + + siteDescriptorContent = StringUtils.interpolate( siteDescriptorContent, props ); + + return new StringInputStream( siteDescriptorContent ); + } + + public File getReportOutputDirectory() + { + if ( reportOutputDirectory == null ) + { + reportOutputDirectory = new File( getOutputDirectory() ); + } + return reportOutputDirectory; + } + + public void setReportOutputDirectory( File reportOutputDirectory ) + { + this.reportOutputDirectory = reportOutputDirectory; + } + + public Sink getSink() + { + return sink; + } +} diff --git a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/MultiPageSink.java b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/MultiPageSink.java index 253f4d283d..8ce93cdcc5 100644 --- a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/MultiPageSink.java +++ b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/MultiPageSink.java @@ -1,749 +1,749 @@ -package org.apache.maven.reporting.sink; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.doxia.sink.Sink; -import org.codehaus.doxia.sink.SinkAdapter; - -/** - * @author Emmanuel Venisse - * - */ -public class MultiPageSink - extends SinkAdapter -{ - private String outputName; - - private Sink sink; - - public MultiPageSink( String outputName, Sink sink ) - { - this.outputName = outputName; - this.sink = sink; - } - - public String getOutputName() - { - return outputName; - } - - public Sink getEmbeddedSink() - { - return sink; - } - - public void closeSink() - { - sink.body_(); - sink.flush(); - sink.close(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#anchor_() - */ - public void anchor_() - { - sink.anchor_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#anchor(java.lang.String) - */ - public void anchor( String arg0 ) - { - sink.anchor( arg0 ); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#author_() - */ - public void author_() - { - sink.author_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#author() - */ - public void author() - { - sink.author(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#body() - */ - public void body() - { - sink.body(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#body_() - */ - public void body_() - { - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#bold_() - */ - public void bold_() - { - sink.bold_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#bold() - */ - public void bold() - { - sink.bold(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#close() - */ - public void close() - { - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#date_() - */ - public void date_() - { - sink.date_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#date() - */ - public void date() - { - sink.date(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definedTerm_() - */ - public void definedTerm_() - { - sink.definedTerm_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definedTerm() - */ - public void definedTerm() - { - sink.definedTerm(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definition_() - */ - public void definition_() - { - sink.definition_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definition() - */ - public void definition() - { - sink.definition(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definitionList_() - */ - public void definitionList_() - { - sink.definitionList_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definitionList() - */ - public void definitionList() - { - sink.definitionList(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definitionListItem_() - */ - public void definitionListItem_() - { - sink.definitionListItem_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#definitionListItem() - */ - public void definitionListItem() - { - sink.definitionListItem(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#figure_() - */ - public void figure_() - { - sink.figure_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#figure() - */ - public void figure() - { - sink.figure(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#figureCaption_() - */ - public void figureCaption_() - { - sink.figureCaption_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#figureCaption() - */ - public void figureCaption() - { - sink.figureCaption(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#figureGraphics(java.lang.String) - */ - public void figureGraphics( String arg0 ) - { - sink.figureGraphics( arg0 ); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#flush() - */ - public void flush() - { - sink.flush(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#head_() - */ - public void head_() - { - sink.head_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#head() - */ - public void head() - { - sink.head(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#horizontalRule() - */ - public void horizontalRule() - { - sink.horizontalRule(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#italic_() - */ - public void italic_() - { - sink.italic_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#italic() - */ - public void italic() - { - sink.italic(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#lineBreak() - */ - public void lineBreak() - { - sink.lineBreak(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#link_() - */ - public void link_() - { - sink.link_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#link(java.lang.String) - */ - public void link( String arg0 ) - { - sink.link( arg0 ); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#list_() - */ - public void list_() - { - sink.list_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#list() - */ - public void list() - { - sink.list(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#listItem_() - */ - public void listItem_() - { - sink.listItem_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#listItem() - */ - public void listItem() - { - sink.listItem(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#monospaced_() - */ - public void monospaced_() - { - sink.monospaced_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#monospaced() - */ - public void monospaced() - { - sink.monospaced(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#nonBreakingSpace() - */ - public void nonBreakingSpace() - { - sink.nonBreakingSpace(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#numberedList_() - */ - public void numberedList_() - { - sink.numberedList_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#numberedList(int) - */ - public void numberedList( int arg0 ) - { - sink.numberedList( arg0 ); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#numberedListItem_() - */ - public void numberedListItem_() - { - sink.numberedListItem_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#numberedListItem() - */ - public void numberedListItem() - { - sink.numberedListItem(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#pageBreak() - */ - public void pageBreak() - { - sink.pageBreak(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#paragraph_() - */ - public void paragraph_() - { - sink.paragraph_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#paragraph() - */ - public void paragraph() - { - sink.paragraph(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#rawText(java.lang.String) - */ - public void rawText( String arg0 ) - { - sink.rawText( arg0 ); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section1_() - */ - public void section1_() - { - sink.section1_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section1() - */ - public void section1() - { - sink.section1(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section2_() - */ - public void section2_() - { - sink.section2_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section2() - */ - public void section2() - { - sink.section2(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section3_() - */ - public void section3_() - { - sink.section3_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section3() - */ - public void section3() - { - sink.section3(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section4_() - */ - public void section4_() - { - sink.section4_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section4() - */ - public void section4() - { - sink.section4(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section5_() - */ - public void section5_() - { - sink.section5_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#section5() - */ - public void section5() - { - sink.section5(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle_() - */ - public void sectionTitle_() - { - sink.sectionTitle_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle() - */ - public void sectionTitle() - { - sink.sectionTitle(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle1_() - */ - public void sectionTitle1_() - { - sink.sectionTitle1_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle1() - */ - public void sectionTitle1() - { - sink.sectionTitle1(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle2_() - */ - public void sectionTitle2_() - { - sink.sectionTitle2_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle2() - */ - public void sectionTitle2() - { - sink.sectionTitle2(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle3_() - */ - public void sectionTitle3_() - { - sink.sectionTitle3_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle3() - */ - public void sectionTitle3() - { - sink.sectionTitle3(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle4_() - */ - public void sectionTitle4_() - { - sink.sectionTitle4_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle4() - */ - public void sectionTitle4() - { - sink.sectionTitle4(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle5_() - */ - public void sectionTitle5_() - { - sink.sectionTitle5_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle5() - */ - public void sectionTitle5() - { - sink.sectionTitle5(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#table_() - */ - public void table_() - { - sink.table_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#table() - */ - public void table() - { - sink.table(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableCaption_() - */ - public void tableCaption_() - { - sink.tableCaption_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableCaption() - */ - public void tableCaption() - { - sink.tableCaption(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableCell_() - */ - public void tableCell_() - { - sink.tableCell_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableCell() - */ - public void tableCell() - { - sink.tableCell(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableHeaderCell_() - */ - public void tableHeaderCell_() - { - sink.tableHeaderCell_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableHeaderCell() - */ - public void tableHeaderCell() - { - sink.tableHeaderCell(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableRow_() - */ - public void tableRow_() - { - sink.tableRow_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableRow() - */ - public void tableRow() - { - sink.tableRow(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableRows_() - */ - public void tableRows_() - { - sink.tableRows_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#tableRows(int[], boolean) - */ - public void tableRows( int[] arg0, boolean arg1 ) - { - sink.tableRows( arg0, arg1 ); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#text(java.lang.String) - */ - public void text( String arg0 ) - { - sink.text( arg0 ); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#title_() - */ - public void title_() - { - sink.title_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#title() - */ - public void title() - { - sink.title(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#verbatim_() - */ - public void verbatim_() - { - sink.verbatim_(); - } - - /** - * @see org.codehaus.doxia.sink.SinkAdapter#verbatim(boolean) - */ - public void verbatim( boolean arg0 ) - { - sink.verbatim( arg0 ); - } -} +package org.apache.maven.reporting.sink; + +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.codehaus.doxia.sink.Sink; +import org.codehaus.doxia.sink.SinkAdapter; + +/** + * @author Emmanuel Venisse + * + */ +public class MultiPageSink + extends SinkAdapter +{ + private String outputName; + + private Sink sink; + + public MultiPageSink( String outputName, Sink sink ) + { + this.outputName = outputName; + this.sink = sink; + } + + public String getOutputName() + { + return outputName; + } + + public Sink getEmbeddedSink() + { + return sink; + } + + public void closeSink() + { + sink.body_(); + sink.flush(); + sink.close(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#anchor_() + */ + public void anchor_() + { + sink.anchor_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#anchor(java.lang.String) + */ + public void anchor( String arg0 ) + { + sink.anchor( arg0 ); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#author_() + */ + public void author_() + { + sink.author_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#author() + */ + public void author() + { + sink.author(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#body() + */ + public void body() + { + sink.body(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#body_() + */ + public void body_() + { + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#bold_() + */ + public void bold_() + { + sink.bold_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#bold() + */ + public void bold() + { + sink.bold(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#close() + */ + public void close() + { + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#date_() + */ + public void date_() + { + sink.date_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#date() + */ + public void date() + { + sink.date(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definedTerm_() + */ + public void definedTerm_() + { + sink.definedTerm_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definedTerm() + */ + public void definedTerm() + { + sink.definedTerm(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definition_() + */ + public void definition_() + { + sink.definition_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definition() + */ + public void definition() + { + sink.definition(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definitionList_() + */ + public void definitionList_() + { + sink.definitionList_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definitionList() + */ + public void definitionList() + { + sink.definitionList(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definitionListItem_() + */ + public void definitionListItem_() + { + sink.definitionListItem_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#definitionListItem() + */ + public void definitionListItem() + { + sink.definitionListItem(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#figure_() + */ + public void figure_() + { + sink.figure_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#figure() + */ + public void figure() + { + sink.figure(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#figureCaption_() + */ + public void figureCaption_() + { + sink.figureCaption_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#figureCaption() + */ + public void figureCaption() + { + sink.figureCaption(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#figureGraphics(java.lang.String) + */ + public void figureGraphics( String arg0 ) + { + sink.figureGraphics( arg0 ); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#flush() + */ + public void flush() + { + sink.flush(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#head_() + */ + public void head_() + { + sink.head_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#head() + */ + public void head() + { + sink.head(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#horizontalRule() + */ + public void horizontalRule() + { + sink.horizontalRule(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#italic_() + */ + public void italic_() + { + sink.italic_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#italic() + */ + public void italic() + { + sink.italic(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#lineBreak() + */ + public void lineBreak() + { + sink.lineBreak(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#link_() + */ + public void link_() + { + sink.link_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#link(java.lang.String) + */ + public void link( String arg0 ) + { + sink.link( arg0 ); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#list_() + */ + public void list_() + { + sink.list_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#list() + */ + public void list() + { + sink.list(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#listItem_() + */ + public void listItem_() + { + sink.listItem_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#listItem() + */ + public void listItem() + { + sink.listItem(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#monospaced_() + */ + public void monospaced_() + { + sink.monospaced_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#monospaced() + */ + public void monospaced() + { + sink.monospaced(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#nonBreakingSpace() + */ + public void nonBreakingSpace() + { + sink.nonBreakingSpace(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#numberedList_() + */ + public void numberedList_() + { + sink.numberedList_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#numberedList(int) + */ + public void numberedList( int arg0 ) + { + sink.numberedList( arg0 ); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#numberedListItem_() + */ + public void numberedListItem_() + { + sink.numberedListItem_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#numberedListItem() + */ + public void numberedListItem() + { + sink.numberedListItem(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#pageBreak() + */ + public void pageBreak() + { + sink.pageBreak(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#paragraph_() + */ + public void paragraph_() + { + sink.paragraph_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#paragraph() + */ + public void paragraph() + { + sink.paragraph(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#rawText(java.lang.String) + */ + public void rawText( String arg0 ) + { + sink.rawText( arg0 ); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section1_() + */ + public void section1_() + { + sink.section1_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section1() + */ + public void section1() + { + sink.section1(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section2_() + */ + public void section2_() + { + sink.section2_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section2() + */ + public void section2() + { + sink.section2(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section3_() + */ + public void section3_() + { + sink.section3_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section3() + */ + public void section3() + { + sink.section3(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section4_() + */ + public void section4_() + { + sink.section4_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section4() + */ + public void section4() + { + sink.section4(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section5_() + */ + public void section5_() + { + sink.section5_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#section5() + */ + public void section5() + { + sink.section5(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle_() + */ + public void sectionTitle_() + { + sink.sectionTitle_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle() + */ + public void sectionTitle() + { + sink.sectionTitle(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle1_() + */ + public void sectionTitle1_() + { + sink.sectionTitle1_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle1() + */ + public void sectionTitle1() + { + sink.sectionTitle1(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle2_() + */ + public void sectionTitle2_() + { + sink.sectionTitle2_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle2() + */ + public void sectionTitle2() + { + sink.sectionTitle2(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle3_() + */ + public void sectionTitle3_() + { + sink.sectionTitle3_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle3() + */ + public void sectionTitle3() + { + sink.sectionTitle3(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle4_() + */ + public void sectionTitle4_() + { + sink.sectionTitle4_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle4() + */ + public void sectionTitle4() + { + sink.sectionTitle4(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle5_() + */ + public void sectionTitle5_() + { + sink.sectionTitle5_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#sectionTitle5() + */ + public void sectionTitle5() + { + sink.sectionTitle5(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#table_() + */ + public void table_() + { + sink.table_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#table() + */ + public void table() + { + sink.table(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableCaption_() + */ + public void tableCaption_() + { + sink.tableCaption_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableCaption() + */ + public void tableCaption() + { + sink.tableCaption(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableCell_() + */ + public void tableCell_() + { + sink.tableCell_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableCell() + */ + public void tableCell() + { + sink.tableCell(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableHeaderCell_() + */ + public void tableHeaderCell_() + { + sink.tableHeaderCell_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableHeaderCell() + */ + public void tableHeaderCell() + { + sink.tableHeaderCell(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableRow_() + */ + public void tableRow_() + { + sink.tableRow_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableRow() + */ + public void tableRow() + { + sink.tableRow(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableRows_() + */ + public void tableRows_() + { + sink.tableRows_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#tableRows(int[], boolean) + */ + public void tableRows( int[] arg0, boolean arg1 ) + { + sink.tableRows( arg0, arg1 ); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#text(java.lang.String) + */ + public void text( String arg0 ) + { + sink.text( arg0 ); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#title_() + */ + public void title_() + { + sink.title_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#title() + */ + public void title() + { + sink.title(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#verbatim_() + */ + public void verbatim_() + { + sink.verbatim_(); + } + + /** + * @see org.codehaus.doxia.sink.SinkAdapter#verbatim(boolean) + */ + public void verbatim( boolean arg0 ) + { + sink.verbatim( arg0 ); + } +} diff --git a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/SinkFactory.java b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/SinkFactory.java index 6077cff77a..14b868228c 100644 --- a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/SinkFactory.java +++ b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/sink/SinkFactory.java @@ -1,79 +1,79 @@ -package org.apache.maven.reporting.sink; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.io.InputStream; - -import org.codehaus.doxia.sink.Sink; -import org.codehaus.doxia.site.renderer.SiteRenderer; -import org.codehaus.plexus.util.StringInputStream; - -/** - * @author Emmanuel Venisse - * @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $ - */ -public class SinkFactory -{ - private String outputDirectory; - - private String siteDirectory; - - private SiteRenderer siteRenderer; - - private InputStream siteDescriptor; - - private String flavour; - - public void setOutputDirectory( String outputDirectory ) - { - this.outputDirectory = outputDirectory; - } - - public void setSiteRenderer( SiteRenderer siteRenderer ) - { - this.siteRenderer = siteRenderer; - } - - public void setSiteDirectory( String siteDirectory ) - { - this.siteDirectory = siteDirectory; - } - - public void setFlavour( String flavour ) - { - this.flavour = flavour; - } - - public void setSiteDescriptor( InputStream siteDescriptor ) - { - this.siteDescriptor = siteDescriptor; - } - - public Sink getSink( String outputFileName ) - throws Exception - { - InputStream descriptor = siteDescriptor; - if ( descriptor == null ) - { - descriptor = new StringInputStream( "" ); - } - - return siteRenderer.createSink( new File( siteDirectory ), outputFileName, outputDirectory, - descriptor, flavour ); - } -} +package org.apache.maven.reporting.sink; + +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.io.File; +import java.io.InputStream; + +import org.codehaus.doxia.sink.Sink; +import org.codehaus.doxia.site.renderer.SiteRenderer; +import org.codehaus.plexus.util.StringInputStream; + +/** + * @author Emmanuel Venisse + * @version $Id: MavenReport.java 163376 2005-02-23 00:06:06Z brett $ + */ +public class SinkFactory +{ + private String outputDirectory; + + private String siteDirectory; + + private SiteRenderer siteRenderer; + + private InputStream siteDescriptor; + + private String flavour; + + public void setOutputDirectory( String outputDirectory ) + { + this.outputDirectory = outputDirectory; + } + + public void setSiteRenderer( SiteRenderer siteRenderer ) + { + this.siteRenderer = siteRenderer; + } + + public void setSiteDirectory( String siteDirectory ) + { + this.siteDirectory = siteDirectory; + } + + public void setFlavour( String flavour ) + { + this.flavour = flavour; + } + + public void setSiteDescriptor( InputStream siteDescriptor ) + { + this.siteDescriptor = siteDescriptor; + } + + public Sink getSink( String outputFileName ) + throws Exception + { + InputStream descriptor = siteDescriptor; + if ( descriptor == null ) + { + descriptor = new StringInputStream( "" ); + } + + return siteRenderer.createSink( new File( siteDirectory ), outputFileName, outputDirectory, + descriptor, flavour ); + } +} diff --git a/maven-reporting/pom.xml b/maven-reporting/pom.xml index 7a0ece0a7f..44e7d52828 100644 --- a/maven-reporting/pom.xml +++ b/maven-reporting/pom.xml @@ -1,17 +1,17 @@ - - 4.0.0 - - maven - org.apache.maven - 2.0-beta-1-SNAPSHOT - - org.apache.maven.reporting - maven-reporting - pom - Maven Reporting - 2005 - - maven-reporting-api - maven-reporting-impl - - + + 4.0.0 + + maven + org.apache.maven + 2.0-beta-1-SNAPSHOT + + org.apache.maven.reporting + maven-reporting + pom + Maven Reporting + 2005 + + maven-reporting-api + maven-reporting-impl + +