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
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: maven2 jxr plugin
    • Labels:
      None
    • Environment:
      windows xp

      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

        rudi grasmuck created issue -
        Brett Porter made changes -
        Field Original Value New Value
        Fix Version/s 2.0 [ 12480 ]
        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
        Jesse McConnell made changes -
        Resolution Fixed [ 1 ]
        Assignee Jesse McConnell [ jesse ]
        Status Open [ 1 ] Closed [ 6 ]
        Brett Porter made changes -
        Project Maven 2.x JXR Plugin [ 11194 ] Maven JXR [ 11085 ]
        Fix Version/s 2.0 [ 12480 ]
        Key MJXR-11 JXR-43
        Brett Porter made changes -
        Fix Version/s 2.0 [ 13350 ]
        Dennis Lundberg made changes -
        Component/s maven2 jxr plugin [ 12711 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 10:32:48 UTC 2015 [ 1428229968272 ]
        Mark Thomas made changes -
        Workflow jira [ 12722101 ] Default workflow, editable Closed status [ 12748966 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 00:07:28 UTC 2015 [ 1428278848796 ]
        Mark Thomas made changes -
        Workflow jira [ 12959679 ] Default workflow, editable Closed status [ 12996802 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        12d 19h 17m 1 Jesse McConnell 11/May/06 00:30

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development