|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.maven.FilteringVisitorSupport
org.universAAL.maven.LaunchOrderDependencyNodeVisitor
public class LaunchOrderDependencyNodeVisitor
This DepepdencyVistor traverses depedency tree in depth-first manner. Visitor needs two collections: nodesByArtifactId and versionsByArtifactId which map respective stringified artifact representations to DependencyNodes. If visitor encounters node which was omitted, then it checks the reason for omitting. If it was omitted because of duplication then visitor looks up the kept node and continues traversing from it. If it was omitted because of conflict then an exception with meaningful message is thrown, unless the visitor is instructed to not throw exception by passing throwExceptionOnConflict parameter to the constructor. After ending a visit to node which was not ommitted the node's artifact is converted to mvn url and aded to mvnUrls list. If the artifact is not a bundle then mvn url is preceded with "wrap:" protocol. After visit is ended all mvnUrls in required launch order are contained in mvnUrl list.
Constructor Summary | |
---|---|
LaunchOrderDependencyNodeVisitor(org.apache.maven.plugin.logging.Log log,
Map nodesByArtifactId,
Map versionsByArtifactId,
boolean throwExceptionOnConflict,
org.apache.maven.artifact.repository.ArtifactRepository localRepository,
org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver,
org.apache.maven.artifact.Artifact dontResolve,
StartSpec[] startSpecs)
Constructor of LaunchOrderDependencyNodeVisitor. |
Method Summary | |
---|---|
protected void |
addNode(org.apache.maven.shared.dependency.tree.DependencyNode node)
Adds node to the execution list. |
boolean |
endVisit(org.apache.maven.shared.dependency.tree.DependencyNode node)
If this method returns true then it means that the next sibling should be visited. |
List |
getMvnUrls()
Gets execution list containing mvn urls. |
void |
setExcludedCoreArtifacts(List<org.apache.maven.artifact.resolver.ResolutionNode> excludedCoreArtifacts)
Sets core uAAL artifacts which should be excluded from created execution list. |
boolean |
visit(org.apache.maven.shared.dependency.tree.DependencyNode node)
If this method returns true then it means that nodes children should be visited. |
Methods inherited from class org.universAAL.maven.FilteringVisitorSupport |
---|
getLog, getVisited, isInScope, stringify, stringify, stringifyNoVersion, stringifyNoVersion, wasVisited |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LaunchOrderDependencyNodeVisitor(org.apache.maven.plugin.logging.Log log, Map nodesByArtifactId, Map versionsByArtifactId, boolean throwExceptionOnConflict, org.apache.maven.artifact.repository.ArtifactRepository localRepository, org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver, org.apache.maven.artifact.Artifact dontResolve, StartSpec[] startSpecs)
log
- object for loggingnodesByArtifactId
- mapping of stringified artifacts (groupId + artifactId +
version) to nodes in the dependency tree. Nodes contain
information about children. Duplicates of nodes are not
included in the mapping.versionsByArtifactId
- mapping of stringified artifacts without version (groupId +
artifactId) to stringified artifacts with version.throwExceptionOnConflict
- flag which turns turning exception on conflictlocalRepository
- maven local repositoryartifactResolver
- maven artifact resolverdontResolve
- artifact which should not be resolvedMethod Detail |
---|
protected final void addNode(org.apache.maven.shared.dependency.tree.DependencyNode node)
node
- which should be added.public final boolean visit(org.apache.maven.shared.dependency.tree.DependencyNode node)
visit
in interface org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor
node
- which should be checked for need of visiting
public final boolean endVisit(org.apache.maven.shared.dependency.tree.DependencyNode node)
endVisit
in interface org.apache.maven.shared.dependency.tree.traversal.DependencyNodeVisitor
node
- which visiting should be finished
public final List getMvnUrls()
public final void setExcludedCoreArtifacts(List<org.apache.maven.artifact.resolver.ResolutionNode> excludedCoreArtifacts)
excludedCoreArtifacts
- list of artifacts to be excluded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |