## org.jvnet.maven.plugin.antrun
Class DependencyGraph.Node

    java.lang.Object
      org.jvnet.maven.plugin.antrun.DependencyGraph.Node

Enclosing class:
  DependencyGraph

    public static final class DependencyGraph.Node

extends java.lang.Object

Node, which represents an artifact.

A single `DependencyGraph.Node` can be used in multiple `DependencyGraph` objects, so the graph traversal method all takes `DependencyGraph` object to determine the context in which the operation works.

Field Summary
`java.lang.String` `artifactId` Basic properties of a module.
`java.lang.String` `classifier` Basic properties of a module.
`java.lang.String` `groupId` Basic properties of a module.
`java.lang.String` `type` Basic properties of a module.
`java.lang.String` `version` Basic properties of a module.

Method Summary
`boolean` `equals(java.lang.Object o)`
`java.io.File` `getArtifactFile()` Gets the artifact file, like a jar.
`java.util.List<DependencyGraph.Edge>` `getBackwardEdges(DependencyGraph g)` Gets the backward dependency edges (modules that depend on this module.)
`java.util.List<DependencyGraph.Node>` `getBackwardNodes(DependencyGraph g)` Gets the nodes that depend on the given node.
`java.util.List<DependencyGraph.Edge>` `getForwardEdges(DependencyGraph g)` Gets the forward dependency edges (modules that this module depends on.)
`java.util.List<DependencyGraph.Node>` `getForwardNodes(DependencyGraph g)` Gets the nodes that the given node depends on.
`java.lang.String` `getId()`
`org.apache.maven.project.MavenProject` `getProject()` Gets the parsed POM for this artifact.
`java.util.List<DependencyGraph.Edge>` `getTrail(DependencyGraph graph)` Builds the dependency trail from this node to the root node, in that order.
`int` `hashCode()`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### groupId

    public final java.lang.String groupId

  Basic properties of a module. If `pom` is non-null, this information is redundant, but it needs to be kept separately for those rare cases where pom==null.

### artifactId

    public final java.lang.String artifactId

  Basic properties of a module. If `pom` is non-null, this information is redundant, but it needs to be kept separately for those rare cases where pom==null.

### version

    public final java.lang.String version

  Basic properties of a module. If `pom` is non-null, this information is redundant, but it needs to be kept separately for those rare cases where pom==null.

### type

    public final java.lang.String type

  Basic properties of a module. If `pom` is non-null, this information is redundant, but it needs to be kept separately for those rare cases where pom==null.

### classifier

    public final java.lang.String classifier

  Basic properties of a module. If `pom` is non-null, this information is redundant, but it needs to be kept separately for those rare cases where pom==null.

Method Detail

### getProject

    public org.apache.maven.project.MavenProject getProject()

  Gets the parsed POM for this artifact.

  Returns:
    null if POM is not available for this module. That can happen for example for system-scoped artifacts.

### getArtifactFile

    public java.io.File getArtifactFile()
                                 throws org.apache.maven.artifact.resolver.AbstractArtifactResolutionException

  Gets the artifact file, like a jar.

  Returns:
    for system-scoped artifacts, this may null. If this node represents the current module being built, this field may or may not be null, depending on whether the artifact is already created in the current build or not. For all the other modules, this is never null.
  Throws:
    `org.apache.maven.artifact.resolver.AbstractArtifactResolutionException` - Failed to resolve artifacat.

### getForwardEdges

    public java.util.List<DependencyGraph.Edge> getForwardEdges(DependencyGraph g)

  Gets the forward dependency edges (modules that this module depends on.)

### getBackwardEdges

    public java.util.List<DependencyGraph.Edge> getBackwardEdges(DependencyGraph g)

  Gets the backward dependency edges (modules that depend on this module.)

### getForwardNodes

    public java.util.List<DependencyGraph.Node> getForwardNodes(DependencyGraph g)

  Gets the nodes that the given node depends on.

### getBackwardNodes

    public java.util.List<DependencyGraph.Node> getBackwardNodes(DependencyGraph g)

  Gets the nodes that depend on the given node.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getId

    public java.lang.String getId()

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### getTrail

    public java.util.List<DependencyGraph.Edge> getTrail(DependencyGraph graph)

  Builds the dependency trail from this node to the root node, in that order. This is useful as diagnostic information.

Copyright © 2011. All Rights Reserved.