我刚开始评估Revapi和(因为我计划在所有项目中使用它,如果一切顺利的话)我将它放入一般的Maven pom项目并添加一些集成测试以查看它是否有效:
<build>
<plugins>
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>0.7.0</version>
<dependencies>
<dependency>
<groupId>org.revapi</groupId>
<artifactId>revapi-java</artifactId>
<version>0.11.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>revapi-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<configuration>
<oldVersion>${xwiki.compatibility.previous.version}</oldVersion>
<skip>${xwiki.revapi.skip}</skip>
</configuration>
</plugin>
</plugins>
</build>
然而,无论我是否开始构建周围的pom,或者我是否直接启动项目构建,我都会得到以下异常:
[ERROR] Failed to execute goal org.revapi:revapi-maven-plugin:0.7.0:check (revapi-check) on project org.acme.test: Failed to analyze archives: Failed to obtain class tree due to compilation failure. java.lang.IllegalArgumentException: Illegal character in path at index 16: file:/C:/Program Files (x86)/Java/jdk1.8.0_73/lib/ct.sym!/META-INF/sym/rt.jar/java/lang/Object.class -> [Help 1]
或
[ERROR] Failed to execute goal org.revapi:revapi-maven-plugin:0.7.0:check (revapi-check) on project org.acme.test: Failed to analyze archives: Failed to obtain class tree due to compilation failure. java.lang.IllegalArgumentException: Illegal character in path at index 16: file:/C:/Program Files (x86)/Java/jdk1.8.0_73/lib/ct.sym!/META-INF/sym/rt.jar/java/lang/String.class -> [Help 1]
This question表明问题可能是文件名中的空格(但是这些日子里的空格很常见,以至于其他人肯定会遇到同样的问题,但谷歌一无所获)。
我只是改变Java版本,但我没有得到revapi实际上从中得到它的地方。如果我从Eclipse启动它,IDE使用更新20,命令行使用更新92,但异常总是关于更新73.
我该如何解决这个问题?