Maven发出错误:"字符串索引超出范围:0"

时间:2014-03-24 20:54:11

标签: java eclipse maven enunciate tinkerpop

当我使用mvn eclipse:eclipse构建我的Maven项目或生成我的eclipse配置时,我收到以下错误:

[ERROR] Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.28:docs (default) on project appserver-server: Problem assembling the enunciate app. String index out of range: 0 -> [Help 1]

我已将问题隔离到单个依赖项:

<dependency>
    <groupId>com.tinkerpop.blueprints</groupId>
    <artifactId>blueprints-neo4j-graph</artifactId>
    <version>2.4.0</version>
</dependency>

我需要这种依赖,所以摆脱它不是一个选项,但为什么这会导致出现错误?有什么方法可以解决这个问题吗?

编辑:经过一些进一步的测试后,问题的根源可能来自前一个依赖关系的依赖关系的依赖关系:

<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-library</artifactId>
    <version>2.10.4</version>
</dependency>

完整错误:

[ERROR] Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.28:docs (default) on project appserver-server: Problem assembling the enunciate app. String index out of range: 0 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.enunciate:maven-enunciate-plugin:1.28:docs (default) on project appserver-server: Problem assembling the enunciate app.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:364)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:198)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Problem assembling the enunciate app.
    at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:100)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 23 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(String.java:658)
    at org.codehaus.enunciate.main.ImportedClassesClasspathHandler.handleResource(ImportedClassesClasspathHandler.java:55)
    at org.codehaus.enunciate.main.Enunciate.scanClasspath(Enunciate.java:462)
    at org.codehaus.enunciate.main.Enunciate.doGenerate(Enunciate.java:355)
    at org.codehaus.enunciate.ConfigMojo$MavenSpecificEnunciate.doGenerate(ConfigMojo.java:670)
    at org.codehaus.enunciate.main.Enunciate$Stepper.step(Enunciate.java:1799)
    at org.codehaus.enunciate.main.Enunciate$Stepper.stepTo(Enunciate.java:1831)
    at org.codehaus.enunciate.DocsMojo.execute(DocsMojo.java:96)
    ... 25 more

1 个答案:

答案 0 :(得分:1)

是的。报告并修复了here