Maven JXR
  1. Maven JXR
  2. JXR-43

long/complex destination directories for site cause a "String index out of range" error

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: maven2 jxr plugin
    • Labels:
      None
    • Environment:
      windows xp
    • Number of attachments :
      0

      Description

      If I setup the plugin as follows
      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>jxr-maven-plugin</artifactId>
      <configuration>
      <destDir>$

      {workspace.dir}

      /site/$

      {project.artifactId}/xref</destDir>
      </configuration>
      </plugin>
      where the destDir variables resolve to "C:\projects\FNBTestAgain3\site\rasonlineswift\xref"
      I get
      Embedded error: Error while generating the HTML source code of the projet.
      String index out of range: -3
      If i use relative indicators
      <destDir>../../site/${project.artifactId}

      /xref</destDir> which in effect points to the same directory it works fine

      full exception below:

      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Error during report gene
      ration
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:559)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
      fecycle(DefaultLifecycleExecutor.java:475)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:454)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:306)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:273)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:140)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Error during report g
      eneration
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:389)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:412)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:534)
      ... 16 more
      Caused by: org.apache.maven.reporting.MavenReportException: Error while generati
      ng the HTML source code of the projet.
      at org.apache.maven.plugin.jxr.JxrReport.generateXrefForSources(JxrRepor
      t.java:202)
      at org.apache.maven.plugin.jxr.JxrReport.executeReport(JxrReport.java:16
      5)
      at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMaven
      Report.java:117)
      at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.
      java:802)
      at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
      ... 18 more
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:
      -3
      at java.lang.String.substring(String.java:1444)
      at java.lang.String.substring(String.java:1411)
      at org.apache.maven.plugin.jxr.JxrReport.generateXrefForSources(JxrRepor
      t.java:195)

        Activity

        Hide
        Jesse McConnell added a comment -

        looks like this was refactored away sometime ago, the path is now going into maven/jxr and is no longer resolved in this plugin

        Show
        Jesse McConnell added a comment - looks like this was refactored away sometime ago, the path is now going into maven/jxr and is no longer resolved in this plugin

          People

          • Assignee:
            Jesse McConnell
            Reporter:
            rudi grasmuck
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: