Author: dennisl
Date: Fri Mar 2 15:36:49 2007
New Revision: 514015
URL: http://svn.apache.org/viewvc?view=rev&rev=514015
Log:
[MJXR-24] Add the ability to include/exclude source files
o Add tests.
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/ExcludeConfigurationMavenProjectStub.java
(with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/IncludeConfigurationMavenProjectStub.java
(with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude-configuration-plugin-config.xml
(with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/App.java
(with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/AppSample.java
(with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include-configuration-plugin-config.xml
(with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/App.java
(with props)
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/AppSample.java
(with props)
Modified:
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java
Modified:
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java?view=diff&rev=514015&r1=514014&r2=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java
(original)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/JxrReportTest.java
Fri Mar 2 15:36:49 2007
@@ -1,318 +1,367 @@
-package org.apache.maven.plugin.jxr;
-
-/*
- * 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 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:[EMAIL PROTECTED]">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 );
-
- }
-
- public void testExceptions()
- throws Exception
- {
- try
- {
- File testPom =
- new File( getBasedir(),
"src/test/resources/unit/default-configuration/exception-test-plugin-config.xml"
);
- JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
- mojo.execute();
-
- fail( "Must throw exception");
- }
- catch ( Exception e )
- {
- assertTrue( true );
- }
- }
-
- 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;
- }
-
-}
+package org.apache.maven.plugin.jxr;
+
+/*
+ * 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 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:[EMAIL PROTECTED]">Maria Odea Ching</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Dennis Lundberg</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 );
+
+ }
+
+ /**
+ * Test the plugin with an exclude configuration.
+ *
+ * @throws Exception
+ */
+ public void testExclude()
+ throws Exception
+ {
+ File testPom = new File( getBasedir(),
+
"src/test/resources/unit/exclude-configuration/exclude-configuration-plugin-config.xml"
);
+ JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
+ mojo.execute();
+
+ // check that the non-excluded xref files were generated
+ File generatedFile = new File( getBasedir(),
+
"target/test/unit/exclude-configuration/target/site/xref/exclude/configuration/App.html"
);
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ // check that the excluded xref files were not generated
+ generatedFile = new File( getBasedir(),
+
"target/test/unit/exclude-configuration/target/site/xref/exclude/configuration/AppSample.html"
);
+ assertFalse( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+ }
+
+ /**
+ * Test the plugin with an include configuration.
+ *
+ * @throws Exception
+ */
+ public void testInclude()
+ throws Exception
+ {
+ File testPom = new File( getBasedir(),
+
"src/test/resources/unit/include-configuration/include-configuration-plugin-config.xml"
);
+ JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
+ mojo.execute();
+
+ // check that the included xref files were generated
+ File generatedFile = new File( getBasedir(),
+
"target/test/unit/include-configuration/target/site/xref/include/configuration/App.html"
);
+ assertTrue( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+
+ // check that the non-included xref files were not generated
+ generatedFile = new File( getBasedir(),
+
"target/test/unit/include-configuration/target/site/xref/include/configuration/AppSample.html"
);
+ assertFalse( FileUtils.fileExists( generatedFile.getAbsolutePath() ) );
+ }
+
+ public void testExceptions()
+ throws Exception
+ {
+ try
+ {
+ File testPom =
+ new File( getBasedir(),
"src/test/resources/unit/default-configuration/exception-test-plugin-config.xml"
);
+ JxrReport mojo = (JxrReport) lookupMojo( "jxr", testPom );
+ mojo.execute();
+
+ fail( "Must throw exception");
+ }
+ catch ( Exception e )
+ {
+ assertTrue( true );
+ }
+ }
+
+ 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/stubs/ExcludeConfigurationMavenProjectStub.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/ExcludeConfigurationMavenProjectStub.java?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/ExcludeConfigurationMavenProjectStub.java
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/ExcludeConfigurationMavenProjectStub.java
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,73 @@
+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;
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">Dennis Lundberg</a>
+ */
+public class ExcludeConfigurationMavenProjectStub extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public ExcludeConfigurationMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File( getBasedir() +
+
"/src/test/resources/unit/exclude-configuration/exclude-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/exclude-configuration/exclude/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;
+ }
+}
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/ExcludeConfigurationMavenProjectStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/IncludeConfigurationMavenProjectStub.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/IncludeConfigurationMavenProjectStub.java?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/IncludeConfigurationMavenProjectStub.java
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/IncludeConfigurationMavenProjectStub.java
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,74 @@
+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;
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">Dennis Lundberg</a>
+ */
+public class IncludeConfigurationMavenProjectStub extends MavenProjectStub
+{
+ List reportPlugins = new ArrayList();
+
+ public IncludeConfigurationMavenProjectStub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model = null;
+
+ try
+ {
+ model = pomReader.read( new FileReader( new File( getBasedir() +
+
"/src/test/resources/unit/include-configuration/include-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/include-configuration/include/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;
+ }
+}
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/java/org/apache/maven/plugin/jxr/stubs/IncludeConfigurationMavenProjectStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude-configuration-plugin-config.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude-configuration-plugin-config.xml?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude-configuration-plugin-config.xml
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude-configuration-plugin-config.xml
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,65 @@
+<!--
+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>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>exclude.configuration</groupId>
+ <artifactId>exclude-configuration</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2006</inceptionYear>
+ <name>Maven Jxr Plugin Exclude Configuration</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.ExcludeConfigurationMavenProjectStub"/>
+
<outputDirectory>${basedir}/target/test/unit/exclude-configuration/target/site</outputDirectory>
+ <docTitle>Maven Jxr Plugin Exclude Configuration 1.0-SNAPSHOT
Reference</docTitle>
+ <inputEncoding>ISO-8859-1</inputEncoding>
+ <outputEncoding>ISO-8859-1</outputEncoding>
+ <sourceDirs>
+
<value>${basedir}/src/test/resources/unit/exclude-configuration</value>
+ </sourceDirs>
+
<destDir>${basedir}/target/test/unit/exclude-configuration/target/site/xref</destDir>
+
<javadocDir>${basedir}/target/test/unit/exclude-configuration/target/site/apidocs</javadocDir>
+ <linkJavadoc>true</linkJavadoc>
+ <aggregate>false</aggregate>
+ <bottom>Copyright 2006 Apache Foundation</bottom>
+ <templateDir>templates</templateDir>
+ <stylesheet>stylesheet.css</stylesheet>
+ <excludes>
+ <exclude>**/AppSample.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude-configuration-plugin-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/App.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/App.java?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/App.java
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/App.java
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,49 @@
+package exclude.configuration;
+
+/*
+ * 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.
+ */
+
+/**
+ * This is a sample class used for testing
+ *
+ * @author Dennis Lundberg
+ */
+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
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/App.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/AppSample.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/AppSample.java?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/AppSample.java
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/AppSample.java
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,37 @@
+package exclude.configuration;
+
+/*
+ * 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.
+ */
+
+/**
+ * @author Dennis Lundberg
+ */
+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
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/exclude-configuration/exclude/configuration/AppSample.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include-configuration-plugin-config.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include-configuration-plugin-config.xml?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include-configuration-plugin-config.xml
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include-configuration-plugin-config.xml
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,65 @@
+<!--
+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>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>include.configuration</groupId>
+ <artifactId>include-configuration</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <inceptionYear>2006</inceptionYear>
+ <name>Maven Jxr Plugin Include Configuration</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.IncludeConfigurationMavenProjectStub"/>
+
<outputDirectory>${basedir}/target/test/unit/include-configuration/target/site</outputDirectory>
+ <docTitle>Maven Jxr Plugin Include Configuration 1.0-SNAPSHOT
Reference</docTitle>
+ <inputEncoding>ISO-8859-1</inputEncoding>
+ <outputEncoding>ISO-8859-1</outputEncoding>
+ <sourceDirs>
+
<value>${basedir}/src/test/resources/unit/include-configuration</value>
+ </sourceDirs>
+
<destDir>${basedir}/target/test/unit/include-configuration/target/site/xref</destDir>
+
<javadocDir>${basedir}/target/test/unit/include-configuration/target/site/apidocs</javadocDir>
+ <linkJavadoc>true</linkJavadoc>
+ <aggregate>false</aggregate>
+ <bottom>Copyright 2006 Apache Foundation</bottom>
+ <templateDir>templates</templateDir>
+ <stylesheet>stylesheet.css</stylesheet>
+ <includes>
+ <include>**/App.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include-configuration-plugin-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/App.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/App.java?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/App.java
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/App.java
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,49 @@
+package include.configuration;
+
+/*
+ * 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.
+ */
+
+/**
+ * This is a sample class used for testing
+ *
+ * @author Dennis Lundberg
+ */
+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
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/App.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/AppSample.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/AppSample.java?view=auto&rev=514015
==============================================================================
---
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/AppSample.java
(added)
+++
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/AppSample.java
Fri Mar 2 15:36:49 2007
@@ -0,0 +1,37 @@
+package include.configuration;
+
+/*
+ * 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.
+ */
+
+/**
+ * @author Dennis Lundberg
+ */
+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
Propchange:
maven/plugins/trunk/maven-jxr-plugin/src/test/resources/unit/include-configuration/include/configuration/AppSample.java
------------------------------------------------------------------------------
svn:eol-style = native