2

I just started to evaluate Revapi and (since I plan on using it in all our projects if all goes well) I put it into a general Maven pom project and added some integration tests to see if it works:

<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>

However I get the following exception no matter if I start the build of the surrounding pom or if I start the project build directly:

[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]

or

[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 suggests that the problem might be the space in the file name (but spaces in pathes are so common these days that surely someone else must have had the same problem, yet Google finds nothing).

I would just change the Java version, but I don't get where the revapi actually gets it from. If I start it from Eclipse the IDE uses update 20, the command line uses update 92, yet the exception always is about update 73.

How do I fix this?

Community
  • 1
  • 1
Stefan S.
  • 3,950
  • 5
  • 25
  • 77
  • The Java version should be the same as the one Maven uses for the build. – metlos Dec 20 '16 at 01:55
  • The spaces should be correctly handled in revapi-java-0.12.0 and up (when they're released ;) ). – metlos Dec 20 '16 at 03:22
  • @metlos No, it doesn't take the same Java. It takes the Java from `JAVA_HOME`. And thanks, I'll try the new version when it's released. – Stefan S. Dec 20 '16 at 06:41

0 Answers0