You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Daniel Schömer <da...@gmx.net> on 2005/09/28 14:30:20 UTC
[m2] compile errors for clover:report with wrong dependency declaration order
Hi,
I have just downloaded m2-beta-2 and found some interesting fact
about the dependency declaration order in pom.xml when executing
the clover:report goal.
My project has a dependency to commons-lang with compile scope and
junit with test scope. Since commons-lang declares junit as
compile-time dependency, I've excluded the junit dependency from
commons-lang.
If I execute the clover:report goal now, junit is not included in
the classpath during compiler:testCompile which results in
compilation errors (TestCase class not found).
But if I move the declaration of the junit dependency in pom.xml
above the commons-lang dependency, junit is included in the
classpath during compiler:testCompile of clover:report and the
test classes can be compiled.
Is this an expected behaviour?
This results in compilation errors for clover:report:
<project>
...
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
With this, test classes can be compiled for clover:report:
<project>
...
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
Regards,
Daniel Schömer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org