简体   繁体   中英

Maven Dependency Error in pom.xml

I am working on a maven based project in android, I don't have any prior experience with maven. Currently i am trying to execute maven + robospice sample https://github.com/octo-online/RoboSpice-samples/tree/release/robospice-sample-spring-android . I am facing a strange dependency error "Missing artifact com.octo.android.robospice:robospice-spring-android:jar:1.4.5-SNAPSHOT" on dependency

    <dependency>
        <groupId>com.octo.android.robospice</groupId>
        <artifactId>robospice-spring-android</artifactId>
        <version>${robospice.spring.android.version}</version>
    </dependency>

Variable {robospice.spring.andriod.version} has value 1.4.5-SNAPSHOT . complete pom.xml available here https://github.com/octo-online/RoboSpice-samples/blob/release/robospice-sample-spring-android/pom.xml .

I have executed mvn clean install, i also have updated mvn update project but this error is still exist. please help me to fix it.

Thanks,

the solution for you should be to use:

<robospice.spring.android.version>1.4.6</robospice.spring.android.version>

instead of:

<robospice.spring.android.version>1.4.5-SNAPSHOT</robospice.spring.android.version>

the reason seems simple, the example might be outdated. as there is already later version officially released. You can see it on official maven central repository: http://mvnrepository.com/artifact/com.octo.android.robospice/robospice-spring-android

As a background. Maven uses versioning in a way, that you can retrieve libraries your application depends on (dependencies) just by describing these in your pom.xml file. These are later downloaded from the maven repositories (by default maven central repository). For full info, see: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

I am not able to see any jar with that version 1.4.5-SNAPSHOT in Maven Central Repository. Please try with version 1.4.5

For more you can refer here

http://search.maven.org/#browse|-1465358918

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM