You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2022/01/29 12:35:01 UTC
[maven-dependency-plugin] 01/01: [MDEP-784] Upgrade maven-dependency-analyzer to 1.12.0
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch MDEP-784
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git
commit 3b9011c01b2c9fef3149eb843e62cd6c20904ff7
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sat Jan 29 13:34:38 2022 +0100
[MDEP-784] Upgrade maven-dependency-analyzer to 1.12.0
---
pom.xml | 11 +----------
.../plugins/dependency/analyze/AbstractAnalyzeMojo.java | 13 +++----------
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/pom.xml b/pom.xml
index 49782bd..3c52d0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,15 +100,6 @@ under the License.
<slf4j.version>1.7.32</slf4j.version>
</properties>
- <dependencyManagement>
- <dependencies>
- <dependency> <!-- override older version in maven-dependency-analyzer:1.11.3 -->
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm</artifactId>
- <version>9.2</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
<dependencies>
<!-- maven -->
<dependency>
@@ -227,7 +218,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-dependency-analyzer</artifactId>
- <version>1.11.3</version>
+ <version>1.12.0</version>
<exclusions>
<exclusion>
<artifactId>maven-project</artifactId>
diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
index 98c9a69..e3634a0 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
@@ -43,7 +43,6 @@ import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalyzerExce
import org.codehaus.plexus.PlexusConstants;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.context.Context;
-import org.codehaus.plexus.context.ContextException;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
@@ -276,26 +275,20 @@ public abstract class AbstractAnalyzeMojo
protected ProjectDependencyAnalyzer createProjectDependencyAnalyzer()
throws MojoExecutionException
{
-
- final String role = ProjectDependencyAnalyzer.ROLE;
- final String roleHint = analyzer;
-
try
{
final PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
-
- return (ProjectDependencyAnalyzer) container.lookup( role, roleHint );
+ return container.lookup( ProjectDependencyAnalyzer.class, analyzer );
}
catch ( Exception exception )
{
- throw new MojoExecutionException( "Failed to instantiate ProjectDependencyAnalyser with role " + role
- + " / role-hint " + roleHint, exception );
+ throw new MojoExecutionException( "Failed to instantiate ProjectDependencyAnalyser"
+ + " / role-hint " + analyzer, exception );
}
}
@Override
public void contextualize( Context theContext )
- throws ContextException
{
this.context = theContext;
}