English 中文(简体)
Eclipse Maven不把xpp3列入 com。
原标题:Eclipse Maven build failing on including xpp3 in com.google.android

我正试图用ven子建造一个 and子项目,但 like像 Q子类:

[INFO] /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java [-Xms256m, -Xmx512m, -jar, /Users/bry_m/code/android-sdk-macosx/platform-tools/lib/dx.jar, --dex, --output=/Users/bry_m/code/eclipse_workspace_2mar2012/maven.1331582410730/trunk/target/classes.dex, /Users/bry_m/code/eclipse_workspace_2mar2012/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/springframework/android/spring-android-rest-template/1.0.0.M2/spring-android-rest-template-1.0.0.M2.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/codehaus/jackson/jackson-mapper-asl/1.6.4/jackson-mapper-asl-1.6.4.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/json/json/20080701/json-20080701.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/com/google/android/android/2.3.1/android-2.3.1.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/commons-codec/commons-codec/1.3/commons-codec-1.3.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/codehaus/jackson/jackson-jaxrs/1.6.4/jackson-jaxrs-1.6.4.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/maven.1331582410730/trunk/target/classes, /Users/bry_m/code/eclipse_workspace_2mar2012/org/khronos/opengl-api/gl1.1-android-2.1_r1/opengl-api-gl1.1-android-2.1_r1.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/codehaus/jackson/jackson-core-asl/1.6.4/jackson-core-asl-1.6.4.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/org/twitter4j/twitter4j-core/2.2.6-SNAPSHOT/twitter4j-core-2.2.6-SNAPSHOT.jar, /Users/bry_m/code/eclipse_workspace_2mar2012/cocos2d_android/cocos2d_android/1.0.0-SNAPSHOT/cocos2d_android-1.0.0-SNAPSHOT.apklib, /Users/bry_m/code/eclipse_workspace_2mar2012/com/codeslap/android-facebook/1.5/android-facebook-1.5.jar]
[INFO] 
[INFO] trouble processing "javax/xml/namespace/QName.class":
[INFO] 
[INFO] Ill-advised or mistaken usage of a core class (java.* or javax.*)
[INFO] when not building a core library.

这个问题只有在我单独提交文件时才会发生:

    <dependency>
        <groupId>cocos2d_android</groupId>
        <artifactId>cocos2d_android</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <type>apklib</type>
    </dependency>

It appears the QName class only appears in my dependencies in the xpp3 jarfile which, as far as I can tell, only appears in this dependency:

<dependency>
    <groupId>com.google.android</groupId>
    <artifactId>android</artifactId>
    <version>${android-version}</version>
</dependency>

我试图利用排他性标签让Maven与Maven一起玩.,但我的项目中的代码正在使用Xmlpullparser级,因此,我在排除这一类别时没有发现错误。

我的完全依赖性名单如下:

<dependencies>
    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>${android-version}</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>${jacksonVersion}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.android</groupId>
        <artifactId>spring-android-rest-template</artifactId>
        <version>${spring-android-version}</version>
    </dependency>
     <dependency>
        <groupId>com.codeslap</groupId>
        <artifactId>android-facebook</artifactId>
        <version>1.5</version>
    </dependency>
    <dependency>
        <groupId>cocos2d_android</groupId>
        <artifactId>cocos2d_android</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <type>apklib</type>
    </dependency>
    <dependency>
     <groupId>org.twitter4j</groupId>
     <artifactId>twitter4j-core</artifactId>
     <version>[2.2,)</version>
    </dependency>
</dependencies>

我看到了其他一些问题,涉及的是进口到其他山羊数据皮上,但显然我不在此使用这些数据,有人可以解释,Maven为什么抱怨这一类别只是主要 go和roid虫的一部分?

最佳回答

如果是您的参考,Rodandid:Rodedid是依赖性,则不会忘记确定提供的范围,否则,花钱会试图将它包装成结果的猪肉。

问题回答

您不能建立进口JAR文档,使用java.*或javax.* 包件。 co2d_android受扶养人要么含有这一类的复制件,要么包括确实存在的过境依赖。 您可能需要排除javax.xml.namespace。 http://maven.apache.org/guides/introduction/introduction-to-optional-and-ilaes-dependencies.html Maven Dependclusion。





相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签