apache / apache/maven

[MNG-6545] Scope runtime test

Open
#7,285 2 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Olivier Cailloux](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=oliviercailloux)** opened **[MNG-6545](https://issues.apache.org/jira/browse/MNG-6545?redirect=false)** and commented

Maven should permit to include a dependency with scope restricted to test and runtime. Currently we have to choose between test and runtime, having both would be better.

It would permit Maven to check that the test code does not depend (for compilation) on those libraries. And you wouldn’t get annoyed by completion proposals in your IDE coming from those runtime libraries.

It is also conceptually more elegant and would make the intent clear to other contributers (“make sure your test code does not depend on this library”).

Also discussed [here](https://mail-archives.apache.org/mod_mbox/maven-users/200811.mbox/%3c17608340.3674701226307519843.JavaMail.adm-moff@moffice8.nsc.no%3e) and [here](https://stackoverflow.com/a/27729783).

---

3 votes, 4 watchers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.