Github user MartinPayne commented on the issue:

    https://github.com/apache/nifi/pull/2780
  
    @joewitt Compile scope is the correct scope in this case. If JUnit 4 was 
only used in the tests for NiFi Mock, test scope would be correct. However, the 
[NiFi Mock code uses JUnit 4 as a compile time 
dependency](https://github.com/apache/nifi/blob/f8466cb16d6723ddc3bf5f0e7f8ce8a47d27cbe5/nifi-mock/src/main/java/org/apache/nifi/util/StandardProcessorTestRunner.java#L74),
 so JUnit 4 needs to be brought into consuming projects as a transitive 
dependency.
    
    As per the [Maven dependency scope 
table](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope),
 making it a compile scope dependency means it is added to the test classpath 
of a consuming project if that project declares NiFi Mock with test scope. It 
would only get included all over the place if consuming projects have declared 
NiFi Mock with a compile or runtime scope. If that was the case here, NiFi Mock 
would also be getting included all over the place.


---

Reply via email to