[
https://issues.apache.org/jira/browse/SLING-4320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14279996#comment-14279996
]
Bertrand Delacretaz edited comment on SLING-4320 at 1/16/15 9:05 AM:
---------------------------------------------------------------------
I think this might cause problems if tests require a newer version of junit (or
another dependency) than what junit.core requires.
I had this problem recently (I think it's the same thing) when I needed to add
an exclusion for jmock-junit4 to the org.apache.sling.commons.testing
dependency in [1]. Without that exclusion mvn dependency:tree shows two
versions of junit in the tree, which caused mockito to fail in weird ways.
[1] https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/json/pom.xml
was (Author: bdelacretaz):
I think this might cause problems if tests require a newer version of junit (or
another dependency) than what junit.core requires.
I had this problem recently (I think it's the same thing) when I needed to add
an exclusion for jmock-junit4 to the org.apache.sling.commons.testing
dependency in [1]. Without that exclusion mvn dependency:tree shows two
versions of junit in the tree, which caused jmock to fail in weird ways.
[1] https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/json/pom.xml
> Make JUnit Core depend on JUnit and Hamcrest with Compile scope
> ---------------------------------------------------------------
>
> Key: SLING-4320
> URL: https://issues.apache.org/jira/browse/SLING-4320
> Project: Sling
> Issue Type: Improvement
> Components: Testing
> Reporter: Konrad Windszus
>
> Currently in org.apache.sling.junit.core (1.0.10) the dependency to JUnit and
> Hamcrest has scope {{provided}}. It should rather have the scope {{compile}}
> to ease writing of Remote Unit Test Bundles (because only dependencies with
> {{compile}} scope would automatically be included transitively)
> Those bundles should only depend on sling.junit.core and transitively get the
> dependencies for JUnit and Hamcrest. Otherwise you always need to figure out
> manually which JUnit version and Hamcrest version is used by sling.junit.core
> and add those dependencies manually in addition to the sling.junit.core
> dependency.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)