org.apache.maven.shared.dependency.analyzer
Class ProjectDependencyAnalysis

java.lang.Object
  extended by org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis

public class ProjectDependencyAnalysis
extends Object

Project dependencies analysis result.

Version:
$Id: ProjectDependencyAnalysis.java 1400637 2012-10-21 13:09:09Z hboutemy $
Author:
Mark Hobson

Constructor Summary
ProjectDependencyAnalysis()
           
ProjectDependencyAnalysis(Set<Artifact> usedDeclaredArtifacts, Set<Artifact> usedUndeclaredArtifacts, Set<Artifact> unusedDeclaredArtifacts)
           
 
Method Summary
 boolean equals(Object object)
           
 ProjectDependencyAnalysis forceDeclaredDependenciesUsage(String[] forceUsedDependencies)
          Force use status of some declared dependencies, to manually fix consequences of bytecode-level analysis which happens to not detect some effective use (constants, annotation with source-retention, javadoc).
 Set<Artifact> getUnusedDeclaredArtifacts()
          Unused but declared artifacts.
 Set<Artifact> getUsedDeclaredArtifacts()
          Used and declared artifacts.
 Set<Artifact> getUsedUndeclaredArtifacts()
          Used but not declared artifacts.
 int hashCode()
           
 ProjectDependencyAnalysis ignoreNonCompile()
          Filter not-compile scoped artifacts from unused declared.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectDependencyAnalysis

public ProjectDependencyAnalysis()

ProjectDependencyAnalysis

public ProjectDependencyAnalysis(Set<Artifact> usedDeclaredArtifacts,
                                 Set<Artifact> usedUndeclaredArtifacts,
                                 Set<Artifact> unusedDeclaredArtifacts)
Method Detail

getUsedDeclaredArtifacts

public Set<Artifact> getUsedDeclaredArtifacts()
Used and declared artifacts.


getUsedUndeclaredArtifacts

public Set<Artifact> getUsedUndeclaredArtifacts()
Used but not declared artifacts.


getUnusedDeclaredArtifacts

public Set<Artifact> getUnusedDeclaredArtifacts()
Unused but declared artifacts.


ignoreNonCompile

public ProjectDependencyAnalysis ignoreNonCompile()
Filter not-compile scoped artifacts from unused declared.

Returns:
updated project dependency analysis
Since:
1.3

forceDeclaredDependenciesUsage

public ProjectDependencyAnalysis forceDeclaredDependenciesUsage(String[] forceUsedDependencies)
                                                         throws ProjectDependencyAnalyzerException
Force use status of some declared dependencies, to manually fix consequences of bytecode-level analysis which happens to not detect some effective use (constants, annotation with source-retention, javadoc).

Parameters:
forceUsedDependencies - dependencies to move from "unused-declared" to "used-declared", with groupId:artifactId format
Returns:
updated project dependency analysis
Throws:
ProjectDependencyAnalyzerException - if dependencies forced were either not declared or already detected as used
Since:
1.3

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.