Author: vsiveton
Date: Mon Sep 24 05:32:42 2007
New Revision: 578791

URL: http://svn.apache.org/viewvc?rev=578791&view=rev
Log:
o first import of a linkcheck report
o added a maven report
o added documentation
o TODO: 
- add test cases
- execute the report in the post-site phase

Added:
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/   (with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/pom.xml   (with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
   (with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
   (with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/index.apt   
(with props)
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/limitations.apt 
  (with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/usage.apt   
(with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/resources/
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/resources/images/
    
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/resources/images/sample.png
   (with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/site.xml   
(with props)
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/test/
    maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/test/java/

Propchange: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Sep 24 05:32:42 2007
@@ -0,0 +1,7 @@
+target
+.classpath
+.project
+maven-pdf-plugin.iml
+maven-pdf-plugin.ipr
+maven-pdf-plugin.iws
+.settings

Added: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/pom.xml?rev=578791&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-linkcheck-plugin/pom.xml (added)
+++ maven/sandbox/trunk/plugins/maven-linkcheck-plugin/pom.xml Mon Sep 24 
05:32:42 2007
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.plugins</groupId>
+    <artifactId>maven-plugins</artifactId>
+    <version>8</version>
+  </parent>
+
+  <prerequisites>
+    <maven>2.0.4</maven>
+  </prerequisites>
+
+  <artifactId>maven-linkcheck-plugin</artifactId>
+  <packaging>maven-plugin</packaging>
+  <name>Maven Linkcheck Plugin</name>
+  <version>1.0-SNAPSHOT</version>
+
+  <developers>
+    <developer>
+      <id>vsiveton</id>
+      <name>Vincent Siveton</name>
+      <email>[EMAIL PROTECTED]</email>
+      <organization>Apache Software Foundation</organization>
+      <roles>
+          <role>Java Developer</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0.4</version>
+      <exclusions>
+        <!-- Using org.codehaus.plexus:plexus-utils instead of -->
+        <exclusion>
+          <groupId>plexus</groupId>
+          <artifactId>plexus-utils</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.reporting</groupId>
+      <artifactId>maven-reporting-impl</artifactId>
+      <version>2.0.4</version>
+      <exclusions>
+        <!-- Using org.codehaus.plexus:plexus-utils instead of -->
+        <exclusion>
+          <groupId>plexus</groupId>
+          <artifactId>plexus-utils</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.doxia</groupId>
+      <artifactId>doxia-linkcheck</artifactId>
+      <version>1.0-beta-1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.4.5</version>
+    </dependency>
+    <!-- test dependencies -->
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-plugin-testing-harness</artifactId>
+      <version>1.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
\ No newline at end of file

Propchange: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java?rev=578791&view=auto
==============================================================================
--- 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
 (added)
+++ 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
 Mon Sep 24 05:32:42 2007
@@ -0,0 +1,521 @@
+package org.apache.maven.plugins.linkcheck;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.maven.doxia.linkcheck.LinkCheck;
+import org.apache.maven.doxia.linkcheck.model.LinkcheckFile;
+import org.apache.maven.doxia.linkcheck.model.LinkcheckFileResult;
+import org.apache.maven.doxia.linkcheck.model.LinkcheckModel;
+import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.AbstractMavenReportRenderer;
+import org.apache.maven.reporting.MavenReportException;
+import org.codehaus.plexus.i18n.I18N;
+
+/**
+ * Generates a link check report.
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Siveton</a>
+ * @version $Id$
+ * @goal linkcheck
+ */
+public class LinkcheckReport
+    extends AbstractMavenReport
+{
+    /**
+     * The Maven Project.
+     *
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    protected MavenProject project;
+
+    /**
+     * The settings offline paramater.
+     *
+     * @parameter expression="${settings.offline}"
+     * @required
+     * @readonly
+     */
+    private boolean offline;
+
+    /**
+     * Report output directory.
+     *
+     * @parameter expression="${project.reporting.outputDirectory}"
+     * @required
+     */
+    protected File outputDirectory;
+
+    /**
+     * The location of the linkcheck cache.
+     *
+     * @parameter 
expression="${project.build.directory}/linkcheck/linkcheck.cache"
+     * @required
+     */
+    private String linkcheckCache;
+
+    /**
+     * The location of the linkcheck report.
+     *
+     * @parameter 
expression="${project.build.directory}/linkcheck/linkcheck.xml"
+     * @required
+     */
+    private String linkcheckOutput;
+
+    /**
+     * The current report level. Defaults to [EMAIL PROTECTED] 
LinkCheckResult#WARNING}.
+     *
+     * @parameter default-value="2"
+     */
+    protected int reportLevel;
+
+    /**
+     * The HTTP method to use. Currently supported are "GET" and "HEAD".
+     * <dl>
+     * <dt>HTTP GET</dt>
+     * <dd>
+     * The HTTP GET method is defined in section 9.3 of
+     * <a HREF="http://www.ietf.org/rfc/rfc2616.txt";>RFC2616</a>:
+     * <blockquote>
+     * The GET method means retrieve whatever information (in the form of an
+     * entity) is identified by the Request-URI.
+     * </blockquote>
+     * </dd>
+     * <dt>HTTP HEAD</dt>
+     * <dd>
+     * The HTTP HEAD method is defined in section 9.4 of
+     * <a HREF="http://www.ietf.org/rfc/rfc2616.txt";>RFC2616</a>:
+     * <blockquote>
+     * The HEAD method is identical to GET except that the server MUST NOT
+     * return a message-body in the response.
+     * </blockquote>
+     * </dd>
+     * </dl>
+     *
+     * @parameter default-value="head"
+     */
+    protected String httpMethod;
+
+    /**
+     * The list of links to exclude.
+     *
+     * @parameter
+     */
+    protected String[] exludedLinks;
+
+    /**
+     * Doxia Site Renderer.
+     *
+     * @component
+     */
+    protected Renderer siteRenderer;
+
+    /**
+     * Internationalization.
+     *
+     * @component
+     */
+    protected I18N i18n;
+
+    /**
+     * @see 
org.apache.maven.reporting.AbstractMavenReport#getDescription(java.util.Locale)
+     */
+    public String getDescription( Locale locale )
+    {
+        return i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.description" );
+    }
+
+    /**
+     * @see 
org.apache.maven.reporting.AbstractMavenReport#getName(java.util.Locale)
+     */
+    public String getName( Locale locale )
+    {
+        return i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.name" );
+    }
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#getOutputDirectory()
+     */
+    protected String getOutputDirectory()
+    {
+        return outputDirectory.getAbsolutePath();
+    }
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#getOutputName()
+     */
+    public String getOutputName()
+    {
+        return "linkcheck";
+    }
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#getProject()
+     */
+    protected MavenProject getProject()
+    {
+        return project;
+    }
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#getSiteRenderer()
+     */
+    protected Renderer getSiteRenderer()
+    {
+        return siteRenderer;
+    }
+
+    /**
+     * @see org.apache.maven.reporting.AbstractMavenReport#canGenerateReport()
+     */
+    public boolean canGenerateReport()
+    {
+        return outputDirectory.exists();
+    }
+
+    /**
+     * @see 
org.apache.maven.reporting.AbstractMavenReport#executeReport(java.util.Locale)
+     */
+    protected void executeReport( Locale locale )
+        throws MavenReportException
+    {
+        if ( !canGenerateReport() )
+        {
+            return;
+        }
+
+        // Wrap linkcheck
+        LinkCheck lc = new LinkCheck();
+        lc.setOnline( !offline );
+        lc.setBasedir( outputDirectory );
+        lc.setReportOutput( new File( linkcheckOutput ) );
+        lc.setLinkCheckCache( new File( linkcheckCache ) );
+        lc.setExcludedLinks( exludedLinks );
+        lc.setHttpMethod( httpMethod );
+        lc.setReportLevel( reportLevel );
+
+        lc.doExecute();
+
+        // Render report
+        LinkcheckRenderer r = new LinkcheckRenderer( getSink(), i18n, locale, 
lc.getModel() );
+        r.render();
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private static class LinkcheckRenderer
+        extends AbstractMavenReportRenderer
+    {
+        private I18N i18n;
+
+        private Locale locale;
+
+        private LinkcheckModel linkcheckModel;
+
+        LinkcheckRenderer( Sink sink, I18N i18n, Locale locale, LinkcheckModel 
linkcheckModel )
+        {
+            super( sink );
+
+            this.i18n = i18n;
+
+            this.locale = locale;
+
+            this.linkcheckModel = linkcheckModel;
+        }
+
+        /**
+         * @see 
org.apache.maven.reporting.AbstractMavenReportRenderer#getTitle()
+         */
+        public String getTitle()
+        {
+            return i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.title" );
+        }
+
+        /**
+         * @see 
org.apache.maven.reporting.AbstractMavenReportRenderer#renderBody()
+         */
+        public void renderBody()
+        {
+            if ( linkcheckModel == null )
+            {
+                startSection( getTitle() );
+
+                paragraph( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.empty" ) );
+
+                endSection();
+
+                return;
+            }
+
+            // Overview
+            startSection( getTitle() );
+
+            paragraph(  i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.overview" ) );
+
+            //Statistics
+            generateSummarySection();
+
+            //Statistics
+            generateDetailsSection();
+
+            endSection();
+        }
+
+        private void generateSummarySection()
+        {
+            // Calculus
+            List linkcheckFiles = linkcheckModel.getFiles();
+
+            int totalFiles = linkcheckFiles.size();
+
+            int totalLinks = 0;
+            int totalValidLinks = 0;
+            int totalErrorLinks = 0;
+            int totalWarningLinks = 0;
+            for ( Iterator it = linkcheckFiles.iterator(); it.hasNext(); )
+            {
+                LinkcheckFile linkcheckFile = (LinkcheckFile) it.next();
+
+                totalLinks += linkcheckFile.getNumberOfLinks();
+                totalValidLinks += linkcheckFile.getNumberOfLinks( 
LinkcheckFileResult.VALID_LEVEL );
+                totalErrorLinks += linkcheckFile.getNumberOfLinks( 
LinkcheckFileResult.ERROR_LEVEL );
+                totalWarningLinks += linkcheckFile.getNumberOfLinks( 
LinkcheckFileResult.WARNING_LEVEL );
+            }
+
+            startSection( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.summary" ) );
+
+            paragraph(  i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.summary.overview" ) );
+
+            startTable();
+
+            //Header
+            generateTableHeader( false );
+
+            //Content
+            sink.tableRow();
+
+            sink.tableCell();
+            sink.bold();
+            sink.text( totalFiles + "" );
+            sink.bold_();
+            sink.tableCell_();
+            sink.tableCell();
+            sink.bold();
+            sink.text( totalLinks + "" );
+            sink.bold_();
+            sink.tableCell_();
+            sink.tableCell();
+            sink.bold();
+            sink.text( String.valueOf( totalValidLinks ) );
+            sink.bold_();
+            sink.tableCell_();
+            sink.tableCell();
+            sink.bold();
+            sink.text( String.valueOf( totalWarningLinks ) );
+            sink.bold_();
+            sink.tableCell_();
+            sink.tableCell();
+            sink.bold();
+            sink.text( String.valueOf( totalErrorLinks ) );
+            sink.bold_();
+            sink.tableCell_();
+
+            sink.tableRow_();
+
+            endTable();
+
+            endSection();
+        }
+
+        private void generateDetailsSection()
+        {
+            startSection( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.detail" ) );
+
+            paragraph(  i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.detail.overview" ) );
+
+            startTable();
+
+            //Header
+            generateTableHeader( true );
+
+            // Content
+            List linkcheckFiles = linkcheckModel.getFiles();
+            for ( Iterator it = linkcheckFiles.iterator(); it.hasNext(); )
+            {
+                LinkcheckFile linkcheckFile = (LinkcheckFile) it.next();
+
+                sink.tableRow();
+
+                sink.tableCell( "15px" );
+                if ( linkcheckFile.getUnsuccessful() == 0 )
+                {
+                    iconValid();
+                }
+                else
+                {
+                    iconError();
+                }
+                sink.tableCell_();
+
+                tableCell( createLinkPatternedText( 
linkcheckFile.getRelativePath(), "./"
+                    + linkcheckFile.getRelativePath() ) );
+                tableCell( String.valueOf( linkcheckFile.getNumberOfLinks() ) 
);
+                tableCell( String.valueOf( linkcheckFile.getNumberOfLinks( 
LinkcheckFileResult.VALID_LEVEL ) ) );
+                tableCell( String.valueOf( linkcheckFile.getNumberOfLinks( 
LinkcheckFileResult.WARNING_LEVEL ) ) );
+                tableCell( String.valueOf( linkcheckFile.getNumberOfLinks( 
LinkcheckFileResult.ERROR_LEVEL ) ) );
+
+                sink.tableRow_();
+
+                // Detail error
+                if ( linkcheckFile.getUnsuccessful() != 0 )
+                {
+                    sink.tableRow();
+
+                    sink.tableCell( "15px" );
+                    sink.text( "" );
+                    sink.tableCell_();
+
+                    sink.rawText( "<td colspan=\"5\">" );
+
+                    startTable();
+
+                    for ( Iterator it2 = 
linkcheckFile.getResults().iterator(); it2.hasNext(); )
+                    {
+                        LinkcheckFileResult linkcheckFileResult = 
(LinkcheckFileResult) it2.next();
+
+                        if ( linkcheckFileResult.getStatusLevel() == 
LinkcheckFileResult.VALID_LEVEL )
+                        {
+                            continue;
+                        }
+
+                        sink.tableRow();
+
+                        sink.tableCell( "15px" );
+                        if ( linkcheckFileResult.getStatusLevel() == 
LinkcheckFileResult.WARNING_LEVEL )
+                        {
+                            iconWarning();
+                        }
+                        else if ( linkcheckFileResult.getStatusLevel() == 
LinkcheckFileResult.ERROR_LEVEL )
+                        {
+                            iconError();
+                        }
+                        sink.tableCell_();
+
+                        sink.tableCell();
+                        sink.italic();
+                        sink.link( linkcheckFileResult.getTarget() );
+                        sink.text( linkcheckFileResult.getTarget() );
+                        sink.link_();
+                        sink.text( ": " );
+                        sink.text( linkcheckFileResult.getErrorMessage() );
+                        sink.italic_();
+                        sink.tableCell_();
+
+                        sink.tableRow_();
+                    }
+
+                    endTable();
+
+                    sink.tableCell_();
+
+                    sink.tableRow_();
+                }
+            }
+
+            sink.tableRow();
+
+            endTable();
+
+            endSection();
+        }
+
+        private void generateTableHeader( boolean withImage )
+        {
+            sink.tableRow();
+            if ( withImage )
+            {
+                sink.rawText( "<th rowspan=\"2\">" );
+                sink.text( "" );
+                sink.tableHeaderCell_();
+            }
+            sink.rawText( "<th rowspan=\"2\">" );
+            sink.text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.documents" ) );
+            sink.tableHeaderCell_();
+            sink.rawText( "<th colspan=\"4\">" );
+            sink.text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.links" ) );
+            sink.tableHeaderCell_();
+            sink.tableRow_();
+
+            sink.tableRow();
+            tableHeaderCell( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.table.totalLinks" ) );
+            sink.tableHeaderCell();
+            iconValid();
+            sink.tableHeaderCell_();
+            sink.tableHeaderCell();
+            iconError();
+            sink.tableHeaderCell_();
+            sink.tableHeaderCell();
+            iconWarning();
+            sink.tableHeaderCell_();
+            sink.tableRow_();
+        }
+
+        private void iconError()
+        {
+            sink.figure();
+            sink.figureCaption();
+            sink.text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.icon.error" ) );
+            sink.figureCaption_();
+            sink.figureGraphics( "images/icon_error_sml.gif" );
+            sink.figure_();
+        }
+
+        private void iconValid()
+        {
+            sink.figure();
+            sink.figureCaption();
+            sink.text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.icon.valid" ) );
+            sink.figureCaption_();
+            sink.figureGraphics( "images/icon_success_sml.gif" );
+            sink.figure_();
+        }
+
+        private void iconWarning()
+        {
+            sink.figure();
+            sink.figureCaption();
+            sink.text( i18n.getString( "linkcheck-report", locale, 
"report.linkcheck.icon.warning" ) );
+            sink.figureCaption_();
+            sink.figureGraphics( "images/icon_warning_sml.gif" );
+            sink.figure_();
+        }
+    }
+}

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties?rev=578791&view=auto
==============================================================================
--- 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
 (added)
+++ 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
 Mon Sep 24 05:32:42 2007
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+report.linkcheck.name=Linkcheck report
+report.linkcheck.description=This is a link to the link check report.
+report.linkcheck.title=Linkcheck report
+report.linkcheck.empty=The linkcheck tool has not generated report.
+report.linkcheck.overview=The Link Check tool will search the generated site, 
testing each link it finds. The report presents the status of each link tested.
+report.linkcheck.summary=Summary
+report.linkcheck.summary.overview=The following table presents the summary of 
all checked documents.
+report.linkcheck.table.documents=Documents
+report.linkcheck.table.links=Links
+report.linkcheck.table.totalLinks=Total
+report.linkcheck.table.validLinks=Valid
+report.linkcheck.table.errorLinks=Error
+report.linkcheck.table.warningLinks=Warning
+report.linkcheck.detail=Detail
+report.linkcheck.detail.overview=The following table presents the detail of 
all checked documents.
+report.linkcheck.icon.error=error
+report.linkcheck.icon.valid=valid
+report.linkcheck.icon.warning=warning
\ No newline at end of file

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/main/resources/linkcheck-report.properties
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/index.apt
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/index.apt?rev=578791&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/index.apt 
(added)
+++ maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/index.apt 
Mon Sep 24 05:32:42 2007
@@ -0,0 +1,42 @@
+ ------
+ Maven Linkcheck Plugin
+ ------
+ Vincent Siveton
+ ------
+ 24 September 2007
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Overview
+
+  This plug-in allows you to generate a linkcheck report of your project's 
documentation.
+
+* Goals Overview
+
+  The Linkcheck Plugin only has one goal.
+
+  * {{{./linkcheck-mojo.html}linkcheck:linkcheck}} Generates a Linkcheck 
report.
+
+* Usage
+
+  Instructions on the basic usage of the Linkcheck Plugin can be found
+  {{{./usage.html}here}}.

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/limitations.apt
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/limitations.apt?rev=578791&view=auto
==============================================================================
--- 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/limitations.apt 
(added)
+++ 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/limitations.apt 
Mon Sep 24 05:32:42 2007
@@ -0,0 +1,37 @@
+ ------
+ Known Bugs and Limitations
+ ------
+ Vincent Siveton
+ ------
+ 24 September 2007
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Known Bugs and Limitations
+
+  Just a brief selection...
+
+* Current limitations
+
+  * The Linkcheck report should run in the post-site phase.
+
+  * Running the Linkcheck plugin automatically during a build doesn't work.
\ No newline at end of file

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/limitations.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/limitations.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/usage.apt
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/usage.apt?rev=578791&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/usage.apt 
(added)
+++ maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/usage.apt 
Mon Sep 24 05:32:42 2007
@@ -0,0 +1,90 @@
+ ------
+ Usage
+ ------
+ Vincent Siveton
+ ------
+ 24 September 2007
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements.  See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership.  The ASF licenses this file
+~~ to you 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+Using the Linkcheck plugin
+
+  The Maven Linkcheck Plugin allows you generate a link check report of your 
documentation.
+
+* Using the Linkcheck plugin from the command-line
+
+  The Linkcheck plugin can be called to execute from the command-line without 
any
+  additional configurations. Like the other plugins, to run the Linkcheck 
plugin,
+  you use:
+
++-----
+<project>
+  [...]
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-linkcheck-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+  [...]
+</project>
++-----
+
++-----
+  mvn site
++-----
+
+ Here is a simple report:
+
+[./images/sample.png] Sample report
+
+~~
+~~ * Running the Linkcheck plugin automatically during a build
+~~
+~~   The Linkcheck plugin can be put into a project's pom.xml so that it gets 
executed
+~~   everytime the project is built.  Below is a sample pom.xml for running the
+~~   Linkcheck plugin in the <<<post-site>>> phase everytime the project is 
built:
+~~
+~~ +-----
+~~ <project>
+~~   [...]
+~~   <build>
+~~     <plugins>
+~~       <plugin>
+~~         <artifactId>maven-inkcheck-plugin</artifactId>
+~~         <executions>
+~~           <execution>
+~~             <id>site-linkcheck</id>
+~~             <phase>post-site</phase>
+~~             <goals>
+~~               <goal>linkcheck</goal>
+~~             </goals>
+~~           </execution>
+~~         </executions>
+~~       </plugin>
+~~     </plugins>
+~~   </build>
+~~   [...]
+~~ </project>
+~~ +-----
\ No newline at end of file

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/usage.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/apt/usage.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/resources/images/sample.png
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/resources/images/sample.png?rev=578791&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/resources/images/sample.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/site.xml?rev=578791&view=auto
==============================================================================
--- maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/site.xml (added)
+++ maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/site.xml Mon 
Sep 24 05:32:42 2007
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
+ -->
+
+<project name="Maven Linkcheck plugin">
+
+  <body>
+
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="Goals" href="linkcheck-mojo.html"/>
+      <item name="Usage" href="usage.html"/>
+      <item name="Limitations" href="limitations.html"/>
+    </menu>
+
+  </body>
+</project>

Propchange: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/plugins/maven-linkcheck-plugin/src/site/site.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"


Reply via email to