开发者

Different dependency list for same pom/workspace

开发者 https://www.devze.com 2023-03-22 18:36 出处:网络
Anyone any idea why on 2 different PC\'s who have the exact same workspace (same projects/pom\'s), same maven version, same OS,... same anything that might matter, running mvn dependency:list (or tree

Anyone any idea why on 2 different PC's who have the exact same workspace (same projects/pom's), same maven version, same OS, ... same anything that might matter, running mvn dependency:list (or tree) returns a different result?

The actual difference concerns a transitive dependency which on PC A is added to the classpath 开发者_StackOverflow(and therefore to the dependency-list) and on PC B: not).

UPDATE:

Actually, the problems seems to be restricted to Apache CXF dependencies; almost all their transitive dependencies are missing on PC B.


SOLVED

The problem was related to the java version. Everything was setup for java 5 but Maven itself was running in Java 6. In general this is not a problem but the missing cxf dependencies are included in a profile section of cxf-rt-frontend-jaxws:

<profile>
    <id>jdk15</id>
    <activation>
        <jdk>1.5</jdk>
    </activation>
    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-activation_1.1_spec</artifactId>
        </dependency>
...

So, these dependencies are only added when running Maven in 1.5. Setting the JAVA_HOME to 1.5 solved the issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消