3

I'm new to Robospice, running mvn install in sample project's directory gives me the following error:

[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 any idea what's wrong?

trying to import project to eclipse via m2eclipse results with error related to artifact missing.

Benoit
  • 4,549
  • 3
  • 28
  • 45
Ranco
  • 893
  • 2
  • 13
  • 43
  • Please have a look at my answer here: http://stackoverflow.com/questions/21857254/failed-to-build-sample-robospice-sample-ormlite-content-provider-robospice – Simon Jun 30 '15 at 16:56

3 Answers3

2

If you remove the "-SNAPSHOT" text from each dependency in the pom.xml file, it should start to work. The SNAPSHOT dependencies are not available in any public repo.

    <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 available in this public repo.

EDIT: There is another option, which may actually be the better way to go (especially if you are going to be using a lot of samples). You could download the library source code from the Robospice master branch, and run mvn install (make sure your android emulator is running for the unit tests). This will make the latest snapshot version available to maven in your local repo - if you do this the original sample project would run, BUT you will still need to update the version number in your sample pom.xml to 1.4.7-SNAPSHOT - which is the current version of the snapshot from master branch.

Eggman87
  • 571
  • 5
  • 12
  • tried what you suggested, now it gives me this: Could not resolve dependencies for project following with "the following artifacts could not be resolved..." – Ranco Jul 28 '13 at 19:27
  • com.octo.android.robospice:robospice-ormlite-content-provider:jar:1.4.5, com.tojc.ormlite.android:ormlite-content-provider-compiler:jar:1.0.0: Could not find artifact com.octo.android.robospice:robospice-ormlite-content-provider:jar:1.4.5 in central (http://repo.maven.apache.org/maven2) -> [Help 1] – Ranco Jul 28 '13 at 19:29
  • I guess it's related to these not present in the public repo you've added? or I'm missing something? (new to maven as well =\) – Ranco Jul 28 '13 at 19:31
  • Looks like those are a available as part of the ormlite-parent module. Can you try removing the two dependencies that are not resolvable (ormlite-content-provider and ormlite-provider-compiler) and then add the following dependency? – Eggman87 Jul 28 '13 at 20:31
  • ` com.octo.android.robospice robospice-ormlite-parent 1.4.5 ` – Eggman87 Jul 28 '13 at 20:31
  • I'll give it a try and let you know if it helps asap, tnx! – Ranco Jul 29 '13 at 05:50
  • Hey @Ranco . Any luck? – Eggman87 Aug 05 '13 at 02:28
1

Android Maven plugin does not yet work with Maven 3.1.0 See issue 395

btw you can use Robospice 1.4.6 it's on maven central

To solve your problem install maven 3.0.5

Benoit
  • 4,549
  • 3
  • 28
  • 45
0

Upgrade to the latest version of the Android Maven Plugin (3.8.0) and upgrade your Maven to 3.1.1 and all will work.

Manfred Moser
  • 29,539
  • 13
  • 92
  • 123