Skip to content
This repository has been archived by the owner on Jan 14, 2018. It is now read-only.

Setup for Maven Users

stephanenicolas edited this page Jun 11, 2014 · 2 revisions

#Setup for Maven users

Browse our maven samples to find out how to use RoboSpice and its extension modules.

Latest version of RoboSpice and extension modules can be found on maven central.

You will find additional setup details below.

Summary

##RoboSpice core

<properties>
    <robospice.version>x.y.z</robospice.version>
</properties>

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

##Spring Android module

The Spring Android module wiki page details the goal of this module.

To use it under maven add this dependency to your pom.xml file:

<properties>
    <robospice-spring-android.version>x.y.z</robospice-spring-android.version>
</properties>

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

The RoboSpice Spring Android module uses 3 optional dependencies for persistence :

  • using jackson
<dependency>
   <groupId>org.codehaus.jackson</groupId>
   <artifactId>jackson-mapper-asl</artifactId>
   <version>${spring-android.jackson.version}</version>
</dependency>
  • using gson
<dependency>
   <groupId>com.google.code.gson</groupId>
   <artifactId>gson</artifactId>
   <version>${spring-android.gson.version}</version>
</dependency>
  • using XML Serializer, you will need to add exclusions
<dependency>
   <groupId>org.simpleframework</groupId>
   <artifactId>simple-xml</artifactId>
   <version>${spring-android.simplexmlserializer.version}</version>
   <exclusions>
      <exclusion>
         <groupId>xpp3</groupId>
         <artifactId>xpp3</artifactId>
      </exclusion>
      <exclusion>
         <groupId>stax</groupId>
         <artifactId>stax-api</artifactId>
      </exclusion>
   </exclusions>
</dependency>

##RoboSpice Google Http Java Client module

The Google Http Java Client module wiki page details the goal of this module.

To use it under maven add this dependency to your pom.xml file:

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

The RoboSpice Google Http Java Client module uses 3 optional dependencies for persistence :

  • using jackson 1, you will need to add exclusions
<dependency>
    <groupId>com.google.http-client</groupId>
    <artifactId>google-http-client-jackson</artifactId>
    <version>${google-http-client.jackson1.version}</version>
    <exclusions>
        <exclusion>
            <groupId>xpp3</groupId>
            <artifactId>xpp3</artifactId>
        </exclusion>
        <exclusion>
            <groupId>stax</groupId>
            <artifactId>stax-api</artifactId>
        </exclusion>
    </exclusions>
</dependency>
  • using jackson 2, you will need to add exclusions
<dependency>
    <groupId>com.google.http-client</groupId>
    <artifactId>google-http-client-jackson2</artifactId>
    <version>${google-http-client.jackson2.version}</version>
    <exclusions>
        <exclusion>
            <groupId>xpp3</groupId>
            <artifactId>xpp3</artifactId>
        </exclusion>
        <exclusion>
            <groupId>stax</groupId>
            <artifactId>stax-api</artifactId>
        </exclusion>
    </exclusions>
</dependency>
  • using gson, you will need to add exclusions
<dependency>
    <groupId>com.google.http-client</groupId>
    <artifactId>google-http-client-gson</artifactId>
    <version>${google-http-client.gson.version}</version>
    <exclusions>
        <exclusion>
            <groupId>xpp3</groupId>
            <artifactId>xpp3</artifactId>
        </exclusion>
        <exclusion>
            <groupId>stax</groupId>
            <artifactId>stax-api</artifactId>
        </exclusion>
    </exclusions>
</dependency>

##ORMLite module

Check out the ORMLite module wiki page for details about this module.

To use it under maven add this dependency to your pom.xml file:

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

##Retrofit module

Check out the Retrofit module wiki page for details about this module.

To use it under maven add this dependency to your pom.xml file:

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

##UI SpiceList module

Check out the UI SpiceList module wiki page for details about this module.

To use it under maven add this dependency to your pom.xml file:

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

##Special note on Jackson 2

If you intend to use Jackson 2 and want to get an app that is compatible with Android SDK 8, you must not upgrade after version 2.2.3 of Jackson 2. After this, Jackson 2 is only compatible with Android SDK 9+.

##What's next ?

If you need any help setting up or using RoboSpice you can reach us on Google Groups