Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid maven build (eclipse) failes because of "unexpected top-level exception" (using odata4j dependency)
    primarykey
    data
    text
    <p>I have a problem building an android maven project (eclipse m2e, android for maven).</p> <p>The "install" goal resumes with:</p> <pre><code>[INFO] UNEXPECTED TOP-LEVEL EXCEPTION: [INFO] java.lang.IllegalArgumentException: already added: Ljavax/persistence/Access; [INFO] at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123) </code></pre> <p>I've added the following dependency to the project:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;org.odata4j&lt;/groupId&gt; &lt;artifactId&gt;odata4j-jersey&lt;/artifactId&gt; &lt;version&gt;0.7.0&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>This dependency adds also (among other things) javax.persistence-2.0.0.jar.</p> <p>So I think the library is added twice? But how to solve this problem? When I remove the dependency the project can be built without errors.</p> <p>Here is the output of the command: maven dependency:tree</p> <pre><code>[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ myapp --- [INFO] org.subby.android:myapp:apk:0.0.1-SNAPSHOT [INFO] +- com.google.android:android:jar:4.1.1.4:provided [INFO] | +- commons-logging:commons-logging:jar:1.1.1:provided [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.0.1:provided [INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.0.1:provided [INFO] | | +- (commons-logging:commons-logging:jar:1.1.1:provided - omitted for duplicate) [INFO] | | \- commons-codec:commons-codec:jar:1.3:provided [INFO] | +- org.khronos:opengl-api:jar:gl1.1-android-2.1_r1:provided [INFO] | +- xerces:xmlParserAPIs:jar:2.6.2:provided [INFO] | +- xpp3:xpp3:jar:1.1.4c:provided [INFO] | \- org.json:json:jar:20080701:provided [INFO] \- org.odata4j:odata4j-jersey:jar:0.7.0:compile [INFO] +- org.odata4j:odata4j-core:jar:0.7.0:compile [INFO] | +- org.core4j:core4j:jar:0.5:compile [INFO] | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile [INFO] | +- org.eclipse.persistence:javax.persistence:jar:2.0.0:compile [INFO] | +- org.eclipse.persistence:eclipselink:jar:2.1.2:compile [INFO] | \- joda-time:joda-time:jar:1.6:compile [INFO] +- com.sun.jersey:jersey-core:jar:1.1.5:compile [INFO] | \- (javax.ws.rs:jsr311-api:jar:1.1.1:compile - omitted for duplicate) [INFO] +- com.sun.jersey:jersey-server:jar:1.1.5:compile [INFO] | +- (com.sun.jersey:jersey-core:jar:1.1.5:compile - omitted for duplicate) [INFO] | \- asm:asm:jar:3.1:compile [INFO] \- com.sun.jersey:jersey-client:jar:1.1.5:compile [INFO] \- (com.sun.jersey:jersey-core:jar:1.1.5:compile - omitted for duplicate) </code></pre> <p>Am I doing something wrong? I'm still very new on maven.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload