mirror of https://github.com/apache/maven.git
o Fixed NPE
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@792721 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
52519425f7
commit
d56f9e13bb
|
@ -717,7 +717,7 @@ public class DefaultLifecycleExecutor
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new PluginNotFoundException( plugin, null );
|
throw new PluginNotFoundException( plugin, remoteRepositories );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,9 @@ package org.apache.maven.plugin;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||||
import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
|
import org.apache.maven.artifact.resolver.AbstractArtifactResolutionException;
|
||||||
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
|
||||||
import org.apache.maven.model.Plugin;
|
import org.apache.maven.model.Plugin;
|
||||||
|
@ -41,6 +44,13 @@ public class PluginNotFoundException
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PluginNotFoundException( Plugin plugin, List<ArtifactRepository> remoteRepositories )
|
||||||
|
{
|
||||||
|
super( "Plugin could not be found, please check its coordinates for typos", plugin.getGroupId(),
|
||||||
|
plugin.getArtifactId(), plugin.getVersion(), "maven-plugin", null, remoteRepositories, null );
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
public Plugin getPlugin()
|
public Plugin getPlugin()
|
||||||
{
|
{
|
||||||
return plugin;
|
return plugin;
|
||||||
|
|
Loading…
Reference in New Issue