Maven support

13 views
Skip to first unread message

Macarse

unread,
Nov 24, 2010, 11:45:50 AM11/24/10
to robol...@googlegroups.com
I have been working on:
https://github.com/pivotal/robolectric/issues#issue/8

To build correctly I have used:
https://github.com/mosabua/maven-android-sdk-deployer

This is the pom.xml I have done so far:
http://pastebin.com/N50k5TwW


I still get that fail in testHasImplementation:

Tests in error:
initializationError(com.xtremelabs.robolectric.util.TestUtil)
testHasImplementation(com.xtremelabs.robolectric.OrgJsonTest)

Tests run: 180, Failures: 0, Errors: 2, Skipped: 0


I still need to add the dependencies from the correct place.

Christian Williams

unread,
Nov 24, 2010, 2:30:03 PM11/24/10
to robol...@googlegroups.com
Awesome! I was dreading trying to write a pom, I've been defeated too many times. ;-)

--X

On Wed, Nov 24, 2010 at 9:36 AM, Christian Williams <xi...@pivotalsf.com> wrote:
Awesome! I was dreading trying to write a pom, I've been defeated too many times. ;-)

--X [typos courtesy of my iPhone]

Macarse

unread,
Nov 25, 2010, 9:50:44 AM11/25/10
to robol...@googlegroups.com
I just pushed to my fork a working pom.
https://github.com/Macarse/robolectric/commit/902467c4ea250ed5b8605e9dfdb03c64aa7a5b5e

I reached to a point where a dep is not available on http://mvnrepository.com/
Robolectric uses 1.3.0RC1 but only 1.1 is available.

There is an issue to fix it here:
http://code.google.com/p/hamcrest/issues/detail?id=30

Do we need 1.30RC1 or 1.1 is just fine?

Thanks

Macarse

unread,
Nov 26, 2010, 10:43:18 AM11/26/10
to robol...@googlegroups.com
Ok, I just tested and it doesn't work with 1.1 :(

Christian Williams

unread,
Nov 26, 2010, 12:41:23 PM11/26/10
to robol...@googlegroups.com
I've been wanting to eliminate the hamcrest dependency for a while, I'll work on that today.

--X [typos courtesy of my iPhone]

Macarse

unread,
Nov 26, 2010, 1:00:40 PM11/26/10
to robol...@googlegroups.com

Today I pushed a fixed pom file with every dependence solved.

Check it out

Christian Williams

unread,
Nov 26, 2010, 3:38:46 PM11/26/10
to robol...@googlegroups.com
Awesome! I'm making a few changes to get it ready for repo submission.

--X

Manfred Moser

unread,
Nov 30, 2010, 1:04:31 PM11/30/10
to robolectric
Hi guys,

I am the author of the maven-android-sdk-deployer and found out about
your effort via macarese. I just had a look at the pom and I think if
you want to get the artifact deployed to maven central you will have
to switch the android dependency to use the ones deployed in maven
maven central rather than the ones deployed out of the sdk into the
local repo of the user.

Check out the right versions to use here

http://repo2.maven.org/maven2/com/google/android/

and let me know if you need any other help. You might need to test
this a bit since the approach for the artifacts in central is a bit
different. It has transitive dependencies and older versions have a
bit of a bug with missing json support. It depends a bit what you use.

Oh and if a user does have problems with that he can still add the sdk
deployer ones instead and he will be fine, but to get into central you
have to depend on stuff thats in central only...

manfred

On Nov 26, 12:38 pm, Christian Williams <x...@pivotallabs.com> wrote:
> Awesome! I'm making a few changes to get it ready for repo submission.
>
> --X
>
>
>
>
>
>
>
> On Fri, Nov 26, 2010 at 10:00 AM, Macarse <maca...@gmail.com> wrote:
> > Today I pushed a fixed pom file with every dependence solved.
>
> > Check it out
> > On Nov 26, 2010 2:41 PM, "Christian Williams" <antixian...@gmail.com>
> > wrote:
> > > I've been wanting to eliminate the hamcrest dependency for a while, I'll
> > work on that today.
>
> > > --X [typos courtesy of my iPhone]
>
> > > On Nov 26, 2010, at 7:43, Macarse <maca...@gmail.com> wrote:
>
> > >> Ok, I just tested and it doesn't work with 1.1 :(
>
> > >> On Thu, Nov 25, 2010 at 11:50 AM, Macarse <maca...@gmail.com> wrote:
> > >>> I just pushed to my fork a working pom.
>
> >https://github.com/Macarse/robolectric/commit/902467c4ea250ed5b8605e9...
>
> > >>> I reached to a point where a dep is not available on
> >http://mvnrepository.com/
> > >>> Robolectric uses 1.3.0RC1 but only 1.1 is available.
>
> > >>> There is an issue to fix it here:
> > >>>http://code.google.com/p/hamcrest/issues/detail?id=30
>
> > >>> Do we need 1.30RC1 or 1.1 is just fine?
>
> > >>> Thanks
>
> > >>> On Wed, Nov 24, 2010 at 4:30 PM, Christian Williams
> > >>> <x...@pivotallabs.com> wrote:
> > >>>> Awesome! I was dreading trying to write a pom, I've been defeated too
> > many
> > >>>> times. ;-)
> > >>>> --X
>
> > >>>> On Wed, Nov 24, 2010 at 9:36 AM, Christian Williams <
> > x...@pivotalsf.com>
> > >>>> wrote:
>
> > >>>>> Awesome! I was dreading trying to write a pom, I've been defeated too
> > many
> > >>>>> times. ;-)
>
> > >>>>> --X [typos courtesy of my iPhone]
>

Christian Williams

unread,
Nov 30, 2010, 1:06:40 PM11/30/10
to robol...@googlegroups.com
Manfred, thanks for the advice, I'm definitely a pom lightweight. Hoping to get a chance to work on this more soon.

--X

Macarse

unread,
Nov 30, 2010, 1:33:40 PM11/30/10
to robol...@googlegroups.com
I wanted to use the ones on maven central but robolectric needs maps
dependency as well and I guess we can't upload that to maven central
:(

Manfred Moser

unread,
Nov 30, 2010, 1:36:45 PM11/30/10
to robol...@googlegroups.com
True. That will be problem to get into central then..

Phil Goodwin

unread,
Nov 30, 2010, 4:41:10 PM11/30/10
to robol...@googlegroups.com
We have plans to make the maps dependency optional. That should help.

Manfred Moser

unread,
Nov 30, 2010, 5:05:26 PM11/30/10
to robol...@googlegroups.com
Yeah.. that should probably give you the green light to go to central..
Reply all
Reply to author
Forward
0 new messages