Technically you are removing a part of the library without deprecating first.
Here's another issue: moving it from main to test means I cannot be referenced
from another project. Initially I had hoped to use it to test
AndroidJsonFactory which is in google-http-client-android3, but then I ran into
a problem trying to figure out how to run Android JUnit tests. Anyway, in
theory this is something I'd ideally like to be able to do.
Have you gone through the process of determining what is the problem with
including junit dependency in production?
One possible idea: move AbstractJsonFactoryTest into a separate
google-http-client-junit. That way junit doesn't show up as dependency for
google-http-client, but we will still have a way to support this special case.
It would also be entirely backwards-compatible so can be changed already now.
But of course, it is extra overhead for us to manage another artifact.
On 2012/04/16 14:36:41, yanivi wrote:
> Technically you are removing a part of the library without deprecating first.
Yes I figured since it is only used by tests it may be ok to just delete it and
call it a breaking change. But if you prefer I can deprecate it first.
> Here's another issue: moving it from main to test means I cannot be referenced
> from another project. Initially I had hoped to use it to test
> AndroidJsonFactory which is in google-http-client-android3, but then I ran
into
> a problem trying to figure out how to run Android JUnit tests. Anyway, in
> theory this is something I'd ideally like to be able to do.
>
> Have you gone through the process of determining what is the problem with
> including junit dependency in production?
>
I do not think there is a problem with including it in production but it is
strange to see junit in your production jars, if we can solve this it will also
help reduce the number of required jars for our projects.
> One possible idea: move AbstractJsonFactoryTest into a separate
> google-http-client-junit. That way junit doesn't show up as dependency for
> google-http-client, but we will still have a way to support this special case.
> It would also be entirely backwards-compatible so can be changed already now.
> But of course, it is extra overhead for us to manage another artifact.
I would like to not create an extra artifact especially if it is going to have
just one file in it. How about this-
If we need to reference it from google-http-client-android3 or any other
artifact then we copy the file over and use it or modify it to be a complete
test. The disadvantage is ofcourse we have to maintain the file in two (or more)
places but it is still test code so maybe we can live with this?
Issue 6038052: Moving junit to test scope and moving AbstractJsonFactoryTest to src/test/
(Closed)
Created 12 years ago by rmistry
Modified 12 years ago
Reviewers: yanivi
Base URL: https://google-http-java-client.googlecode.com/hg/
Comments: 2