CPD Results
The following document contains the results of PMD's CPD 6.55.0.
Duplications
File |
Line |
org/apache/maven/repository/internal/DefaultVersionRangeResolver.java |
196 |
org/apache/maven/repository/internal/DefaultVersionResolver.java |
239 |
VersionRangeResult result) {
Versioning versioning = null;
try {
if (metadata != null) {
try (SyncContext syncContext = syncContextFactory.newInstance(session, true)) {
syncContext.acquire(null, Collections.singleton(metadata));
if (metadata.getFile() != null && metadata.getFile().exists()) {
try (InputStream in =
Files.newInputStream(metadata.getFile().toPath())) {
versioning = new Versioning(
new MetadataStaxReader().read(in, false).getVersioning()); |
File |
Line |
org/apache/maven/repository/internal/MavenRepositorySystemUtils.java |
66 |
org/apache/maven/repository/internal/MavenRepositorySystemUtils.java |
126 |
DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(h -> false); // no close handle
DependencyTraverser depTraverser = new FatArtifactTraverser();
session.setDependencyTraverser(depTraverser);
DependencyManager depManager = new ClassicDependencyManager();
session.setDependencyManager(depManager);
DependencySelector depFilter = new AndDependencySelector(
new ScopeDependencySelector("test", "provided"),
new OptionalDependencySelector(),
new ExclusionDependencySelector());
session.setDependencySelector(depFilter);
DependencyGraphTransformer transformer = new ConflictResolver(
new NearestVersionSelector(), new JavaScopeSelector(),
new SimpleOptionalitySelector(), new JavaScopeDeriver());
transformer = new ChainedDependencyGraphTransformer(transformer, new JavaDependencyContextRefiner());
session.setDependencyGraphTransformer(transformer);
session.setArtifactTypeRegistry(newArtifactTypeRegistry()); |