Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法解析包依赖项org.codehaus.jettison.json_Java_Maven_Dependencies - Fatal编程技术网

Java 无法解析包依赖项org.codehaus.jettison.json

Java 无法解析包依赖项org.codehaus.jettison.json,java,maven,dependencies,Java,Maven,Dependencies,谁能解释一下下面的错误是什么意思?我怎样才能修好它 The package dependency org.codehaus.jettison.json with the version greater than or equal to 1.3.0 required by bundle com.hosyt.astyanax.astyanax_1.0.13 cannot be resolved. 我与Maven合作,并与Cassandra一起使用Astyanax客户端 下面是我的pom.xml文件

谁能解释一下下面的错误是什么意思?我怎样才能修好它

The package dependency org.codehaus.jettison.json with the version greater than or equal to 1.3.0 required by bundle com.hosyt.astyanax.astyanax_1.0.13 cannot be resolved.
我与Maven合作,并与Cassandra一起使用Astyanax客户端

下面是我的
pom.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<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">

    <!-- 1. Parent POM information Most of shared sections/configurations between 
        projects are inherited from parent pom. The shared sections are distributionManagement, 
        repositories, pluginRepositories, PluginManagement, Plugins 2. Switch this 
        to the project-specific aggregator pom -->
    <parent>
        <groupId>com.host.raptor</groupId>
        <artifactId>RaptorParent</artifactId>
        <version>1.6.0-RELEASE</version>
    </parent>

    <!-- POM Information about the Project -->
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.host.bulls.integ</groupId>
    <artifactId>BullsDAO</artifactId>
    <version>2.0.1-SNAPSHOT</version>
    <!-- Packing Type is bundle for OSGI Library Bundle -->
    <packaging>bundle</packaging>

    <dependencies>
        <dependency>
            <groupId>org.apache.cassandra</groupId>
            <artifactId>cassandra-all</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>com.host.astyanax</groupId>
            <artifactId>astyanax</artifactId>
            <version>1.0.13</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.cassandra</groupId>
                    <artifactId>cassandra-all</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.jettison</groupId>
                    <artifactId>jettison</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <version>1.3</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.host.bulls.shared</groupId>
            <artifactId>BullsShared</artifactId>
            <version>1.1.1</version>
        </dependency>
    </dependencies>

    <!-- Build Configration -->
    <build>
        <plugins>
            <!-- Apache Felix Bundle Plugin - For Generation of Manifest after Compile 
                phase -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <!-- Configuration for generating the Manifest.mf -->
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <!-- Configuration for generating the Manifest.mf -->
                <configuration>
                    <manifestLocation>src/main/resources/META-INF</manifestLocation>
                    <!-- Manifest Headers which need to customized during manifest generation -->
                    <instructions>
                        <Bundle-SymbolicName>com.host.bulls.integ.BullsDAO</Bundle-SymbolicName>
                        <!-- <Export-Package></Export-Package> -->
                        <Import-Package>*,
                            org.springframework.beans.factory;version="[3.0.5.RELEASE,4.0.0)",
                            org.springframework.beans.factory.config;version="[3.0.5.RELEASE,4.0.0)",
                            net.sf.cglib.core;version="[2.1.3,3.0.0)",
                            net.sf.cglib.proxy;version="[2.1.3,3.0.0)",
                            net.sf.cglib.reflect;version="[2.1.3,3.0.0)"
                        </Import-Package>
                        <!-- <X-Raptor-Pipeline-Handler></X-Raptor-Pipeline-Handler> -->
                        <!-- <X-Raptor-Initializer></X-Raptor-Initializer> -->
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- Configuration of repositories for dependency resolution -->
    <repositories>
        <!-- Raptor Bundles Repository -->
        <!-- This is needed to locate the Raptor Parent project. Other repositories 
            come from the parent. -->

        <repository>
            <id>raptor.releases</id>
            <url>http://nxraptor/nexus/content/repositories/releases/</url>
            <releases />
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>releases</id>
            <url>http://nxraptor/content/repositories/releases/</url>
            <releases>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>thirdparty</id>
            <url>http://nxraptor/content/repositories/thirdparty/</url>
            <releases>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>host</id>
            <url>http://nxraptor.qa.host.com/content/repositories/thirdparty/</url>
            <releases />
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <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>
    </repositories>
</project>

猛禽
猛禽父母
1.6.0版本
4.0.0
com.host.bulls.integ
布尔斯多
2.0.1-快照
捆
org.apache.cassandra
卡桑德拉
1.1.2
com.host.astyanax
阿斯蒂亚纳克斯
1.0.13
org.apache.cassandra
卡桑德拉
org.codehaus.jettison
抛弃
org.codehaus.jettison
抛弃
1.3
朱尼特
朱尼特
3.8.1
测验
com.host.bulls.shared
牛股
1.1.1
org.apache.felix
maven捆绑插件
捆绑清单
进程类
显示
src/main/resources/META-INF
com.host.bulls.integ.BullsDAO
*,
org.springframework.beans.factory;version=“[3.0.5.发行版,4.0.0]”,
org.springframework.beans.factory.config;version=“[3.0.5.RELEASE,4.0.0]”,
net.sf.cglib.core;version=“[2.1.3,3.0.0]”,
net.sf.cglib.proxy;version=“[2.1.3,3.0.0]”,
net.sf.cglib.reflect;version=“[2.1.3,3.0.0)”
猛禽释放
http://nxraptor/nexus/content/repositories/releases/
错误的
释放
http://nxraptor/content/repositories/releases/
错误的
第三方
http://nxraptor/content/repositories/thirdparty/
错误的
主办
http://nxraptor.qa.host.com/content/repositories/thirdparty/
错误的
中心的
马文中央回购
http://repo1.maven.org/maven2
里普塔诺
里普塔诺
http://mvn.riptano.com/content/repositories/public

这意味着com.hosyt.astyanax.astyanax_1.0.13取决于org.codehaus。抛弃:抛弃版本1.3.0或更高版本,但找不到。您的pom包括版本1.3,但Maven确定1.3早于1.3.0。请尝试将其更改为

<dependency>
    <groupId>org.codehaus.jettison</groupId>
    <artifactId>jettison</artifactId>
    <version>1.3.1</version>
</dependency>

org.codehaus.jettison
抛弃
1.3.1

(假设您的项目与1.3.1兼容)

这意味着com.hosyt.astyanax.astyanax_1.0.13依赖于org.codehaus.jettison:jettison版本1.3.0或更高版本,但找不到。您的pom包括版本1.3,但Maven确定1.3早于1.3.0。请尝试将其更改为

<dependency>
    <groupId>org.codehaus.jettison</groupId>
    <artifactId>jettison</artifactId>
    <version>1.3.1</version>
</dependency>

org.codehaus.jettison
抛弃
1.3.1

(假设您的项目与1.3.1兼容)

只是猜测(因为我无法检查这一点,因为存在非公共工件):将抛弃依赖项移到astyanax依赖项之前-因为它似乎适用于您也排除的cassandra all依赖项。在我看来,Maven似乎在知道后面的声明之前尝试解决可传递的astyanax依赖项。

只是一个猜测(因为我无法检查这一点,因为存在非公共工件):将抛弃依赖项移到astyanax依赖项之前-因为它似乎适用于您也排除的cassandra all依赖项。在我看来,Maven似乎在知道后面的声明之前尝试解决可传递的astyanax依赖项。

Android的gradle依赖项

implementation ('com.thoughtworks.xstream:xstream:1.4.9') {
    exclude group: 'xmlpull', module: 'xmlpull'
}

implementation 'com.github.codehaus:jettison:jettison-1.3.7'

Android的渐变依赖性

implementation ('com.thoughtworks.xstream:xstream:1.4.9') {
    exclude group: 'xmlpull', module: 'xmlpull'
}

implementation 'com.github.codehaus:jettison:jettison-1.3.7'

是的,我也试过了。还是我犯的同样的错误。还有其他想法吗?@arsenal:如果你仍然犯同样的错误,那么你是如何接受这个答案的?是的,我也试过了。还是我犯的同样的错误。还有其他想法吗?@arsenal:如果你仍然犯同样的错误,那么你是如何接受这个答案的