Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1023

Report generation fails with StringIndexOutOfBoundsException

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.15
    • Fix Version/s: 2.18
    • Labels:
      None
    • Environment:
      Linux with Maven 3.0.5

      Description

      When Maven generating report for big project (3K+ junit tests) getting the following error:

       [exec] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15:report (default-cli) on project ana_classes: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15:report failed: String index out of range: -1 -> [Help 1]
           [exec] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15:report (default-cli) on project ana_classes: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15:report failed: String index out of range: -1
           [exec] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
           [exec] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
           [exec] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
           [exec] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
           [exec] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
           [exec] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
           [exec] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
           [exec] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
           [exec] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
           [exec] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
           [exec] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
           [exec] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
           [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           [exec] 	at java.lang.reflect.Method.invoke(Method.java:597)
           [exec] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
           [exec] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
           [exec] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
           [exec] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
           [exec] Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15:report failed: String index out of range: -1
           [exec] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
           [exec] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
           [exec] 	... 19 more
           [exec] Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
           [exec] 	at java.lang.String.substring(String.java:1937)
           [exec] 	at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.getErrorLineNumber(SurefireReportGenerator.java:677)
           [exec] 	at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.constructFailureDetails(SurefireReportGenerator.java:640)
           [exec] 	at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:104)
           [exec] 	at org.apache.maven.plugins.surefire.report.AbstractSurefireReportMojo.executeReport(AbstractSurefireReportMojo.java:184)
           [exec] 	at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
           [exec] 	at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:99)
           [exec] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
           [exec] 	... 20 more
      

        Attachments

          Activity

            People

            • Assignee:
              agudian Andreas Gudian
              Reporter:
              pavel.orehov Pavel Orehov

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment