Android – failed to build with maven

I am a novice of robospice. Running MVN install in the directory of the sample project will give me the following errors:

[ERROR] Failed to execute goal on project robospice-sample-ormlite-content-provider: 
Could not resolve dependencies for project com.octo.android.robospice:robospice-sample-ormlite-content-provider:apk:1.0.0-SNAPSHOT: 
The following artifacts Could not be resolved: 
com.octo.android.robospice:robospice-ormlite-content-provider:jar:1.4.5-SNAPSHOT, 
com.octo.android.robospice:robospice-spring-android:jar:1.4.5-SNAPSHOT, 
com.tojc.ormlite.android:ormlite-content-provider-compiler:jar:1.0.0-SNAPSHOT: 
Could not find artifact com.octo.android.robospice:robospice-ormlite-content
provider:jar:1.4.5-SNAPSHOT -> [Help 1]

I'm using Maven 3.1.0. Do you know what's wrong?

Trying to import the project into eclipse through m2eclipse results, the error is related to the loss of artifact

resolvent:

If you remove the "- snapshot" text from each dependency in the pom.xml file, it should start working. Snapshot dependencies are not available in any public repository

    <robospice.ormlite.content.provider.version>1.4.5</robospice.ormlite.content.provider.version>
    <robospice.spring.android.version>1.4.5</robospice.spring.android.version>
    <ormlite.content.provider.version>1.0.0</ormlite.content.provider.version>

You can find all versions in this public repo

Edit: there is another option, which may actually be a better method (especially if you want to use a large number of samples). You can download the library source code from the robospice master branch and run MVN install (make sure your Android simulator is running for unit testing) . this will enable Maven in your local warehouse to use the latest snapshot version – if you do, the original sample project will run, but you still need to update the version number in the sample pom.xml to 1.4.7-snapshot – which is the current snapshot version from the master branch

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>