You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by oc...@apache.org on 2006/04/27 04:56:48 UTC
svn commit: r397371 [1/3] - in /maven/plugins/trunk/maven-jxr-plugin: ./
src/test/ src/test/java/ src/test/java/org/ src/test/java/org/apache/
src/test/java/org/apache/maven/ src/test/java/org/apache/maven/plugin/
src/test/java/org/apache/maven/plugin/...
Author: oching
Date: Wed Apr 26 19:56:41 2006
New Revision: 397371
URL: http://svn.apache.org/viewcvs?rev=397371&view=rev
Log:
PR: MJXR-10
Created test for jxr mojos using the test harness. Created project stub classes and sample projects used for testing.
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrTestReportTest.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule1MavenProjectStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule2MavenProjectStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateTestMavenProjectStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultArtifactHandlerStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultConfigurationMavenProjectStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/JxrPluginArtifactStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocDirMavenProjectStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocLinkConfigurationMavenProjectStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/TestSourceDirMavenProjectStub.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate-test-plugin-config.xml
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1App.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1AppSample.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate-test-plugin-config.xml
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2App.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2AppSample.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/App.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/AppSample.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-frame.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-noframe.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/constant-values.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/App.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/AppSample.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/class-use/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/class-use/App.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/class-use/AppSample.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/package-frame.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/package-summary.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/package-tree.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/def/configuration/package-use.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/deprecated-list.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/help-doc.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/index-all.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/index.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/overview-tree.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/package-list
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/packages.html
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/resources/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/resources/inherit.gif (with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/stylesheet.css
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadocdir-test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadocdir-test/nojavadocdir/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadocdir-test/nojavadocdir-test-plugin-config.xml
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadocdir-test/nojavadocdir/test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadocdir-test/nojavadocdir/test/App.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadocdir-test/nojavadocdir/test/AppSample.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink-configuration-plugin-config.xml
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink/configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink/configuration/App.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink/configuration/AppSample.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink/configuration/sample/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink/configuration/sample/Sample.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/main/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/main/java/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/main/java/testsourcedir/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/main/java/testsourcedir/test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/main/java/testsourcedir/test/App.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/main/java/testsourcedir/test/AppSample.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/test/java/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/test/java/testsourcedir/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/test/java/testsourcedir/test/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/test/java/testsourcedir/test/AppSampleTest.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/src/test/java/testsourcedir/test/AppTest.java
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/testsourcedir-test/testsourcedir-test-plugin-config.xml
Modified:
maven/plugins/trunk/maven-jxr-plugin/pom.xml
Modified: maven/plugins/trunk/maven-jxr-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/pom.xml?rev=397371&r1=397370&r2=397371&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-jxr-plugin/pom.xml Wed Apr 26 19:56:41 2006
@@ -20,6 +20,17 @@
<timezone>+1</timezone>
</developer>
</developers>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.1.3</version>
+ <configuration>
+ <childDelegation>false</childDelegation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<dependencies>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
@@ -35,6 +46,11 @@
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>2.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,297 @@
+package org.apache.maven.plugin.jxr;
+
+/*
+ * Copyright 2005-2006 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.testing.AbstractMojoTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class JxrReportTest
+ extends AbstractMojoTestCase
+{
+
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+ }
+
+ /**
+ * Test the plugin with default configuration
+ *
+ * @throws Exception
+ */
+ public void testDefaultConfiguration()
+ throws Exception
+ {
+ copyFilesFromDirectory( new File( getBasedir(), "src/test/resources/unit/default-configuration/javadoc-files" ),
+ new File( getBasedir(), "target/test/unit/default-configuration/target/site" ) );
+
+ File testPom = new File( getBasedir(),
+ "src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml" );
+ JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
+ mojo.execute();
+
+ //check if xref files were generated
+ File generatedFile =
+ new File( getBasedir(), "target/test/unit/default-configuration/target/site/xref/allclasses-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(), "target/test/unit/default-configuration/target/site/xref/index.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/default-configuration/target/site/xref/overview-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/default-configuration/target/site/xref/overview-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/default-configuration/target/site/xref/stylesheet.css" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/default-configuration/target/site/xref/def/configuration/App.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/default-configuration/target/site/xref/def/configuration/AppSample.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/default-configuration/target/site/xref/def/configuration/package-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/default-configuration/target/site/xref/def/configuration/package-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ //check if there's a link to the javadoc files
+ String str = readFile( new File( getBasedir(),
+ "target/test/unit/default-configuration/target/site/xref/def/configuration/AppSample.html" ) );
+ assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/AppSample.html\"".toLowerCase() ) != -1 );
+
+ str = readFile( new File( getBasedir(),
+ "target/test/unit/default-configuration/target/site/xref/def/configuration/App.html" ) );
+ assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/app.html\"".toLowerCase() ) != -1 );
+
+ }
+
+ /**
+ * Test when javadocLink is disabled in the configuration
+ *
+ * @throws Exception
+ */
+ public void testNoJavadocLink()
+ throws Exception
+ {
+ File testPom = new File( getBasedir(),
+ "src/test/resources/unit/nojavadoclink-configuration/nojavadoclink-configuration-plugin-config.xml" );
+ JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
+ mojo.execute();
+
+ //check if xref files were generated
+ File generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/allclasses-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/nojavadoclink-configuration/target/site/xref/index.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/overview-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/overview-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/nojavadoclink-configuration/target/site/xref/stylesheet.css" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/App.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/AppSample.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/package-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/package-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/sample/package-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/sample/package-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/sample/Sample.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ //check if there's a link to the javadoc files
+ String str = readFile( new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/AppSample.html" ) );
+ assertTrue(
+ str.toLowerCase().indexOf( "/apidocs/nojavadoclink/configuration/AppSample.html\"".toLowerCase() ) == -1 );
+
+ str = readFile( new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/App.html" ) );
+ assertTrue(
+ str.toLowerCase().indexOf( "/apidocs/nojavadoclink/configuration/app.html\"".toLowerCase() ) == -1 );
+
+ str = readFile( new File( getBasedir(),
+ "target/test/unit/nojavadoclink-configuration/target/site/xref/nojavadoclink/configuration/sample/Sample.html" ) );
+ assertTrue( str.toLowerCase().indexOf(
+ "/apidocs/nojavadoclink/configuration/sample/sample.html\"".toLowerCase() ) == -1 );
+
+ }
+
+ /**
+ * Method for testing plugin when aggregate parameter is set to true
+ *
+ * @throws Exception
+ */
+ public void testAggregate()
+ throws Exception
+ {
+ File testPom =
+ new File( getBasedir(), "src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml" );
+ JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
+ mojo.execute();
+
+ //check if xref files were generated for submodule1
+ File generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule1/package-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule1/package-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule1/Submodule1App.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule1/Submodule1AppSample.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ //check if xref files were generated for submodule2
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule2/package-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule2/package-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule2/Submodule2App.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/aggregate-test/target/site/xref/aggregate/test/submodule2/Submodule2AppSample.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ }
+
+ /**
+ * Method for testing plugin when the specified javadocDir does not exist
+ *
+ * @throws Exception
+ */
+ public void testNoJavadocDir()
+ throws Exception
+ {
+ File testPom =
+ new File( getBasedir(), "src/test/resources/unit/nojavadocdir-test/nojavadocdir-test-plugin-config.xml" );
+ JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
+ mojo.execute();
+
+ //check if there's a link to the javadoc files
+ String str = readFile( new File( getBasedir(),
+ "target/test/unit/nojavadocdir-test/target/site/xref/nojavadocdir/test/AppSample.html" ) );
+ assertTrue( str.toLowerCase().indexOf( "/apidocs/nojavadocdir/test/AppSample.html".toLowerCase() ) != -1 );
+
+ str = readFile( new File( getBasedir(),
+ "target/test/unit/nojavadocdir-test/target/site/xref/nojavadocdir/test/App.html" ) );
+ assertTrue( str.toLowerCase().indexOf( "/apidocs/nojavadocdir/test/app.html".toLowerCase() ) != -1 );
+
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+
+ }
+
+ /**
+ * Copy files from the specified source directory to the specified destination directory
+ *
+ * @param srcDir
+ * @param destDir
+ * @throws IOException
+ */
+ private void copyFilesFromDirectory( File srcDir, File destDir )
+ throws IOException
+ {
+ FileUtils.copyDirectoryStructure( srcDir, destDir );
+ }
+
+ /**
+ * Read the contents of the specified file object into a string
+ *
+ * @param file the file to be read
+ * @return a String object that contains the contents of the file
+ * @throws IOException
+ */
+ private String readFile( File file )
+ throws IOException
+ {
+ String str = "", strTmp = "";
+ BufferedReader in = new BufferedReader( new FileReader( file ) );
+
+ while ( ( strTmp = in.readLine() ) != null )
+ {
+ str = str + " " + strTmp;
+ }
+ in.close();
+
+ return str;
+ }
+
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrTestReportTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrTestReportTest.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrTestReportTest.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrTestReportTest.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,128 @@
+package org.apache.maven.plugin.jxr;
+
+/*
+ * Copyright 2005-2006 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.testing.AbstractMojoTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class JxrTestReportTest
+ extends AbstractMojoTestCase
+{
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+ }
+
+ /**
+ * Method to test when the source dir is the test source dir
+ *
+ * @throws Exception
+ */
+ public void testSourceDir()
+ throws Exception
+ {
+ File testPom =
+ new File( getBasedir(), "src/test/resources/unit/testsourcedir-test/testsourcedir-test-plugin-config.xml" );
+ JxrTestReport mojo = (JxrTestReport) lookupMojo( "test-jxr", testPom );
+ mojo.execute();
+
+ //check if the jxr docs were generated
+ File generatedFile = new File( getBasedir(),
+ "target/test/unit/testsourcedir-test/target/site/xref-test/testsourcedir/test/AppSampleTest.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/testsourcedir-test/target/site/xref-test/testsourcedir/test/AppTest.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/testsourcedir-test/target/site/xref-test/testsourcedir/test/package-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile = new File( getBasedir(),
+ "target/test/unit/testsourcedir-test/target/site/xref-test/testsourcedir/test/package-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/testsourcedir-test/target/site/xref-test/allclasses-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/testsourcedir-test/target/site/xref-test/index.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/testsourcedir-test/target/site/xref-test/overview-frame.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/testsourcedir-test/target/site/xref-test/overview-summary.html" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ generatedFile =
+ new File( getBasedir(), "target/test/unit/testsourcedir-test/target/site/xref-test/stylesheet.css" );
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ //check if there's a link to the javadoc files
+ String str = readFile( new File( getBasedir(),
+ "target/test/unit/testsourcedir-test/target/site/xref-test/testsourcedir/test/AppSampleTest.html" ) );
+ assertTrue( str.toLowerCase().indexOf( "/apidocs/testsourcedir/test/AppSample.html\"".toLowerCase() ) == -1 );
+
+ str = readFile( new File( getBasedir(),
+ "target/test/unit/testsourcedir-test/target/site/xref-test/testsourcedir/test/AppTest.html" ) );
+ assertTrue( str.toLowerCase().indexOf( "/apidocs/testsourcedir/test/App.html\"".toLowerCase() ) == -1 );
+
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+
+ }
+
+ /**
+ * Read the contents of the specified file object into a string
+ *
+ * @param file the file to be read
+ * @return a String object that contains the contents of the file
+ * @throws java.io.IOException
+ */
+ private String readFile( File file )
+ throws IOException
+ {
+ String str = "", strTmp = "";
+ BufferedReader in = new BufferedReader( new FileReader( file ) );
+
+ while ( ( strTmp = in.readLine() ) != null )
+ {
+ str = str + " " + strTmp;
+ }
+ in.close();
+
+ return str;
+ }
+
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule1MavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule1MavenProjectStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule1MavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule1MavenProjectStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,65 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.util.ArrayList;
+import java.util.List;
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class AggregateSubmodule1MavenProjectStub
+ extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public AggregateSubmodule1MavenProjectStub()
+ {
+ setArtifactId( "aggregate-test-submodule1" );
+ setGroupId( "aggregate.test" );
+ setVersion( "1.0-SNAPSHOT" );
+ setPackaging( "jar" );
+ setInceptionYear( "2006" );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add(
+ basedir + "/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ //set the report plugins
+ List reportPlugins = new ArrayList();
+ setReportPlugins( reportPlugins );
+
+ Artifact artifact = new JxrPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+ artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+ setArtifact( artifact );
+ }
+
+ public void setReportPlugins( List reportPlugins )
+ {
+ this.reportPlugins = reportPlugins;
+ }
+
+ public List getReportPlugins()
+ {
+ return reportPlugins;
+ }
+
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule2MavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule2MavenProjectStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule2MavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateSubmodule2MavenProjectStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,64 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.util.ArrayList;
+import java.util.List;
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class AggregateSubmodule2MavenProjectStub
+ extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public AggregateSubmodule2MavenProjectStub()
+ {
+ setArtifactId( "aggregate-test-submodule2" );
+ setGroupId( "aggregate.test" );
+ setVersion( "1.0-SNAPSHOT" );
+ setPackaging( "jar" );
+ setInceptionYear( "2006" );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add(
+ basedir + "/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ //set the report plugins
+ List reportPlugins = new ArrayList();
+ setReportPlugins( reportPlugins );
+
+ Artifact artifact = new JxrPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+ artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+ setArtifact( artifact );
+ }
+
+ public void setReportPlugins( List reportPlugins )
+ {
+ this.reportPlugins = reportPlugins;
+ }
+
+ public List getReportPlugins()
+ {
+ return reportPlugins;
+ }
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateTestMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateTestMavenProjectStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateTestMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/AggregateTestMavenProjectStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,90 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+/*
+ * Copyright 2005-2006 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.artifact.Artifact;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.ReportPlugin;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class AggregateTestMavenProjectStub
+ extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public AggregateTestMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File(
+ getBasedir() + "/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml" ) ) );
+ setModel( model );
+ }
+ catch ( Exception e )
+ {
+
+ }
+
+ setArtifactId( model.getArtifactId() );
+ setGroupId( model.getGroupId() );
+ setVersion( model.getVersion() );
+ setPackaging( model.getPackaging() );
+ setInceptionYear( model.getInceptionYear() );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( basedir + "/src/test/resources/unit/aggregate-test/aggregate/test" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ //set the report plugins
+ List reportPlugins = new ArrayList();
+ for ( Iterator iter = model.getReporting().getPlugins().iterator(); iter.hasNext(); )
+ {
+ ReportPlugin plugin = (ReportPlugin) iter.next();
+ reportPlugins.add( plugin );
+ }
+ setReportPlugins( reportPlugins );
+
+ Artifact artifact = new JxrPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+ artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+ setArtifact( artifact );
+ setExecutionRoot( true );
+ }
+
+ public void setReportPlugins( List plugins )
+ {
+ this.reportPlugins = plugins;
+ }
+
+ public List getReportPlugins()
+ {
+ return reportPlugins;
+ }
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultArtifactHandlerStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultArtifactHandlerStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultArtifactHandlerStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultArtifactHandlerStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,44 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+/*
+ * Copyright 2005-2006 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.artifact.handler.DefaultArtifactHandler;
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class DefaultArtifactHandlerStub
+ extends DefaultArtifactHandler
+{
+ private String language;
+
+ public String getLanguage()
+ {
+ if ( language == null )
+ {
+ language = "java";
+ }
+
+ return language;
+ }
+
+ public void setLanguage( String language )
+ {
+ this.language = language;
+ }
+
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultConfigurationMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultConfigurationMavenProjectStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultConfigurationMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/DefaultConfigurationMavenProjectStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,94 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.ReportPlugin;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+/*
+ * Copyright 2005-2006 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.
+ */
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Odea
+ * Date: Apr 25, 2006
+ * Time: 5:45:36 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class DefaultConfigurationMavenProjectStub
+ extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public DefaultConfigurationMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File( getBasedir() +
+ "/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml" ) ) );
+ setModel( model );
+ }
+ catch ( Exception e )
+ {
+
+ }
+
+ setArtifactId( model.getArtifactId() );
+ setGroupId( model.getGroupId() );
+ setVersion( model.getVersion() );
+ setPackaging( model.getPackaging() );
+ setInceptionYear( model.getInceptionYear() );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( basedir + "/src/test/resources/unit/default-configuration/def/configuration" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ //set the report plugins
+ List reportPlugins = new ArrayList();
+ for ( Iterator iter = model.getReporting().getPlugins().iterator(); iter.hasNext(); )
+ {
+ ReportPlugin plugin = (ReportPlugin) iter.next();
+ reportPlugins.add( plugin );
+ }
+ setReportPlugins( reportPlugins );
+
+ Artifact artifact = new JxrPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+ artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+ setArtifact( artifact );
+
+ }
+
+ public void setReportPlugins( List plugins )
+ {
+ this.reportPlugins = plugins;
+ }
+
+ public List getReportPlugins()
+ {
+ return reportPlugins;
+ }
+
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/JxrPluginArtifactStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/JxrPluginArtifactStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/JxrPluginArtifactStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/JxrPluginArtifactStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,114 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+/*
+ * Copyright 2005-2006 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.artifact.handler.ArtifactHandler;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.plugin.testing.stubs.ArtifactStub;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Odea
+ * Date: Apr 26, 2006
+ * Time: 11:40:41 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class JxrPluginArtifactStub
+ extends ArtifactStub
+{
+
+ private String groupId;
+
+ private String artifactId;
+
+ private String version;
+
+ private String packaging;
+
+ private VersionRange versionRange;
+
+ private ArtifactHandler handler;
+
+ public JxrPluginArtifactStub( String groupId, String artifactId, String version, String packaging )
+ {
+ this.groupId = groupId;
+ this.artifactId = artifactId;
+ this.version = version;
+ this.packaging = packaging;
+ versionRange = VersionRange.createFromVersion( version );
+ }
+
+ public void setGroupId( String groupId )
+ {
+ this.groupId = groupId;
+ }
+
+ public String getGroupId()
+ {
+ return groupId;
+ }
+
+ public void setArtifactId( String artifactId )
+ {
+ this.artifactId = artifactId;
+ }
+
+ public String getArtifactId()
+ {
+ return artifactId;
+ }
+
+ public void setVersion( String version )
+ {
+ this.version = version;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setPackaging( String packaging )
+ {
+ this.packaging = packaging;
+ }
+
+ public String getPackaging()
+ {
+ return packaging;
+ }
+
+ public VersionRange getVersionRange()
+ {
+ return versionRange;
+ }
+
+ public void setVersionRange( VersionRange versionRange )
+ {
+ this.versionRange = versionRange;
+ }
+
+ public ArtifactHandler getArtifactHandler()
+ {
+ return handler;
+ }
+
+ public void setArtifactHandler( ArtifactHandler handler )
+ {
+ this.handler = handler;
+ }
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocDirMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocDirMavenProjectStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocDirMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocDirMavenProjectStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,89 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+/*
+ * Copyright 2005-2006 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.artifact.Artifact;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.ReportPlugin;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class NoJavadocDirMavenProjectStub
+ extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public NoJavadocDirMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File(
+ getBasedir() + "/src/test/resources/unit/nojavadocdir-test/nojavadocdir-test-plugin-config.xml" ) ) );
+ setModel( model );
+ }
+ catch ( Exception e )
+ {
+
+ }
+
+ setArtifactId( model.getArtifactId() );
+ setGroupId( model.getGroupId() );
+ setVersion( model.getVersion() );
+ setPackaging( model.getPackaging() );
+ setInceptionYear( model.getInceptionYear() );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( basedir + "/src/test/resources/unit/nojavadocdir-test/nojavadocdir/test" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ //set the report plugins
+ List reportPlugins = new ArrayList();
+ for ( Iterator iter = model.getReporting().getPlugins().iterator(); iter.hasNext(); )
+ {
+ ReportPlugin plugin = (ReportPlugin) iter.next();
+ reportPlugins.add( plugin );
+ }
+ setReportPlugins( reportPlugins );
+
+ Artifact artifact = new JxrPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+ artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+ setArtifact( artifact );
+ }
+
+ public void setReportPlugins( List plugins )
+ {
+ this.reportPlugins = plugins;
+ }
+
+ public List getReportPlugins()
+ {
+ return reportPlugins;
+ }
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocLinkConfigurationMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocLinkConfigurationMavenProjectStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocLinkConfigurationMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/NoJavadocLinkConfigurationMavenProjectStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,91 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+/*
+ * Copyright 2005-2006 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.artifact.Artifact;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.ReportPlugin;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class NoJavadocLinkConfigurationMavenProjectStub
+ extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public NoJavadocLinkConfigurationMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File( getBasedir() +
+ "/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink-configuration-plugin-config.xml" ) ) );
+ setModel( model );
+ }
+ catch ( Exception e )
+ {
+
+ }
+
+ setArtifactId( model.getArtifactId() );
+ setGroupId( model.getGroupId() );
+ setVersion( model.getVersion() );
+ setPackaging( model.getPackaging() );
+ setInceptionYear( model.getInceptionYear() );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add(
+ basedir + "/src/test/resources/unit/nojavadoclink-configuration/nojavadoclink/configuration" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ //set the report plugins
+ List reportPlugins = new ArrayList();
+ for ( Iterator iter = model.getReporting().getPlugins().iterator(); iter.hasNext(); )
+ {
+ ReportPlugin plugin = (ReportPlugin) iter.next();
+ reportPlugins.add( plugin );
+ }
+ setReportPlugins( reportPlugins );
+
+ Artifact artifact = new JxrPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+ artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+ setArtifact( artifact );
+
+ }
+
+ public void setReportPlugins( List plugins )
+ {
+ this.reportPlugins = plugins;
+ }
+
+ public List getReportPlugins()
+ {
+ return reportPlugins;
+ }
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/TestSourceDirMavenProjectStub.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/TestSourceDirMavenProjectStub.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/TestSourceDirMavenProjectStub.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/TestSourceDirMavenProjectStub.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,79 @@
+package org.apache.maven.plugin.jxr.stubs;
+
+/*
+ * Copyright 2005-2006 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.artifact.Artifact;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+import java.io.File;
+import java.io.FileReader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
+ */
+public class TestSourceDirMavenProjectStub
+ extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public TestSourceDirMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File(
+ getBasedir() + "/src/test/resources/unit/testsourcedir-test/testsourcedir-test-plugin-config.xml" ) ) );
+ setModel( model );
+ }
+ catch ( Exception e )
+ {
+
+ }
+
+ setArtifactId( model.getArtifactId() );
+ setGroupId( model.getGroupId() );
+ setVersion( model.getVersion() );
+ setPackaging( model.getPackaging() );
+ setInceptionYear( model.getInceptionYear() );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( basedir + "/src/test/resources/unit/testsourcedir-test" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ Artifact artifact = new JxrPluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging() );
+ artifact.setArtifactHandler( new DefaultArtifactHandlerStub() );
+ setArtifact( artifact );
+
+ }
+
+ public void setReportPlugins( List plugins )
+ {
+ this.reportPlugins = plugins;
+ }
+
+ public List getReportPlugins()
+ {
+ return reportPlugins;
+ }
+}
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml Wed Apr 26 19:56:41 2006
@@ -0,0 +1,48 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>aggregate.test</groupId>
+ <artifactId>aggregate-test</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2006</inceptionYear>
+ <name>Maven Jxr Plugin Aggregate Test</name>
+ <url>http://maven.apache.org</url>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.jxr.stubs.AggregateTestMavenProjectStub"/>
+ <outputDirectory>${basedir}/target/test/unit/aggregate-test/target/site</outputDirectory>
+ <docTitle>Maven Jxr Plugin Aggregate Test 1.0-SNAPSHOT Reference</docTitle>
+ <inputEncoding>ISO-8859-1</inputEncoding>
+ <outputEncoding>ISO-8859-1</outputEncoding>
+ <sourceDirs>
+ <value>${basedir}/src/test/resources/unit/aggregate-test/submodule1</value>
+ <value>${basedir}/src/test/resources/unit/aggregate-test/submodule2</value>
+ </sourceDirs>
+ <destDir>${basedir}/target/test/unit/aggregate-test/target/site/xref</destDir>
+ <javadocDir>${basedir}/target/test/unit/aggregate-test/target/site/apidocs</javadocDir>
+ <linkJavadoc>false</linkJavadoc>
+ <bottom>Copyright 2006 Apache Foundation</bottom>
+ <templateDir>templates</templateDir>
+ <stylesheet>stylesheet.css</stylesheet>
+ <aggregate>true</aggregate>
+ <reactorProjects>
+ <project implementation="org.apache.maven.plugin.jxr.stubs.AggregateSubmodule1MavenProjectStub"/>
+ <project implementation="org.apache.maven.plugin.jxr.stubs.AggregateSubmodule2MavenProjectStub"/>
+ </reactorProjects>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate-test-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate-test-plugin-config.xml?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate-test-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate-test-plugin-config.xml Wed Apr 26 19:56:41 2006
@@ -0,0 +1,14 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>aggregate.test</groupId>
+ <artifactId>aggregate-test</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>aggregate-test-submodule1</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2006</inceptionYear>
+ <name>Maven Jxr Plugin Aggregate Test Submodule1</name>
+ <url>http://maven.apache.org</url>
+</project>
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1App.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1App.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1App.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1App.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,30 @@
+package aggregate.test.submodule1;
+
+/**
+ * This is a sample class used for testing
+ *
+ * @author Maria Odea Ching
+ */
+public class Submodule1App
+{
+ /**
+ * The main method
+ *
+ * @param args an array of strings that contains the arguments
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Sample Application." );
+ }
+
+ /**
+ * Sample method
+ *
+ * @param str the value to be displayed
+ */
+ protected void sampleMethod( String str )
+ {
+ System.out.println( str );
+ }
+
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1AppSample.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1AppSample.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1AppSample.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule1/aggregate/test/submodule1/Submodule1AppSample.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,18 @@
+package aggregate.test.submodule1;
+
+/**
+ * @author Maria Odea Ching
+ */
+public class Submodule1AppSample
+{
+
+ /**
+ * The main method
+ *
+ * @param args an array of strings that contains the arguments
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Another Sample Application" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate-test-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate-test-plugin-config.xml?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate-test-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate-test-plugin-config.xml Wed Apr 26 19:56:41 2006
@@ -0,0 +1,14 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>aggregate.test</groupId>
+ <artifactId>aggregate-test</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>aggregate-test-submodule2</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2006</inceptionYear>
+ <name>Maven Jxr Plugin Aggregate Test Submodule2</name>
+ <url>http://maven.apache.org</url>
+</project>
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2App.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2App.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2App.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2App.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,30 @@
+package aggregate.test.submodule2;
+
+/**
+ * This is a sample class used for testing
+ *
+ * @author Maria Odea Ching
+ */
+public class Submodule2App
+{
+ /**
+ * The main method
+ *
+ * @param args an array of strings that contains the arguments
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Sample Application." );
+ }
+
+ /**
+ * Sample method
+ *
+ * @param str the value to be displayed
+ */
+ protected void sampleMethod( String str )
+ {
+ System.out.println( str );
+ }
+
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2AppSample.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2AppSample.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2AppSample.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/aggregate-test/submodule2/aggregate/test/submodule2/Submodule2AppSample.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,18 @@
+package aggregate.test.submodule2;
+
+/**
+ * @author Maria Odea Ching
+ */
+public class Submodule2AppSample
+{
+
+ /**
+ * The main method
+ *
+ * @param args an array of strings that contains the arguments
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Another Sample Application" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/App.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/App.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/App.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/App.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,30 @@
+package def.configuration;
+
+/**
+ * This is a sample class used for testing
+ *
+ * @author Maria Odea Ching
+ */
+public class App
+{
+ /**
+ * The main method
+ *
+ * @param args an array of strings that contains the arguments
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Sample Application." );
+ }
+
+ /**
+ * Sample method
+ *
+ * @param str the value to be displayed
+ */
+ protected void sampleMethod( String str )
+ {
+ System.out.println( str );
+ }
+
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/AppSample.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/AppSample.java?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/AppSample.java (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/def/configuration/AppSample.java Wed Apr 26 19:56:41 2006
@@ -0,0 +1,18 @@
+package def.configuration;
+
+/**
+ * @author Maria Odea Ching
+ */
+public class AppSample
+{
+
+ /**
+ * The main method
+ *
+ * @param args an array of strings that contains the arguments
+ */
+ public static void main( String[] args )
+ {
+ System.out.println( "Another Sample Application" );
+ }
+}
\ No newline at end of file
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/default-configuration-plugin-config.xml Wed Apr 26 19:56:41 2006
@@ -0,0 +1,43 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>def.configuration</groupId>
+ <artifactId>default-configuration</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2006</inceptionYear>
+ <name>Maven Jxr Plugin Default Configuration Test</name>
+ <url>http://maven.apache.org</url>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jxr-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.jxr.stubs.DefaultConfigurationMavenProjectStub"/>
+ <outputDirectory>${basedir}/target/test/unit/default-configuration/target/site</outputDirectory>
+ <docTitle>Maven Jxr Plugin Default Configuration Test 1.0-SNAPSHOT Reference</docTitle>
+ <inputEncoding>ISO-8859-1</inputEncoding>
+ <outputEncoding>ISO-8859-1</outputEncoding>
+ <sourceDirs>
+ <value>${basedir}/src/test/resources/unit/default-configuration</value>
+ </sourceDirs>
+ <destDir>${basedir}/target/test/unit/default-configuration/target/site/xref</destDir>
+ <javadocDir>${basedir}/target/test/unit/default-configuration/target/site/apidocs</javadocDir>
+ <linkJavadoc>true</linkJavadoc>
+ <aggregate>false</aggregate>
+ <bottom>Copyright 2006 Apache Foundation</bottom>
+ <templateDir>templates</templateDir>
+ <stylesheet>stylesheet.css</stylesheet>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-frame.html
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-frame.html?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-frame.html (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-frame.html Wed Apr 26 19:56:41 2006
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.4.2_05) on Tue Apr 25 18:00:28 CST 2006 -->
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<TITLE>
+All Classes (Maven Javadoc Plugin Default configuration Test 1.0-SNAPSHOT API)
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+<FONT size="+1" CLASS="FrameHeadingFont">
+<B>All Classes</B></FONT>
+<BR>
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="def/configuration/App.html" title="class in def.configuration" target="classFrame">App</A>
+<BR>
+<A HREF="def/configuration/AppSample.html" title="class in def.configuration" target="classFrame">AppSample</A>
+<BR>
+</FONT></TD>
+</TR>
+</TABLE>
+
+</BODY>
+</HTML>
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-noframe.html
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-noframe.html?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-noframe.html (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/allclasses-noframe.html Wed Apr 26 19:56:41 2006
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.4.2_05) on Tue Apr 25 18:00:28 CST 2006 -->
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<TITLE>
+All Classes (Maven Javadoc Plugin Default configuration Test 1.0-SNAPSHOT API)
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+
+</HEAD>
+
+<BODY BGCOLOR="white">
+<FONT size="+1" CLASS="FrameHeadingFont">
+<B>All Classes</B></FONT>
+<BR>
+
+<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
+<TR>
+<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="def/configuration/App.html" title="class in def.configuration">App</A>
+<BR>
+<A HREF="def/configuration/AppSample.html" title="class in def.configuration">AppSample</A>
+<BR>
+</FONT></TD>
+</TR>
+</TABLE>
+
+</BODY>
+</HTML>
Added: maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/constant-values.html
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/constant-values.html?rev=397371&view=auto
==============================================================================
--- maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/constant-values.html (added)
+++ maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/default-configuration/javadoc-files/apidocs/constant-values.html Wed Apr 26 19:56:41 2006
@@ -0,0 +1,137 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--NewPage-->
+<HTML>
+<HEAD>
+<!-- Generated by javadoc (build 1.4.2_05) on Tue Apr 25 18:00:28 CST 2006 -->
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<TITLE>
+Constant Field Values (Maven Javadoc Plugin Default configuration Test 1.0-SNAPSHOT API)
+</TITLE>
+
+
+<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
+
+<SCRIPT type="text/javascript">
+function windowTitle()
+{
+ parent.document.title="Constant Field Values (Maven Javadoc Plugin Default configuration Test 1.0-SNAPSHOT API)";
+}
+</SCRIPT>
+
+</HEAD>
+
+<BODY BGCOLOR="white" onload="windowTitle();">
+
+
+<!-- ========= START OF TOP NAVBAR ======= -->
+<A NAME="navbar_top"><!-- --></A>
+<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_top_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ PREV
+ NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html" target="_top"><B>FRAMES</B></A>
+ <A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
+ <SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_top"></A>
+<!-- ========= END OF TOP NAVBAR ========= -->
+
+<HR>
+<CENTER>
+<H1>
+Constant Field Values</H1>
+</CENTER>
+<HR SIZE="4" NOSHADE>
+<B>Contents</B><UL>
+</UL>
+
+<HR>
+
+
+<!-- ======= START OF BOTTOM NAVBAR ====== -->
+<A NAME="navbar_bottom"><!-- --></A>
+<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
+<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
+<TR>
+<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
+<A NAME="navbar_bottom_firstrow"><!-- --></A>
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
+ <TR ALIGN="center" VALIGN="top">
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
+ <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
+ </TR>
+</TABLE>
+</TD>
+<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
+</EM>
+</TD>
+</TR>
+
+<TR>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ PREV
+ NEXT</FONT></TD>
+<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
+ <A HREF="index.html" target="_top"><B>FRAMES</B></A>
+ <A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
+ <SCRIPT type="text/javascript">
+ <!--
+ if(window==top) {
+ document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
+ }
+ //-->
+</SCRIPT>
+<NOSCRIPT>
+ <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
+</NOSCRIPT>
+
+</FONT></TD>
+</TR>
+</TABLE>
+<A NAME="skip-navbar_bottom"></A>
+<!-- ======== END OF BOTTOM NAVBAR ======= -->
+
+<HR>
+
+</BODY>
+</HTML>