Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAVEN, json-simple 1.1.1 depends on Junit #91

Open
GoogleCodeExporter opened this issue Dec 24, 2015 · 4 comments
Open

MAVEN, json-simple 1.1.1 depends on Junit #91

GoogleCodeExporter opened this issue Dec 24, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
On central maven repo, 
http://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1 
json-simple pom reference junit in its dependencies.

What is the expected output? What do you see instead?
junit deps should be in test scope

What version of the product are you using? On what operating system?
1.1.1

Please provide any additional information below.
json-simple comes with junit wich leads to conflicts in maven projects using 
json-simple

Thanks

Original issue reported on code.google.com by [email protected] on 23 Sep 2013 at 2:15

@GoogleCodeExporter
Copy link
Author

This is a one line fix, as the reporter has noted:

<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.10</version>
  <!-- FIXME --> <scope>test</scope>
</dependency>

There is no reason to include junit as a runtime dependency. It also throws off 
the Android linker. To work around, you can use exclusions in your project's 
POM:

<dependency>
  <groupId>com.googlecode.json-simple</groupId>
  <artifactId>json-simple</artifactId>
  <version>1.1.1</version>
  <exclusions>
    <exclusion>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </exclusion>
    <!-- maven note: must manually exclude all ancestors
            see http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html -->
    <exclusion>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
    </exclusion>
  </exclusions>
</dependency>


Original comment by [email protected] on 10 Feb 2014 at 10:09

@GoogleCodeExporter
Copy link
Author

Hi problem is the same with Ivy
Dependency must be like : 

<dependencies>
    <dependency org="junit" name="junit" rev="4.10" force="true" conf="test->runtime(*),master(*)"/>
</dependencies>

Original comment by [email protected] on 13 Mar 2014 at 1:50

@GoogleCodeExporter
Copy link
Author

Could you try to fix that little issue soon, perhaps in a 1.1.2 version ? It is 
annoying for your users.

Original comment by aheritier on 11 May 2014 at 8:49

@GoogleCodeExporter
Copy link
Author

annoying++

For android builds using gradle:

compile group: 'com.googlecode.json-simple', name: 'json-simple', version: 
'1.1.1', transitive: false 


Original comment by [email protected] on 30 Jul 2015 at 9:46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant