You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2009/09/10 14:28:41 UTC
svn commit: r813404 - in /maven/plugins/trunk/maven-javadoc-plugin: ./
src/it/MJAVADOC-259/ src/it/MJAVADOC-259/src/ src/it/MJAVADOC-259/src/main/
src/it/MJAVADOC-259/src/main/java/ src/it/MJAVADOC-259/src/main/java/com/
src/it/MJAVADOC-259/src/main/ja...
Author: vsiveton
Date: Thu Sep 10 12:28:40 2009
New Revision: 813404
URL: http://svn.apache.org/viewvc?rev=813404&view=rev
Log:
MJAVADOC-259: Resource copying from javadoc dir is incomplete
o allow the copy of src/main/javadoc/resources to apidocs/resources
o updated doc
o added an IT
Added:
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/goals.txt (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/pom.xml (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/App.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/doc-files/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/doc-files/maven-feather.png (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/resources/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/resources/maven-feather.png (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.jpg (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.psd (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.gif (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.psd (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/stylesheet.css (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/AppTest.java (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/verify.bsh
maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/
maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/
maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.gif (with props)
maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.psd (with props)
Modified:
maven/plugins/trunk/maven-javadoc-plugin/pom.xml
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt.vm
Modified: maven/plugins/trunk/maven-javadoc-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/pom.xml?rev=813404&r1=813403&r2=813404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/pom.xml Thu Sep 10 12:28:40 2009
@@ -316,8 +316,8 @@
</executions>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<property>
@@ -370,6 +370,7 @@
<pomInclude>**/MJAVADOC-97/pom.xml</pomInclude>
<pomInclude>**/MJAVADOC-181/pom.xml</pomInclude>
<pomInclude>**/MJAVADOC-257/pom.xml</pomInclude>
+ <pomInclude>**/MJAVADOC-259/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
@@ -481,6 +482,6 @@
<sitePluginVersion>3.0-beta-1-SNAPSHOT</sitePluginVersion>
<projectInfoReportsPluginVersion>2.2-SNAPSHOT</projectInfoReportsPluginVersion>
</properties>
- </profile>
+ </profile>
</profiles>
</project>
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/goals.txt?rev=813404&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/goals.txt (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/goals.txt Thu Sep 10 12:28:40 2009
@@ -0,0 +1 @@
+clean site
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/goals.txt
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/pom.xml?rev=813404&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/pom.xml (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/pom.xml Thu Sep 10 12:28:40 2009
@@ -0,0 +1,82 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.maven-javadoc-plugin.it</groupId>
+ <artifactId>myapp</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>myapp</name>
+ <url>http://maven.apache.org</url>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>@sitePluginVersion@</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>@projectInfoReportsPluginVersion@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
+ <docfilessubdirs>true</docfilessubdirs>
+ <noqualifier>all</noqualifier>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>@projectInfoReportsPluginVersion@</version>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/App.java?rev=813404&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/App.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/App.java Thu Sep 10 12:28:40 2009
@@ -0,0 +1,14 @@
+package com.mycompany.myapp;
+
+/**
+ * Hello world!
+ *
+ * <img src="doc-files/maven-feather.png" alt="Maven"/>
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/App.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/java/com/mycompany/myapp/App.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/doc-files/maven-feather.png
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/doc-files/maven-feather.png?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/doc-files/maven-feather.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/resources/maven-feather.png
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/resources/maven-feather.png?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/com/mycompany/myapp/resources/maven-feather.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.jpg
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.jpg?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.jpg
------------------------------------------------------------------------------
svn:mime-type = image/jpeg
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.psd
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.psd?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/bg.psd
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.gif
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.gif?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.psd
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.psd?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/resources/inherit.psd
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/stylesheet.css?rev=813404&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/stylesheet.css (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/stylesheet.css Thu Sep 10 12:28:40 2009
@@ -0,0 +1,89 @@
+/* I don't know why these two class declarations are needed but they are */
+body {
+ background: #f8f4e8 url( resources/bg.jpg );
+ color: #4b2500;
+ font-family: serif;
+}
+
+.TableRowColor,
+.NavBarCell1 {
+ background: inherit
+}
+
+h1, h2, h3 {
+ background: rgba(255,239,0,0.41) url( resources/bg-dark.jpg );
+ padding: 2px;
+}
+
+.NavBarCell1Rev,
+.TableHeadingColor {
+ background: rgba(255,0,0,0.16) url( resources/bg-dark.jpg );
+ padding: 2px;
+}
+
+
+h4, h5,
+h3 + pre,
+.copyright,
+.NavBarCell2,
+.NavBarCell3,
+.TableSubHeadingColor {
+ background: rgba(247,248,255,0.89) url( resources/bg-light.jpg );
+ font-variant: normal;
+}
+
+.note {
+ background: #d1dcf2 url( resources/bg-beta.jpg );
+ font: italic 100% sans-serif;
+}
+
+.note {
+ margin-top: 10px;
+}
+
+table {
+ border-style: none;
+}
+
+tr.TableRowColor,
+tr.TableRowColor td,
+tr.TableRowColor th {
+ border-left-style: none;
+ vertical-align: baseline;
+ border-right-style: none;
+ border-color: #ba6009;
+ border-width: thin;
+ border-style: none;
+ border-bottom-style: solid;
+}
+
+tr.TableRowColor td:first-child {
+ border-right-style: solid;
+}
+
+hr {
+ border-color: transparent;
+ background-color: transparent;
+ border-style: solid;
+}
+
+.new {
+ background: #ffff88 url( resources/bg-highlight.jpg );
+}
+
+h3 {
+ padding: 5px;
+}
+h3 + pre {
+ border: 1px #439417;
+ padding: 5px;
+}
+
+.example {
+ padding-left: 4em;
+}
+
+p.copyright {
+ font-style: italic;
+ text-align: right;
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/stylesheet.css
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/main/javadoc/stylesheet.css
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/AppTest.java?rev=813404&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/AppTest.java (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/AppTest.java Thu Sep 10 12:28:40 2009
@@ -0,0 +1,38 @@
+package com.mycompany.myapp;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/AppTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/src/test/java/com/mycompany/myapp/AppTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/verify.bsh?rev=813404&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/verify.bsh (added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-259/verify.bsh Thu Sep 10 12:28:40 2009
@@ -0,0 +1,74 @@
+
+/*
+ * 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.*;
+
+boolean result = true;
+
+try
+{
+ // Generated files checks
+ File apidocs = new File( basedir, "target/site/apidocs" );
+ if ( !apidocs.isDirectory() )
+ {
+ System.err.println( apidocs.getAbsolutePath() + " dir is missing or a directory." );
+ return false;
+ }
+
+ File resourcesDir = new File( apidocs, "resources" );
+ if ( !resourcesDir.isDirectory() )
+ {
+ System.err.println( resourcesDir.getAbsolutePath() + " dir is missing or a directory." );
+ return false;
+ }
+
+ File inheritSrc = new File( basedir, "src/main/javadoc/resources/inherit.gif" );
+ File inheritTarget = new File( resourcesDir, "inherit.gif" );
+ if ( !inheritTarget.isFile() )
+ {
+ System.err.println( inheritTarget.getAbsolutePath() + " file is missing or a file." );
+ return false;
+ }
+ if ( inheritSrc.length() != inheritTarget.length() )
+ {
+ System.err.println( "inherit.gif seems not copied." );
+ return false;
+ }
+
+ File docFiles = new File( apidocs, "com/mycompany/myapp/doc-files" );
+ if ( !docFiles.isDirectory() )
+ {
+ System.err.println( docFiles.getAbsolutePath() + " dir is missing or a directory." );
+ return false;
+ }
+ resourcesDir = new File( apidocs, "com/mycompany/myapp/resources" );
+ if ( resourcesDir.isDirectory() )
+ {
+ System.err.println( resourcesDir.getAbsolutePath() + " dir exists." );
+ return false;
+ }
+}
+catch( RuntimeException e )
+{
+ e.printStackTrace();
+ return false;
+}
+
+return result;
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java?rev=813404&r1=813403&r2=813404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java Thu Sep 10 12:28:40 2009
@@ -873,7 +873,9 @@
private String docencoding;
/**
- * Enables deep copying of "doc-files" directories.
+ * Enables deep copying of the <code>**/doc-files</code> directories and the specifc <code>resources</code>
+ * directory from the <code>javadocDirectory</code> directory (for instance,
+ * <code>src/main/javadoc/com/mycompany/myapp/doc-files</code> and <code>src/main/javadoc/resources</code>).
* <br/>
* See <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javadoc.html#docfilessubdirs">
* docfilessubdirs</a>.
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java?rev=813404&r1=813403&r2=813404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocUtil.java Thu Sep 10 12:28:40 2009
@@ -326,6 +326,11 @@
protected static void copyJavadocResources( File outputDirectory, File javadocDir, String excludedocfilessubdir )
throws IOException
{
+ if ( !javadocDir.isDirectory() )
+ {
+ return;
+ }
+
List excludes = new ArrayList();
excludes.addAll( Arrays.asList( FileUtils.getDefaultExcludes() ) );
@@ -340,34 +345,30 @@
}
}
- if ( javadocDir.exists() && javadocDir.isDirectory() )
- {
- List docFiles =
- FileUtils.getDirectoryNames( javadocDir, "**/doc-files", StringUtils.join( excludes.iterator(),
- "," ), false, true );
- for ( Iterator it = docFiles.iterator(); it.hasNext(); )
- {
- String docFile = (String) it.next();
-
- File docFileOutput = new File( outputDirectory, docFile );
- FileUtils.mkdir( docFileOutput.getAbsolutePath() );
- FileUtils.copyDirectoryStructure( new File( javadocDir, docFile ), docFileOutput );
- List files =
- FileUtils.getFileAndDirectoryNames( docFileOutput,
- StringUtils.join( excludes.iterator(), "," ), null, true,
- true, true, true );
- for ( Iterator it2 = files.iterator(); it2.hasNext(); )
- {
- File file = new File( it2.next().toString() );
+ List docFiles =
+ FileUtils.getDirectoryNames( javadocDir, "resources,**/doc-files",
+ StringUtils.join( excludes.iterator(), "," ), false, true );
+ for ( Iterator it = docFiles.iterator(); it.hasNext(); )
+ {
+ String docFile = (String) it.next();
+
+ File docFileOutput = new File( outputDirectory, docFile );
+ FileUtils.mkdir( docFileOutput.getAbsolutePath() );
+ FileUtils.copyDirectoryStructure( new File( javadocDir, docFile ), docFileOutput );
+ List files =
+ FileUtils.getFileAndDirectoryNames( docFileOutput, StringUtils.join( excludes.iterator(), "," ),
+ null, true, true, true, true );
+ for ( Iterator it2 = files.iterator(); it2.hasNext(); )
+ {
+ File file = new File( it2.next().toString() );
- if ( file.isDirectory() )
- {
- FileUtils.deleteDirectory( file );
- }
- else
- {
- file.delete();
- }
+ if ( file.isDirectory() )
+ {
+ FileUtils.deleteDirectory( file );
+ }
+ else
+ {
+ file.delete();
}
}
}
Modified: maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt.vm?rev=813404&r1=813403&r2=813404&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt.vm (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/site/apt/examples/javadoc-resources.apt.vm Thu Sep 10 12:28:40 2009
@@ -3,7 +3,7 @@
------
Vincent Siveton
------
- 2009-08-19
+ 2009-09-10
------
~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -37,21 +37,22 @@
yourproject
|-- src
- |-- main
- |-- java
- | |-- org
- | |-- apache
- | |-- myapp
- | `-- App.java
- | `-- package-info.java
- |-- javadoc
- `-- overview.html
- |-- org
- |-- apache
- |-- myapp
- `-- package.html
- |-- doc-files
- `-- app.png
+ |-- main
+ |-- java
+ | |-- org
+ | |-- apache
+ | |-- myapp
+ | `-- App.java
+ | `-- package-info.java
+ |-- javadoc
+ `-- overview.html
+ |-resources
+ |-- org
+ |-- apache
+ |-- myapp
+ `-- package.html
+ |-- doc-files
+ `-- app.png
+-----+
* Overview Comment File: <overview.html>
@@ -110,7 +111,7 @@
{{{http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#packagecomments}
How to Write Doc Comments for the Javadoc Tool, Package-Level Comments}}.
- Here is an example of a <package.html> file, located in <$\{basedir\}/src/main/javadoc/org/apache/test/package.html>:
+ Here is an example of a <package.html> file, located in <$\{basedir\}/src/main/javadoc/org/apache/myapp/package.html>:
+-----+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@@ -130,14 +131,14 @@
For more information, see {{{http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#packagecomment}
javadoc - The Java API Documentation Generator, Package Comment Files}}.
- Here is an example of a <package-info.java> file, located in <$\{basedir\}/src/main/java/org/apache/test/package-info.java>:
+ Here is an example of a <package-info.java> file, located in <$\{basedir\}/src/main/java/org/apache/myapp/package-info.java>:
+-----+
/**
* This is the core package for the application
* @since 1.0
*/
-package org.apache.test;
+package org.apache.myapp;
+-----+
* Miscellaneous Unprocessed Files: <doc-files>
@@ -148,10 +149,15 @@
javadoc - The Java API Documentation Generator, Miscellaneous Unprocessed Files}} and {{{http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#images}
How to Write Doc Comments for the Javadoc Tool, Including Images }}.
- Here is a sample javadoc comment to use images, located in <$\{basedir\}/src/main/javadoc/org/apache/test/doc-files> directory:
+ In addition to <doc-files> directories, since 2.6.1, the specific <src/main/javadoc/resources> directory will be
+ copied to the generated Javadoc resources directory (i.e. <apidocs/resources>). This is usefull when you want to
+ overwite default Javadoc tool resources, like the default <inherit.gif> to one with a transparent background
+ (See {{{../images/inherit.gif}GIF}} or {{{../images/inherit.psd}PSD}}).
+
+ Here is a sample javadoc comment to use <app.png> image, located in <$\{basedir\}/src/main/javadoc/org/apache/myapp/doc-files> directory:
+-----+
-package org.apache.test;
+package org.apache.myapp;
/**
* The main Class launches the application.
Added: maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.gif
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.gif?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.psd
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.psd?rev=813404&view=auto
==============================================================================
Binary file - no diff available.
Propchange: maven/plugins/trunk/maven-javadoc-plugin/src/site/resources/images/inherit.psd
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream