From e347ef7298c9064be7f0774a4e00f94d7d407fcc Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 17 Oct 2024 20:06:35 +0000 Subject: [PATCH] Delete obsolete commented code for issue that was won't fixed 10 years ago (#446) --- .../AbstractFromConfigurationMojo.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java index debac7748..7fbedc4ad 100644 --- a/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java +++ b/src/main/java/org/apache/maven/plugins/dependency/fromConfiguration/AbstractFromConfigurationMojo.java @@ -192,24 +192,14 @@ private boolean checkIfProcessingNeeded(ArtifactItem item) throws ArtifactFilter * Resolves the Artifact from the remote repository if necessary. If no version is specified, it will be retrieved * from the dependency list or from the DependencyManagement section of the pom. * - * @param artifactItem containing information about artifact from plugin configuration. - * @return Artifact object representing the specified file. - * @throws MojoExecutionException with a message if the version can't be found in DependencyManagement. + * @param artifactItem containing information about artifact from plugin configuration + * @return Artifact object representing the specified file + * @throws MojoExecutionException if the version can't be found in DependencyManagement */ protected Artifact getArtifact(ArtifactItem artifactItem) throws MojoExecutionException { Artifact artifact; try { - // mdep-50 - rolledback for now because it's breaking some functionality. - /* - * List listeners = new ArrayList(); Set theSet = new HashSet(); theSet.add( artifact ); - * ArtifactResolutionResult artifactResolutionResult = artifactCollector.collect( theSet, project - * .getArtifact(), managedVersions, this.local, project.getRemoteArtifactRepositories(), - * artifactMetadataSource, null, listeners ); Iterator iter = - * artifactResolutionResult.getArtifactResolutionNodes().iterator(); while ( iter.hasNext() ) { - * ResolutionNode node = (ResolutionNode) iter.next(); artifact = node.getArtifact(); } - */ - ProjectBuildingRequest buildingRequest = newResolveArtifactProjectBuildingRequest(); if (localRepositoryDirectory != null) {