maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r399567 - in /maven/plugins/trunk/maven-javadoc-plugin/src: main/java/org/apache/maven/plugin/javadoc/ test/java/org/apache/maven/plugin/javadoc/ test/resources/unit/custom-configuration/ test/resources/unit/default-configuration/
Date Thu, 04 May 2006 06:22:04 GMT
Author: oching
Date: Wed May  3 23:22:01 2006
New Revision: 399567

URL: http://svn.apache.org/viewcvs?rev=399567&view=rev
Log:
PR: MJAVADOC-63

Created addtional tests for the plugin.

Added:
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml
Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java?rev=399567&r1=399566&r2=399567&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
Wed May  3 23:22:01 2006
@@ -134,8 +134,7 @@
         }
         return canGenerate;
     }
-
-
+    
     public String getCategoryName()
     {
         return CATEGORY_PROJECT_REPORTS;

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java?rev=399567&r1=399566&r2=399567&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocJarTest.java
Wed May  3 23:22:01 2006
@@ -89,6 +89,7 @@
         assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
 
     }
+      
 
     /**
      * Test when the specified destDir parameter has an invalid value

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java?rev=399567&r1=399566&r2=399567&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
Wed May  3 23:22:01 2006
@@ -336,6 +336,37 @@
 
     }
 
+    public void testExceptions()
+        throws Exception
+    {
+
+        try
+        {
+            File testPom =
+                new File( getBasedir(), "src/test/resources/unit/default-configuration/exception-test-plugin-config.xml"
);
+            JavadocReport mojo = (JavadocReport) lookupMojo( "javadoc", testPom );
+            mojo.execute();
+
+            fail( "Must throw exception." );
+
+        }
+        catch ( Exception e )
+        {
+            assertTrue( true );
+
+            try
+            {
+                FileUtils.deleteDirectory( new File( getBasedir(), "exception") );
+            }
+            catch( IOException ie )
+            {
+                
+            }
+        }
+
+    }
+
+
     protected void tearDown()
         throws Exception
     {

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml?rev=399567&r1=399566&r2=399567&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/custom-configuration/custom-configuration-plugin-config.xml
Wed May  3 23:22:01 2006
@@ -17,7 +17,7 @@
           <localRepository>${localRepository}</localRepository>
           <outputDirectory>${basedir}/target/test/unit/custom-configuration/target/site/apidocs</outputDirectory>
           <breakiterator>false</breakiterator>
-          <old>false</old>
+          <old>true</old>
           <show>private</show>
           <quiet>true</quiet>
           <verbose>false</verbose>
@@ -77,6 +77,8 @@
           </offlineLinks>
           <header>MAVEN JAVADOC PLUGIN TEST</header>
           <footer>MAVEN JAVADOC PLUGIN TEST FOOTER</footer>
+          <locale>en_US</locale>
+          <isOffline>true</isOffline>
         </configuration>
       </plugin>
     </plugins>

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml?rev=399567&r1=399566&r2=399567&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
Wed May  3 23:22:01 2006
@@ -36,8 +36,12 @@
           <serialwarn>false</serialwarn>
           <splitindex>false</splitindex>
           <stylesheet>java</stylesheet>
-          <groups/>
-          <tags/>
+          <groups>
+            <group/>
+          </groups>
+          <tags>
+            <tag/>
+          </tags>           
           <use>true</use>
           <version>true</version>
           <windowtitle>Maven Javadoc Plugin Default configuration Test 1.0-SNAPSHOT
API</windowtitle>

Added: maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml?rev=399567&view=auto
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml
(added)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/resources/unit/default-configuration/exception-test-plugin-config.xml
Wed May  3 23:22:01 2006
@@ -0,0 +1,52 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>exception.test</groupId>
+  <artifactId>exception-test</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <inceptionYear>2006</inceptionYear>
+  <name>Maven Javadoc Plugin Exception Test</name>
+  <url>http://maven.apache.org</url>    
+  <build>
+    <finalName>exception-test</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <project implementation="org.apache.maven.plugin.javadoc.stubs.ExceptionTestMavenProjectStub"/>
+          <localRepository>${localRepository}</localRepository>
+          <outputDirectory>exception/..  +  /target/test/unit/default-configuration/target/site/apidocs</outputDirectory>
+          <breakiterator>false</breakiterator>
+          <old>false</old>
+          <show>protected</show>
+          <quiet>false</quiet>
+          <verbose>false</verbose>
+          <author>true</author>
+          <charset>ISO-8859-1</charset>
+          <docfilessubdirs>false</docfilessubdirs>
+          <linksource>false</linksource>
+          <nocomment>false</nocomment>
+          <nodeprecated>false</nodeprecated>
+          <nodeprecatedlist>false</nodeprecatedlist>
+          <nohelp>false</nohelp>
+          <noindex>false</noindex>
+          <nonavbar>false</nonavbar>
+          <nosince>false</nosince>
+          <notree>false</notree>
+          <serialwarn>false</serialwarn>
+          <splitindex>false</splitindex>
+          <stylesheet>java</stylesheet>
+          <groups/>
+          <tags/>
+          <use>true</use>
+          <version>true</version>
+          <windowtitle>Maven Javadoc Plugin Exception Test 1.0-SNAPSHOT API</windowtitle>
+          <links>
+             <param>http://java.sun.com/j2se/1.4.2/docs/api</param>
+          </links>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>



Mime
View raw message