Am 12/28/16 um 21:34 schrieb Guillaume Boué:
> I have the same results as Hervé, both on Windows and Ubuntu. This is 
> what I have with Maven 3.3.9:
> 
> - Windows 10 64bit, OpenJDK 1.8.0_102, Test failure: Timeout in 
> HugeFileDownloadTest (perhaps the timeout should be increased?)
> - Ubuntu 16.04 32bit, OpenJDK 1.8.0_111, Maven 3.3.9: All OK
> - Ubuntu 16.04 32bit, OpenJDK 1.7.0_95, Maven 3.3.9: All OK
> 
> With Maven 3.4.0-SNAPSHOT (65960ac18c8121648fe163612375a2ba5f4535c2), I 
> have compilation errors in the test class FileWagonTest (both on Windows 
> and Ubuntu)
> 
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR] 
> /home/guillaume/workspace-maven/maven-wagon/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java:[37,8]
>  cannot access junit.framework.TestCase
>    class file for junit.framework.TestCase not found
> [ERROR] 
> /home/guillaume/workspace-maven/maven-wagon/wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java:[48,52]
>  cannot find symbol
>    symbol:   method getName()
>    location: class org.apache.maven.wagon.providers.file.FileWagonTest
> 
> The JUnit dependency isn't getting pulled. This is the scenario at hand:
> 
> - wagon-file has as parent wagon-providers which has a dependency on 
> wagon-provider-test with scope test.
> - wagon-provider-test has a compile scoped dependency on junit 
> (<scope>compile</scope> is explicitly written).
> - wagon-provider-test has as parent wagon, which has a test scoped 
> dependency management on junit.
> 
> What would be the problem?

Overriding the dependency management is only possible in the direct
dependencies (in the POM). When resolving a dependency, those overrides
are beeing ignored and the management gets applied. That's always been
that way. If your test classes need junit, you should declare junit in
the POM and not rely on it to be there transitively. The dependency
plugin's analyze goal would warn about this for the main artifact
(src/main) but not for the test artifact (src/test).



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to