You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/20 11:35:00 UTC

[jira] [Resolved] (SUREFIRE-1094) running included tests does not include test dependencies

     [ https://issues.apache.org/jira/browse/SUREFIRE-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Elliotte Rusty Harold resolved SUREFIRE-1094.
---------------------------------------------
    Resolution: Not A Bug

This is WAI. Test dependencies should not be inherited.

> running included tests does not include test dependencies
> ---------------------------------------------------------
>
>                 Key: SUREFIRE-1094
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1094
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin, Maven Surefire Plugin
>    Affects Versions: 2.17
>            Reporter: Christopher Smith
>            Priority: Major
>
> When using the {{test-jar}} functionality, the {{test}} dependencies declared in the test jar are not added to the runner's classpath, leading to {{NoClassDefFoundErrors}} (or silent failures to match annotations on any test methods) when running the client project. Explicitly declaring a dependency on the upstream project does not help. Overriding the dependency scope on the upstream's dependencies to {{compile}} causes the client project to resolve the dependencies.
> I expected the client project to pull in the {{test}} dependencies needed by the upstream project when running its tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)