You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ben Lidgey (JIRA)" <ji...@codehaus.org> on 2008/02/21 16:14:30 UTC
[jira] Created: (MDEP-146) Dependency needed for running tests
incorrectly identified as Unused Dependency
Dependency needed for running tests incorrectly identified as Unused Dependency
-------------------------------------------------------------------------------
Key: MDEP-146
URL: http://jira.codehaus.org/browse/MDEP-146
Project: Maven 2.x Dependency Plugin
Issue Type: Bug
Components: analyze
Affects Versions: 2.0
Reporter: Ben Lidgey
Assignee: Brian Fox
In a project which uses something like mockrunner that requires some other jars to run the tests, those dependencies are listed as "Unused dependencies" even though the scope is set to "test".
{code:xml}
<!-- referenced in test code -->
<dependency>
<groupId>com.mockrunner</groupId>
<artifactId>mockrunner</artifactId>
<version>0.4</version>
<scope>test</scope>
</dependency>
<!-- needed for test execution, but not referenced in code -->
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-j2ee</artifactId>
<version>4.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockejb</groupId>
<artifactId>mockejb</artifactId>
<version>0.6-beta2</version>
<scope>test</scope>
</dependency>
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MDEP-146) Dependency needed for running tests
incorrectly identified as Unused Dependency
Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MDEP-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Fox closed MDEP-146.
--------------------------
Resolution: Won't Fix
The analysis code uses ASM to check the actual bytecode for comparison. This means that things like constants and runtime only dependencies will show up as unused. There is a flag (http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html#ignoreNonCompile) that you can set to ignore the test scope.
> Dependency needed for running tests incorrectly identified as Unused Dependency
> -------------------------------------------------------------------------------
>
> Key: MDEP-146
> URL: http://jira.codehaus.org/browse/MDEP-146
> Project: Maven 2.x Dependency Plugin
> Issue Type: Bug
> Components: analyze
> Affects Versions: 2.0
> Reporter: Ben Lidgey
> Assignee: Brian Fox
>
> In a project which uses something like mockrunner that requires some other jars to run the tests, those dependencies are listed as "Unused dependencies" even though the scope is set to "test".
> {code:xml}
> <!-- referenced in test code -->
> <dependency>
> <groupId>com.mockrunner</groupId>
> <artifactId>mockrunner</artifactId>
> <version>0.4</version>
> <scope>test</scope>
> </dependency>
> <!-- needed for test execution, but not referenced in code -->
> <dependency>
> <groupId>jboss</groupId>
> <artifactId>jboss-j2ee</artifactId>
> <version>4.0.2</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.mockejb</groupId>
> <artifactId>mockejb</artifactId>
> <version>0.6-beta2</version>
> <scope>test</scope>
> </dependency>
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira