Announcement Announcement Module
Collapse
No announcement yet.
Consuming RESTful Web Services with Spring for Android Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Consuming RESTful Web Services with Spring for Android

    Hello, I am trying to complete the following guide:

    Consuming RESTful Web Services with Spring for Android
    http://spring.io/guides/gs/consuming-rest-android/

    Unfortunately, when i try to build and run the client using the following command


    $ mvn clean package android:deploy android:run I receive a maven error:

    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building gs-consuming-rest-android 0.1.0
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ gs-consuming-rest-android ---
    [INFO] Deleting C:\Users\Fernando\gs-consuming-rest-android-master\initial\target
    [INFO]
    [INFO] --- android-maven-plugin:3.6.1:generate-sources (default-generate-sources) @ gs-consuming-rest-android ---
    [INFO] ANDROID-904-002: Found aidl files: Count = 0
    [INFO] ANDROID-904-002: Found aidl files: Count = 0
    [INFO] Manifest merging disabled. Using project manifest only
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Skipping gs-consuming-rest-android
    [INFO] This project has been banned from the build due to previous failures.
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Skipping gs-consuming-rest-android
    [INFO] This project has been banned from the build due to previous failures.
    [INFO] ------------------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1.922s
    [INFO] Finished at: Fri Oct 04 17:36:14 BRT 2013
    [INFO] Final Memory: 11M/152M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:andro id-maven-plugin:3.6.1:generate-sources (default-generate-sources) on
    project gs-consuming-rest-android: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:andro id-maven-plugin:3.6.1:
    generate-sources failed: A required class was missing while executing com.jayway.maven.plugins.android.generation2:andro id-maven-plugin:3.6.1:generate
    -sources: com/android/sdklib/SdkManager
    [ERROR] -----------------------------------------------------
    [ERROR] realm = plugin>com.jayway.maven.plugins.android.generation 2:android-maven-plugin:3.6.1
    [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirst Strategy
    [ERROR] urls[0] = file:/C:/Users/Fernando/.m2/repository/com/jayway/maven/plugins/android/generation2/android-maven-plugin/3.6.1/android-maven-plugin-3.6.1.jar
    [ERROR] urls[1] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/build/builder/0.4.2/builder-0.4.2.jar
    [ERROR] urls[2] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/sdklib/22.0.2/sdklib-22.0.2.jar
    [ERROR] urls[3] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/layoutlib/layoutlib-api/22.0.2/layoutlib-api-22.0.2.jar
    [ERROR] urls[4] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/dvlib/22.0.2/dvlib-22.0.2.jar
    [ERROR] urls[5] = file:/C:/Users/Fernando/.m2/repository/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar
    [ERROR] urls[6] = file:/C:/Users/Fernando/.m2/repository/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar
    [ERROR] urls[7] = file:/C:/Users/Fernando/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
    [ERROR] urls[8] = file:/C:/Users/Fernando/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar
    [ERROR] urls[9] = file:/C:/Users/Fernando/.m2/repository/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar
    [ERROR] urls[10] = file:/C:/Users/Fernando/.m2/repository/org/apache/commons/commons-compress/1.0/commons-compress-1.0.jar
    [ERROR] urls[11] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/sdk-common/22.0.2/sdk-common-22.0.2.jar
    [ERROR] urls[12] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/build/builder-model/0.4.2/builder-model-0.4.2.jar
    [ERROR] urls[13] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/common/22.0.2/common-22.0.2.jar
    [ERROR] urls[14] = file:/C:/Users/Fernando/.m2/repository/com/google/guava/guava/13.0.1/guava-13.0.1.jar
    [ERROR] urls[15] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/build/builder-test-api/0.4.2/builder-test-api-0.4.2.jar
    [ERROR] urls[16] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/build/manifest-merger/22.0.2/manifest-merger-22.0.2.jar
    [ERROR] urls[17] = file:/C:/Users/Fernando/.m2/repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
    [ERROR] urls[18] = file:/C:/Users/Fernando/.m2/repository/com/android/tools/ddms/ddmlib/22.0.2/ddmlib-22.0.2.jar
    [ERROR] urls[19] = file:/C:/Users/Fernando/.m2/repository/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar
    [ERROR] urls[20] = file:/C:/Users/Fernando/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar
    [ERROR] urls[21] = file:/C:/Users/Fernando/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar
    [ERROR] urls[22] = file:/C:/Users/Fernando/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar
    [ERROR] urls[23] = file:/C:/Users/Fernando/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
    [ERROR] urls[24] = file:/C:/Users/Fernando/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
    [ERROR] urls[25] = file:/C:/Users/Fernando/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
    [ERROR] urls[26] = file:/C:/Users/Fernando/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
    [ERROR] urls[27] = file:/C:/Users/Fernando/.m2/repository/org/apache/maven/maven-archiver/2.5/maven-archiver-2.5.jar
    [ERROR] urls[28] = file:/C:/Users/Fernando/.m2/repository/emma/emma/2.0.5312/emma-2.0.5312.jar
    [ERROR] urls[29] = file:/C:/Users/Fernando/.m2/repository/org/codehaus/plexus/plexus-archiver/2.3/plexus-archiver-2.3.jar
    [ERROR] urls[30] = file:/C:/Users/Fernando/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
    [ERROR] urls[31] = file:/C:/Users/Fernando/.m2/repository/org/codehaus/plexus/plexus-io/2.0.6/plexus-io-2.0.6.jar
    [ERROR] urls[32] = file:/C:/Users/Fernando/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
    [ERROR] urls[33] = file:/C:/Users/Fernando/.m2/repository/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar
    [ERROR] urls[34] = file:/C:/Users/Fernando/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
    [ERROR] urls[35] = file:/C:/Users/Fernando/.m2/repository/org/ow2/asm/asm/4.1/asm-4.1.jar
    [ERROR] urls[36] = file:/C:/Users/Fernando/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
    [ERROR] urls[37] = file:/C:/Users/Fernando/.m2/repository/org/sonatype/aether/aether-util/1.13.1/aether-util-1.13.1.jar
    [ERROR] urls[38] = file:/C:/Users/Fernando/.m2/repository/com/github/rtyley/android-screenshot-paparazzo/1.9/android-screenshot-paparazzo-1.9.jar
    [ERROR] urls[39] = file:/C:/Users/Fernando/.m2/repository/com/madgag/animated-gif-lib/1.0/animated-gif-lib-1.0.jar
    [ERROR] urls[40] = file:/C:/Users/Fernando/.m2/repository/com/github/rtyley/android-screenshot-celebrity/1.9/android-screenshot-celebrity-1.9.jar
    [ERROR] Number of foreign imports: 1
    [ERROR] import: Entry[import from realm ClassRealm[project>org.hello:gs-consuming-rest-android:0.1.0, parent: ClassRealm[maven.api, parent: null]]]
    [ERROR]
    [ERROR] -----------------------------------------------------: com.android.sdklib.SdkManager
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/d...ainerException

    It seems like Maven is not being able to access jar files in my local repository.

    What is wrong?

    Have anyone completed this guide successfully?

  • #2
    This issue is probably because the Android Maven Plugin needed to be updated to the latest version (3.8.2), which works with Maven 3.1.1. This guide has been rewritten to use Android Studio and Gradle, so it no longer uses Maven.

    Comment

    Working...
    X