mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
Some of transitive dependencies of an artifact may be rejected during conflict resolution. If we disable other dependencies, they may become not rejected and will be unexpectedly added to the library. In order to prevent this, we now show all dependencies including rejected ones in the transitive dependencies tree, and explicitly exclude rejected dependencies if needed. GitOrigin-RevId: 2ed449dda66bee8a990e15fe4026f57ad563936e
37 lines
1.0 KiB
Java
37 lines
1.0 KiB
Java
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
|
package org.jetbrains.idea.maven.aether;
|
|
|
|
import org.eclipse.aether.artifact.Artifact;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.util.List;
|
|
|
|
public class ArtifactDependencyNode {
|
|
private final Artifact myArtifact;
|
|
private final List<ArtifactDependencyNode> myDependencies;
|
|
private final boolean myRejected;
|
|
|
|
public ArtifactDependencyNode(@NotNull Artifact artifact, @NotNull List<ArtifactDependencyNode> dependencies, boolean rejected) {
|
|
myArtifact = artifact;
|
|
myDependencies = dependencies;
|
|
myRejected = rejected;
|
|
}
|
|
|
|
@NotNull
|
|
public Artifact getArtifact() {
|
|
return myArtifact;
|
|
}
|
|
|
|
@NotNull
|
|
public List<ArtifactDependencyNode> getDependencies() {
|
|
return myDependencies;
|
|
}
|
|
|
|
/**
|
|
* Returns {@code true} if this dependency was rejected by conflict resolution process
|
|
*/
|
|
public boolean isRejected() {
|
|
return myRejected;
|
|
}
|
|
}
|