This is an automated email from the ASF dual-hosted git repository. hboutemy pushed a commit to annotated tag maven-help-plugin-2.0.1 in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git
commit dbf0a308ccfdcdf8b8febcea18867ea899890aa5 Author: Brett Leslie Porter <br...@apache.org> AuthorDate: Mon Apr 3 01:40:09 2006 +0000 [MPH-10] avoid NPE if plugin is not found git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-help-plugin@390935 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 6 ++++-- src/main/java/org/apache/maven/plugins/help/DescribeMojo.java | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 1389647..1e01028 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,6 @@ -<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <artifactId>maven-plugins</artifactId> <groupId>org.apache.maven.plugins</groupId> @@ -8,7 +10,7 @@ <artifactId>maven-help-plugin</artifactId> <packaging>maven-plugin</packaging> <name>Maven Help Plugin</name> - <version>2.1-SNAPSHOT</version> + <version>2.0.1-SNAPSHOT</version> <description> The Maven Help plugin provides goals aimed at helping to make sense out of the build environment. It includes the ability to view the effective diff --git a/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java b/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java index 505df87..c3dd2f3 100644 --- a/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java +++ b/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java @@ -60,7 +60,7 @@ public class DescribeMojo /** * The plugin/mojo to describe. This must be specified in one of three ways: - * + * <p/> * 1. plugin-prefix * 2. groupId:artifactId * 3. groupId:artifactId:version @@ -347,6 +347,12 @@ public class DescribeMojo } } + if ( descriptor == null ) + { + throw new MojoFailureException( + "Plugin could not be found. If you believe it is correct, check your pluginGroups setting, and run with -U to update the remote configuration" ); + } + return descriptor; } -- To stop receiving notification emails like this one, please contact "commits@maven.apache.org" <commits@maven.apache.org>.