0

我正在使用 Maven 项目,最后我得到以下异常-

无法解析以下工件:com.springsource.org:junit:jar:4.8.1, com.springsource.com.mysql:jdbc:jar:5.1.6, org.apache.geronimo.ext.tomcat:util: jar:7.0.0.2, ucirrus:ucirrus:jar:1.1.0, com.springsource.org:jdom:jar:1.0.0, com.sun.xml.bind:jaxb-xjc:jar:2.1.070125.1, org. apache:mina:jar:1.1.7, com.sun.xml.bind:jaxb-impl:jar:2.1.070125.1, org.apache:ahc:jar:1.1, com.sun.xml.bind:jaxb1-impl: jar:2.1.070125.1:在版本中找不到工件 com.springsource.org:junit:jar:4.8.1

下面是我的pom.xml file

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.host.bulls.cassandra</groupId>
    <artifactId>CassandraClient</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>CassandraClient</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>central</id>
            <name>Maven Central Repo</name>
            <url>http://repo1.maven.org/maven2</url>
        </repository>
        <repository>
            <id>riptano</id>
            <name>riptano</name>
            <url>http://mvn.riptano.com/content/repositories/public</url>
        </repository>
        <repository>
            <id>maven.scale7.org</id>
            <name>Scale7 Maven Repo</name>
            <url>https://github.com/s7/mvnrepo/raw/master</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.netflix.astyanax</groupId>
            <artifactId>astyanax</artifactId>
            <version>1.56.37</version>

            <exclusions>
                <exclusion>
                    <groupId>org.jboss.netty</groupId>
                    <artifactId>netty</artifactId>
                </exclusion>
            </exclusions>

        </dependency>
        <dependency>
            <groupId>org.scale7</groupId>
            <artifactId>scale7-pelops</artifactId>
            <version>1.3-1.1.x</version>
        </dependency>
        <dependency>
            <groupId>com.host.kernel</groupId>
            <artifactId>kernelMerged</artifactId>
            <version>1.13.1</version>
        </dependency>
        <dependency>
            <groupId>com.datastax.cassandra</groupId>
            <artifactId>cassandra-driver-core</artifactId>
            <version>1.0.0-beta2</version>
        </dependency>
    </dependencies>
</project>

谁能帮我解决这个问题?谢谢

4

1 回答 1

2

从输出看来,maven 找不到 com.springsource.org:junit:jar:4.8.1 依赖项,这是您需要的其他依赖项之一。

通过快速检查,似乎依赖项 com.host.kernel:kernelMerged:1.13.1 可能会导致此问题,因为另一个曾经没有 springsource 作为传递依赖项,我无法使用您的配置解决 kernelMerged 一个。

com.springsource 库位于 springsource 存储库中。那么您能否检查 kernelMerged 依赖项和他的 repo 配置并尝试将 springsource repo 添加到您的 pom.xml 中。

http://ebr.springsource.com/repository/app/faq

<repository>
    <id>com.springsource.repository.bundles.release</id>
    <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
    <url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
    <id>com.springsource.repository.bundles.external</id>
    <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
    <url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
于 2013-05-28T19:25:59.267 回答