You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve Boutemy (JIRA)" <ji...@codehaus.org> on 2013/05/12 15:48:52 UTC

[jira] (MDEP-408) Verbose=true on dependency:analyze-only does not output used dependencies

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

Herve Boutemy closed MDEP-408.
------------------------------

    Resolution: Cannot Reproduce
      Assignee: Herve Boutemy

I just tested, and everything works:
{noformat}~/projets/maven/trunks/plugins/maven-dependency-plugin$ mvn org.apache.maven.plugins:maven-dependency-plugin:2.7:analyze-only -Dverbose=true
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Dependency Plugin 2.8-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.7:analyze-only (default-cli) @ maven-dependency-plugin ---
[INFO] Used declared dependencies found:
[INFO]    org.apache.maven:maven-artifact:jar:2.0.9:compile
[INFO]    org.apache.maven:maven-plugin-api:jar:2.0.9:compile
[INFO]    org.apache.maven:maven-project:jar:2.0.9:compile
[INFO]    org.apache.maven:maven-model:jar:2.0.9:compile
[INFO]    org.apache.maven:maven-artifact-manager:jar:2.0.9:compile
[INFO]    org.apache.maven:maven-repository-metadata:jar:2.0.9:compile
[INFO]    org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile
[INFO]    org.apache.maven.reporting:maven-reporting-impl:jar:2.0.5:compile
[INFO]    org.apache.maven.doxia:doxia-sink-api:jar:1.0:compile
[INFO]    org.apache.maven.doxia:doxia-site-renderer:jar:1.0:compile
[INFO]    org.codehaus.plexus:plexus-archiver:jar:2.3:compile
[INFO]    org.codehaus.plexus:plexus-utils:jar:3.0.9:compile
[INFO]    org.apache.maven.shared:file-management:jar:1.2.1:compile
[INFO]    org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO]    org.codehaus.plexus:plexus-io:jar:2.0.6:compile
[INFO]    org.apache.maven.shared:maven-dependency-analyzer:jar:1.4:compile
[INFO]    org.apache.maven.shared:maven-dependency-tree:jar:2.1:compile
[INFO]    org.apache.maven.shared:maven-common-artifact-filters:jar:1.4:compile
[INFO]    org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
[INFO]    commons-lang:commons-lang:jar:2.6:compile
[INFO]    commons-collections:commons-collections:jar:3.2.1:compile
[INFO]    classworlds:classworlds:jar:1.1:compile
[INFO]    org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.2:provided
[INFO]    junit:junit:jar:3.8.2:test
[INFO]    org.apache.maven.shared:maven-plugin-testing-harness:jar:1.1:test
[INFO]    org.apache.maven.plugin-testing:maven-plugin-testing-tools:jar:2.1:test
[INFO]    org.codehaus.plexus:plexus-interpolation:jar:1.9:test
[WARNING] Used undeclared dependencies found:
[WARNING]    commons-io:commons-io:jar:1.4:compile
[WARNING]    jtidy:jtidy:jar:4aug2000r7-dev:runtime
[WARNING]    xml-apis:xml-apis:jar:1.0.b2:compile
[WARNING] Unused declared dependencies found:
[WARNING]    org.apache.maven:maven-core:jar:2.0.9:compile
[WARNING]    org.apache.maven.plugin-testing:maven-plugin-testing-harness:jar:2.1:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.739s
[INFO] Finished at: Sun May 12 15:45:33 CEST 2013
[INFO] Final Memory: 10M/216M
[INFO] ------------------------------------------------------------------------
{noformat}

if you look at the code you point to, usedDeclared variable is just previously assigned to analysis.getUsedDeclaredArtifacts()
                
> Verbose=true on dependency:analyze-only does not output used dependencies
> -------------------------------------------------------------------------
>
>                 Key: MDEP-408
>                 URL: https://jira.codehaus.org/browse/MDEP-408
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>    Affects Versions: 2.7
>         Environment: Windows
>            Reporter: Domen S
>            Assignee: Herve Boutemy
>            Priority: Minor
>
> If I run "mvn dependency:analyze-only -Dverbose=true", the used dependencies are not shown.
> Line 268 in file "AbstractAnalyzeMojo.java", where the used dependencies enabled by verbose=true ought to be printed, should probably contain:
> logArtifacts( usedDeclared, true );
> instead of
> logArtifacts( analysis.getUsedDeclaredArtifacts(), false );

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira