[ 
https://jira.codehaus.org/browse/MCOMPILER-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed MCOMPILER-69.
-----------------------------------

    Resolution: Won't Fix

Please refer to 
https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
 if you're wondering why this issue was closed out.

> Runtime dependencies included on classpath during compiler:testCompile
> ----------------------------------------------------------------------
>
>                 Key: MCOMPILER-69
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-69
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>            Reporter: marekk
>
> When executing compiler:testCompile, all runtime dependencies are added to 
> the classpath to compile the test source code.  This is contrary to the 
> purpose of the runtime scope, which is simply to include the dependency when 
> running the code, not compiling.
> Here is what Maven's website[1] says about the runtime scope:
> "this scope indicates that the dependency is not required for compilation, 
> but is for execution. It is in the runtime and test classpaths, but not the 
> compile classpath."
> ...And here is what Better Builds with Maven says about the runtime scope:
> "This is because, in this situation, the (runtime) dependency is used only 
> for packaging, not for compilation. In fact, if the dependency were required 
> for compilation, for stability it would always be declared in the current POM 
> as a dependency - regardless of whether another dependency introduces it." - 
> page 65
> "Check that the scope of your dependencies are set correctly (to test if only 
> used for unit tests, or runtime if it is needed to bundle with or run the 
> application but not for compiling your source code)." - page 204
> [1] 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
> [2] http://www.devzuz.com/web/guest/products/resources#BBWM



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to