[maven-javadoc-plugin] branch MJAVADOC-544 created (now 0b5f66c)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven-javadoc-plugin] branch MJAVADOC-544 created (now 0b5f66c)

rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a change to branch MJAVADOC-544
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git.


      at 0b5f66c  - Changed behaviour of Javadoc for temporary files encoding (options, argfile, ...)

This branch includes the following new commits:

     new 0b5f66c  - Changed behaviour of Javadoc for temporary files encoding (options, argfile, ...)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Reply | Threaded
Open this post in threaded view
|

[maven-javadoc-plugin] 01/01: - Changed behaviour of Javadoc for temporary files encoding (options, argfile, ...)

rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MJAVADOC-544
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git

commit 0b5f66c2a7cd0409a78939d20e7894a3c6c6c1b2
Author: Michael Stumpf <[hidden email]>
AuthorDate: Thu Nov 29 11:09:08 2018 +0100

    - Changed behaviour of Javadoc for temporary files encoding (options, argfile, ...)
---
 pom.xml                                            |   3 +
 .../maven/plugins/javadoc/AbstractJavadocMojo.java |  17 ++-
 .../maven/plugins/javadoc/JavadocReportTest.java   | 117 ++++++++++++++++++++-
 .../ArgfileUmlautEncodingMavenProjectStub.java     |  80 ++++++++++++++
 .../OptionsUmlautEncodingMavenProjectStub.java     |  80 ++++++++++++++
 .../argfileumlautencoding-test-plugin-config.xml   |  72 +++++++++++++
 .../argfileumlautencoding/test/AppSample.java      |  39 +++++++
 .../test/App\303\244\303\266\303\274\303\237.java" |  36 +++++++
 .../optionsumlautencoding-test-plugin-config.xml   |  73 +++++++++++++
 .../optionsumlautencoding/test/App.java            |  36 +++++++
 .../optionsumlautencoding/test/AppSample.java      |  39 +++++++
 11 files changed, 589 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 43011e6..de6326c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,6 +116,9 @@ under the License.
     <contributor>
       <name>Kevin Risden</name>
     </contributor>
+    <contributor>
+      <name>Michael Stumpf</name>
+    </contributor>
   </contributors>
 
   <dependencies>
diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
index 7a506ba..d84b5c7 100644
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
@@ -108,6 +108,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.StandardCopyOption;
@@ -4374,9 +4375,15 @@ public abstract class AbstractJavadocMojo
         options.append( StringUtils.join( arguments.iterator(),
                                           SystemUtils.LINE_SEPARATOR ) );
 
+        /* default to platform encoding */
+        String outputFileEncoding = null;
+        if ( JAVA_VERSION.isAtLeast( "9" ) )
+        {
+            outputFileEncoding = StandardCharsets.UTF_8.name();
+        }
         try
         {
-            FileUtils.fileWrite( optionsFile.getAbsolutePath(), null /* platform encoding */, options.toString() );
+            FileUtils.fileWrite( optionsFile.getAbsolutePath(), outputFileEncoding, options.toString() );
         }
         catch ( IOException e )
         {
@@ -4420,9 +4427,15 @@ public abstract class AbstractJavadocMojo
             cmd.createArg().setValue( "@" + FILES_FILE_NAME );
         }
 
+        /* default to platform encoding */
+        String outputFileEncoding = null;
+        if ( JAVA_VERSION.isAtLeast( "9" ) )
+        {
+            outputFileEncoding = StandardCharsets.UTF_8.name();
+        }
         try
         {
-            FileUtils.fileWrite( argfileFile.getAbsolutePath(), null /* platform encoding */,
+            FileUtils.fileWrite( argfileFile.getAbsolutePath(), outputFileEncoding,
                                  StringUtils.join( files.iterator(), SystemUtils.LINE_SEPARATOR ) );
         }
         catch ( IOException e )
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index 0f18b6b..c5925dd 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -26,6 +26,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.URL;
+import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.util.HashMap;
@@ -190,9 +191,25 @@ public class JavadocReportTest
     private static String readFile( File file )
         throws IOException
     {
+        return readFile( file, StandardCharsets.UTF_8 );
+    }
+
+    /**
+     * Convenience method that reads the contents of the specified file object into a string with a
+     * <code>space</code> as line separator.
+     *
+     * @see #LINE_SEPARATOR
+     * @param file the file to be read
+     * @param cs charset to use
+     * @return a String object that contains the contents of the file
+     * @throws IOException if any
+     */
+    private static String readFile( File file, Charset cs )
+            throws IOException
+    {
         StringBuilder str = new StringBuilder( (int) file.length() );
 
-        for ( String strTmp : Files.readAllLines( file.toPath(), StandardCharsets.UTF_8 ) )
+        for ( String strTmp : Files.readAllLines( file.toPath(), cs ) )
         {
             str.append( LINE_SEPARATOR);
             str.append( strTmp );
@@ -498,6 +515,104 @@ public class JavadocReportTest
     }
 
     /**
+     * Method to test when the options file has umlauts.
+     *
+     * @throws Exception if any
+     */
+    public void testOptionsUmlautEncoding()
+            throws Exception
+    {
+        File testPom = new File(unit, "optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml" );
+        JavadocReport mojo = lookupMojo( testPom );
+        mojo.execute();
+
+        File optionsFile = new File( mojo.getOutputDirectory(), "options" );
+        assertTrue( optionsFile.exists() );
+
+        // check for a part of the window title
+        String content;
+        if ( JavaVersion.JAVA_VERSION.isAtLeast( "9" ) )
+        {
+            content = readFile( optionsFile, StandardCharsets.UTF_8 );
+        }
+        else
+        {
+            content = readFile( optionsFile, Charset.defaultCharset() );
+        }
+        assertTrue( content.contains( "Options Umlaut Encoding ö ä ü ß" ) );
+
+        File apidocs = new File( getBasedir(), "target/test/unit/optionsumlautencoding-test/target/site/apidocs" );
+
+        // package level generated javadoc files
+        assertTrue( new File( apidocs, "optionsumlautencoding/test/App.html" ).exists() );
+        assertTrue( new File( apidocs, "optionsumlautencoding/test/AppSample.html" ).exists() );
+
+        // project level generated javadoc files
+        assertTrue( new File( apidocs, "index-all.html" ).exists() );
+        assertTrue( new File( apidocs, "index.html" ).exists() );
+        assertTrue( new File( apidocs, "overview-tree.html" ).exists() );
+        assertTrue( new File( apidocs, "stylesheet.css" ).exists() );
+
+        if ( JavaVersion.JAVA_VERSION.isBefore( "10" ) )
+        {
+            assertTrue( new File( apidocs, "package-list" ).exists() );
+        }
+        else
+        {
+            assertTrue( new File( apidocs, "element-list" ).exists() );
+        }
+    }
+
+    /**
+     * Method to test when the argfile file has umlauts.
+     *
+     * @throws Exception if any
+     */
+    public void testArgfileUmlautEncoding()
+            throws Exception
+    {
+        File testPom = new File( unit, "argfileumlautencoding-test/argfileumlautencoding-test-plugin-config.xml" );
+        JavadocReport mojo = lookupMojo( testPom );
+        mojo.execute();
+
+        File argfileFile = new File( mojo.getOutputDirectory(), "argfile" );
+        assertTrue( argfileFile.exists() );
+
+        // check for the umlaut class name
+        String content;
+        if ( JavaVersion.JAVA_VERSION.isAtLeast( "9" ) )
+        {
+            content = readFile( argfileFile, StandardCharsets.UTF_8 );
+        }
+        else
+        {
+            content = readFile( argfileFile, Charset.defaultCharset() );
+        }
+        assertTrue( content.contains( "Appäöüß" ) );
+
+        File apidocs = new File( getBasedir(), "target/test/unit/argfileumlautencoding-test/target/site/apidocs" );
+
+        // package level generated javadoc files
+        assertTrue( new File( apidocs, "argfileumlautencoding/test/Appäöüß.html" ).exists() );
+        assertTrue( new File( apidocs, "argfileumlautencoding/test/AppSample.html" ).exists() );
+
+        // project level generated javadoc files
+        assertTrue( new File( apidocs, "index-all.html" ).exists() );
+        assertTrue( new File( apidocs, "index.html" ).exists() );
+        assertTrue( new File( apidocs, "overview-tree.html" ).exists() );
+        assertTrue( new File( apidocs, "stylesheet.css" ).exists() );
+
+        if ( JavaVersion.JAVA_VERSION.isBefore( "10" ) )
+        {
+            assertTrue( new File( apidocs, "package-list" ).exists() );
+        }
+        else
+        {
+            assertTrue( new File( apidocs, "element-list" ).exists() );
+        }
+    }
+
+    /**
      * @throws Exception if any
      */
     public void testExceptions()
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/stubs/ArgfileUmlautEncodingMavenProjectStub.java b/src/test/java/org/apache/maven/plugins/javadoc/stubs/ArgfileUmlautEncodingMavenProjectStub.java
new file mode 100644
index 0000000..3831839
--- /dev/null
+++ b/src/test/java/org/apache/maven/plugins/javadoc/stubs/ArgfileUmlautEncodingMavenProjectStub.java
@@ -0,0 +1,80 @@
+package org.apache.maven.plugins.javadoc.stubs;
+
+/*
+ * 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.stubs.MavenProjectStub;
+import org.apache.maven.model.Scm;
+import org.apache.maven.model.Build;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+public class ArgfileUmlautEncodingMavenProjectStub
+    extends MavenProjectStub
+{
+   private Scm scm;
+
+    public ArgfileUmlautEncodingMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "argfileumlautencoding-test-plugin-config.xml" ) );
+
+        setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
+        setArtifactId( "argfileumlautencoding-test" );
+        setVersion( "1.0-SNAPSHOT" );
+        setName( "Maven Javadoc Plugin Argfile Umlaut Encoding Test" );
+        setUrl( "http://maven.apache.org" );
+        setPackaging( "jar" );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        Build build = new Build();
+        build.setFinalName( "argfileumlautencoding-test" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/argfileumlautencoding-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<>();
+        compileSourceRoots.add( getBasedir() + "/argfileumlautencoding/test" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/argfileumlautencoding-test" );
+    }
+}
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/stubs/OptionsUmlautEncodingMavenProjectStub.java b/src/test/java/org/apache/maven/plugins/javadoc/stubs/OptionsUmlautEncodingMavenProjectStub.java
new file mode 100644
index 0000000..a38d7ce
--- /dev/null
+++ b/src/test/java/org/apache/maven/plugins/javadoc/stubs/OptionsUmlautEncodingMavenProjectStub.java
@@ -0,0 +1,80 @@
+package org.apache.maven.plugins.javadoc.stubs;
+
+/*
+ * 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.stubs.MavenProjectStub;
+import org.apache.maven.model.Scm;
+import org.apache.maven.model.Build;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+public class OptionsUmlautEncodingMavenProjectStub
+    extends MavenProjectStub
+{
+   private Scm scm;
+
+    public OptionsUmlautEncodingMavenProjectStub()
+    {
+        readModel( new File( getBasedir(), "optionsumlautencoding-test-plugin-config.xml" ) );
+
+        setGroupId( "org.apache.maven.plugins.maven-javadoc-plugin.unit" );
+        setArtifactId( "optionsumlautencoding-test" );
+        setVersion( "1.0-SNAPSHOT" );
+        setName( "Maven Javadoc Plugin Options Umlaut Encoding Test" );
+        setUrl( "http://maven.apache.org" );
+        setPackaging( "jar" );
+
+        Scm scm = new Scm();
+        scm.setConnection( "scm:svn:http://svn.apache.org/maven/sample/trunk" );
+        setScm( scm );
+
+        Build build = new Build();
+        build.setFinalName( "optionsumlautencoding-test" );
+        build.setDirectory( super.getBasedir() + "/target/test/unit/optionsumlautencoding-test/target" );
+        setBuild( build );
+
+        List<String> compileSourceRoots = new ArrayList<>();
+        compileSourceRoots.add( getBasedir() + "/optionsumlautencoding/test" );
+        setCompileSourceRoots( compileSourceRoots );
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public Scm getScm()
+    {
+        return scm;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void setScm( Scm scm )
+    {
+        this.scm = scm;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public File getBasedir()
+    {
+        return new File( super.getBasedir() + "/src/test/resources/unit/optionsumlautencoding-test" );
+    }
+}
diff --git a/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding-test-plugin-config.xml b/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding-test-plugin-config.xml
new file mode 100644
index 0000000..c086c19
--- /dev/null
+++ b/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding-test-plugin-config.xml
@@ -0,0 +1,72 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+  <artifactId>argfileumlautencoding-test</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <inceptionYear>2006</inceptionYear>
+  <name>Maven Javadoc Plugin Organization Umlaut Encoding Test</name>
+  <url>http://maven.apache.org</url>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <project implementation="org.apache.maven.plugins.javadoc.stubs.ArgfileUmlautEncodingMavenProjectStub"/>
+          <localRepository>${localRepository}</localRepository>
+          <outputDirectory>${basedir}/target/test/unit/argfileumlautencoding-test/target/site/apidocs</outputDirectory>
+          <javadocOptionsDir>${basedir}/target/test/unit/argfileumlautencoding-test/target/javadoc-bundle-options</javadocOptionsDir>
+          <breakiterator>false</breakiterator>
+          <old>false</old>
+          <show>protected</show>
+          <quiet>true</quiet>
+          <verbose>false</verbose>
+          <author>true</author>
+          <encoding>UTF-8</encoding>
+          <docfilessubdirs>false</docfilessubdirs>
+          <linksource>false</linksource>
+          <nocomment>false</nocomment>
+          <nodeprecated>false</nodeprecated>
+          <nodeprecatedlist>false</nodeprecatedlist>
+          <nohelp>false</nohelp>
+          <noindex>false</noindex>
+          <nonavbar>false</nonavbar>
+          <nosince>false</nosince>
+          <notree>false</notree>
+          <serialwarn>false</serialwarn>
+          <splitindex>false</splitindex>
+          <stylesheet>java</stylesheet>
+          <groups/>
+          <tags/>
+          <use>true</use>
+          <version>true</version>
+          <windowtitle>Maven Javadoc Plugin Argfile Umlaut Encoding Test 1.0-SNAPSHOT API</windowtitle>
+          <debug>true</debug>
+          <failOnError>true</failOnError>
+          <detectJavaApiLink>true</detectJavaApiLink>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding/test/AppSample.java b/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding/test/AppSample.java
new file mode 100644
index 0000000..b5e5ed8
--- /dev/null
+++ b/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding/test/AppSample.java
@@ -0,0 +1,39 @@
+package argfileumlautencoding.test;
+
+/*
+ * 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 Maria Odea Ching
+ * @since 1.4
+ * @version %I%, %G%
+ */
+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
diff --git "a/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding/test/App\303\244\303\266\303\274\303\237.java" "b/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding/test/App\303\244\303\266\303\274\303\237.java"
new file mode 100644
index 0000000..f2f2912
--- /dev/null
+++ "b/src/test/resources/unit/argfileumlautencoding-test/argfileumlautencoding/test/App\303\244\303\266\303\274\303\237.java"
@@ -0,0 +1,36 @@
+package argfileumlautencoding.test;
+
+/*
+ * 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.
+ */
+
+public class Appäöüß
+{
+
+    public static void main( String[] args )
+    {
+        System.out.println( "Sample Application." );
+    }
+
+
+    protected void sampleMethod( String str )
+    {
+        System.out.println( str );
+    }
+
+}
\ No newline at end of file
diff --git a/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml
new file mode 100644
index 0000000..eed07c7
--- /dev/null
+++ b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml
@@ -0,0 +1,73 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.maven-javadoc-plugin.unit</groupId>
+  <artifactId>optionsumlautencoding-test</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <inceptionYear>2006</inceptionYear>
+  <name>Maven Javadoc Plugin Options Umlaut Encoding Test</name>
+  <url>http://maven.apache.org</url>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <project implementation="org.apache.maven.plugins.javadoc.stubs.OptionsUmlautEncodingMavenProjectStub"/>
+          <localRepository>${localRepository}</localRepository>
+          <outputDirectory>${basedir}/target/test/unit/optionsumlautencoding-test/target/site/apidocs</outputDirectory>
+          <javadocOptionsDir>${basedir}/target/test/unit/optionsumlautencoding-test/target/javadoc-bundle-options</javadocOptionsDir>
+          <breakiterator>false</breakiterator>
+          <old>false</old>
+          <show>protected</show>
+          <quiet>true</quiet>
+          <verbose>false</verbose>
+          <author>true</author>
+          <encoding>ISO-8859-1</encoding>
+          <docfilessubdirs>false</docfilessubdirs>
+          <linksource>false</linksource>
+          <nocomment>false</nocomment>
+          <nodeprecated>false</nodeprecated>
+          <nodeprecatedlist>false</nodeprecatedlist>
+          <nohelp>false</nohelp>
+          <noindex>false</noindex>
+          <nonavbar>false</nonavbar>
+          <nosince>false</nosince>
+          <notree>false</notree>
+          <serialwarn>false</serialwarn>
+          <splitindex>false</splitindex>
+          <stylesheet>java</stylesheet>
+          <groups/>
+          <tags/>
+          <use>true</use>
+          <version>true</version>
+          <!-- include umlauts in windowtitle which are written to options-file -->
+          <windowtitle>Maven Javadoc Plugin Options Umlaut Encoding ö ä ü ß Test 1.0-SNAPSHOT API</windowtitle>
+          <debug>true</debug>
+          <failOnError>true</failOnError>
+          <detectJavaApiLink>true</detectJavaApiLink>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding/test/App.java b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding/test/App.java
new file mode 100644
index 0000000..ad8447b
--- /dev/null
+++ b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding/test/App.java
@@ -0,0 +1,36 @@
+package optionsumlautencoding.test;
+
+/*
+ * 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.
+ */
+
+public class App
+{
+
+    public static void main( String[] args )
+    {
+        System.out.println( "Sample Application." );
+    }
+
+
+    protected void sampleMethod( String str )
+    {
+        System.out.println( str );
+    }
+
+}
\ No newline at end of file
diff --git a/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding/test/AppSample.java b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding/test/AppSample.java
new file mode 100644
index 0000000..dcae2e3
--- /dev/null
+++ b/src/test/resources/unit/optionsumlautencoding-test/optionsumlautencoding/test/AppSample.java
@@ -0,0 +1,39 @@
+package optionsumlautencoding.test;
+
+/*
+ * 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 Maria Odea Ching
+ * @since 1.4
+ * @version %I%, %G%
+ */
+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