maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Heinz Marbaise (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MNG-5978) test libraries should declare expected scope in their pom
Date Mon, 15 Feb 2016 18:06:18 GMT

    [ https://issues.apache.org/jira/browse/MNG-5978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147660#comment-15147660
] 

Karl Heinz Marbaise commented on MNG-5978:
------------------------------------------

If you like to be sure the correct scope is used you should use the [maven-enforcer-plugin|http://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html]
to be sure the correct scope is used. Apart from the the dependencyManagement sometimes makes
it hard to know which scope a particular dependency has...if you have several levels of modules
etc.

> test libraries should declare expected scope in their pom
> ---------------------------------------------------------
>
>                 Key: MNG-5978
>                 URL: https://issues.apache.org/jira/browse/MNG-5978
>             Project: Maven
>          Issue Type: Wish
>          Components: Dependencies
>            Reporter: Nadav Wexler
>
> when using test libraries and forgetting to include the expected <scope>test</scope>
this could have your jars and wars inflated and could also create some problems in your environment.
> I suggest to include the expected scope in your pom, and then when depending on that
library, checking against the actual pom.
> if those do not match then a warning should be triggered.
> also this should be recursive - the check should not emit a warning if the using library
is also a test library.
> I'd love to hear your comments on this Wish!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message