Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-679

"Unable to compute stale date" in a directory with accent characters (charset issue)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.3.0
    • 3.3.1
    • javadoc
    • None
    • Windows 10 64 bits
      OpenJDK 16
      Apache Maven 3.6.3
    • Important

    Description

      Following: https://issues.apache.org/jira/browse/MJAVADOC-614
      I am still not able to generate the Javadoc on my environment because of an accent in a directory name.

      > pwd
      D:\é\foo
      > mvn -e clean javadoc:javadoc
      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------< foo:foo >-------------------------------
      [INFO] Building foo 1.0.0-SNAPSHOT
      [INFO] --------------------------------[ jar ]---------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ foo ---
      [INFO]
      [INFO] >>> maven-javadoc-plugin:3.3.0:javadoc (default-cli) > generate-sources @ foo >>>
      [INFO]
      [INFO] <<< maven-javadoc-plugin:3.3.0:javadoc (default-cli) < generate-sources @ foo <<<
      [INFO]
      [INFO]
      [INFO] --- maven-javadoc-plugin:3.3.0:javadoc (default-cli) @ foo ---
      [ERROR] Error fetching link: D:\é\foo\target\javadoc-bundle-options. Ignored it.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  1.323 s
      [INFO] Finished at: 2021-05-31T10:38:21+02:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.0:javadoc (default-cli) on project foo: An error has occurred in Javadoc report generation: Unable to compute stale date: Input length = 1 -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.0:javadoc (default-cli) on project foo: An error has occurred in Javadoc report generation: Unable to compute stale date
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:567)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Javadoc report generation: Unable to compute stale date
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.failOnError (AbstractJavadocMojo.java:7038)
          at org.apache.maven.plugins.javadoc.JavadocReport.doExecute (JavadocReport.java:328)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute (AbstractJavadocMojo.java:2010)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:567)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: org.apache.maven.reporting.MavenReportException: Unable to compute stale date
          at org.apache.maven.plugins.javadoc.StaleHelper.getStaleData (StaleHelper.java:115)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.isUpToDate (AbstractJavadocMojo.java:5947)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeJavadocCommandLine (AbstractJavadocMojo.java:5923)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport (AbstractJavadocMojo.java:2253)
          at org.apache.maven.plugins.javadoc.JavadocReport.generate (JavadocReport.java:135)
          at org.apache.maven.plugins.javadoc.JavadocReport.doExecute (JavadocReport.java:324)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute (AbstractJavadocMojo.java:2010)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:567)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: java.nio.charset.MalformedInputException: Input length = 1
          at java.nio.charset.CoderResult.throwException (CoderResult.java:274)
          at sun.nio.cs.StreamDecoder.implRead (StreamDecoder.java:352)
          at sun.nio.cs.StreamDecoder.read (StreamDecoder.java:188)
          at java.io.InputStreamReader.read (InputStreamReader.java:178)
          at java.io.BufferedReader.fill (BufferedReader.java:161)
          at java.io.BufferedReader.readLine (BufferedReader.java:329)
          at java.io.BufferedReader.readLine (BufferedReader.java:396)
          at java.nio.file.Files.readAllLines (Files.java:3399)
          at org.apache.maven.plugins.javadoc.StaleHelper.getStaleData (StaleHelper.java:67)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.isUpToDate (AbstractJavadocMojo.java:5947)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeJavadocCommandLine (AbstractJavadocMojo.java:5923)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.executeReport (AbstractJavadocMojo.java:2253)
          at org.apache.maven.plugins.javadoc.JavadocReport.generate (JavadocReport.java:135)
          at org.apache.maven.plugins.javadoc.JavadocReport.doExecute (JavadocReport.java:324)
          at org.apache.maven.plugins.javadoc.AbstractJavadocMojo.execute (AbstractJavadocMojo.java:2010)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:78)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:567)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      [ERROR]
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
      
      > pwd
      D:\foo
      > mvn -e clean javadoc:javadoc
      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO]
      [INFO] ------------------------------< foo:foo >-------------------------------
      [INFO] Building foo 1.0.0-SNAPSHOT
      [INFO] --------------------------------[ jar ]---------------------------------
      [INFO]
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ foo ---
      [INFO]
      [INFO] >>> maven-javadoc-plugin:3.3.0:javadoc (default-cli) > generate-sources @ foo >>>
      [INFO]
      [INFO] <<< maven-javadoc-plugin:3.3.0:javadoc (default-cli) < generate-sources @ foo <<<
      [INFO]
      [INFO]
      [INFO] --- maven-javadoc-plugin:3.3.0:javadoc (default-cli) @ foo ---
      [ERROR] Error fetching link: D:\foo\target\javadoc-bundle-options. Ignored it.
      [INFO] No previous run data found, generating javadoc.
      [INFO]
      Loading source file D:\foo\src\main\java\foo\Foo.java...
      Constructing Javadoc information...
      Building index for all the packages and classes...
      Standard Doclet version 16+36
      Building tree for all the packages and classes...
      Generating D:\foo\target\site\apidocs\foo\Foo.html...
      Generating D:\foo\target\site\apidocs\foo\package-summary.html...
      Generating D:\foo\target\site\apidocs\foo\package-tree.html...
      Generating D:\foo\target\site\apidocs\foo\class-use\Foo.html...
      Generating D:\foo\target\site\apidocs\foo\package-use.html...
      Generating D:\foo\target\site\apidocs\overview-tree.html...
      Building index for all classes...
      Generating D:\foo\target\site\apidocs\allclasses-index.html...
      Generating D:\foo\target\site\apidocs\allpackages-index.html...
      Generating D:\foo\target\site\apidocs\index-all.html...
      Generating D:\foo\target\site\apidocs\index.html...
      Generating D:\foo\target\site\apidocs\help-doc.html...
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  2.387 s
      [INFO] Finished at: 2021-05-31T10:56:16+02:00
      [INFO] ------------------------------------------------------------------------
      

      https://github.com/apache/maven-javadoc-plugin/blob/08510c2a5ae17a7e7eb434c55855e5752e198b23/src/main/java/org/apache/maven/plugins/javadoc/StaleHelper.java#L67

      Both "argfile" and "options" are in ANSI and not in UTF-8.

      Attachments

        1. project.zip
          2 kB
          Alexis Jehan
        2. argfile
          0.0 kB
          Alexis Jehan
        3. options
          0.3 kB
          Alexis Jehan

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rfscholte Robert Scholte
            alexisj Alexis Jehan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment