Maven依赖性问题
我在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, bind:jaxbxjc:jar:2.1.070125.1,org.apache:mina:jar:1.1.7, bind:jaxb impl:jar:2.1.070125.1,org.apache:ahc:jar:1.1, bind:jaxb1 impl:jar:2.1.070125.1:找不到工件 com.springsource.org:junit:jar:4.8.1 下面是我的Maven依赖性问题,maven,dependencies,Maven,Dependencies,我在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, bind:jaxbxjc:jar:2.1.
pom.xml文件
<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.0.0
com.host.bulls.cassandra
卡桑德拉客户机
0.0.1-快照
罐子
卡桑德拉客户机
http://maven.apache.org
UTF-8
中心的
马文中央回购
http://repo1.maven.org/maven2
里普塔诺
里普塔诺
http://mvn.riptano.com/content/repositories/public
maven.scale7.org
Scale7 Maven回购
https://github.com/s7/mvnrepo/raw/master
真的
朱尼特
朱尼特
3.8.1
测试
com.netflix.astyanax
阿斯蒂亚纳克斯
1.56.37
org.jboss.netty
内蒂
org.scale7
鳞片7
1.3-1.1.x
com.host.kernel
核变性
1.13.1
com.datasax.cassandra
卡桑德拉驱动核心
1.0.0-beta2
有人能帮我解决这个问题吗?谢谢从输出中,maven似乎找不到com.springsource.org:junit:jar:4.8.1依赖项—您需要的其他依赖项之一 通过快速检查,似乎依赖项com.host.kernel:kernelMerged:1.13.1可能会导致此问题,因为另一个以前没有springsource作为可传递依赖项,我无法用您的配置解决kernelMerged com.springsource库位于springsource repo中。因此,您可以检查kernelMerged依赖项和他的repo配置,并尝试将springsource repo添加到您的pom中 看
com.springsource.repository.bundles.release
SpringSource企业捆绑包存储库-SpringSource捆绑包版本
http://repository.springsource.com/maven/bundles/release
com.springsource.repository.bundles.external
SpringSource企业捆绑包存储库-外部捆绑包版本
http://repository.springsource.com/maven/bundles/external
它应该告诉您导致缺少jar的依赖项的路径。这将出现在stdout列表中。你能找到它吗?你指的是什么?我只是在最后遇到了这个异常-[ERROR]未能在CassandraClient项目上执行目标:无法解析project com.host.bulls.cassandra:CassandraClient:jar:0.0.1-SNAPSHOT:无法解析以下工件: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:jar:2.1.1.070125.1,org.apache:ahc:1.1.1,bind:jaxb1 impl:jar:2.1.070125.1:在发行版中找不到工件com.springsource.org:junit:jar:4.8.1(http://nxraptor/content/repositories/releases)->[Help 1][
上面写着“依赖路径:”如图所示:大约下降了3/4。将会有几个这样的消息——每个丢失的罐子一条。出于某些原因,我没有收到这些消息。我不知道为什么会这样。有什么想法吗?
<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>