mirror of https://github.com/apache/maven.git
Verify that plugin has version as precondition in PluginManager.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@769560 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d2bbf510f9
commit
c0d28d2ce4
|
@ -47,6 +47,7 @@ import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
|
|||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
import org.apache.maven.execution.MavenSession;
|
||||
import org.apache.maven.execution.RuntimeInformation;
|
||||
import org.apache.maven.lifecycle.LifecycleExecutionException;
|
||||
import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.model.Plugin;
|
||||
import org.apache.maven.model.PluginExecution;
|
||||
|
@ -1024,6 +1025,11 @@ public class DefaultPluginManager
|
|||
public MojoDescriptor getMojoDescriptor( Plugin plugin, String goal, MavenSession session )
|
||||
throws PluginLoaderException
|
||||
{
|
||||
if ( plugin.getVersion() == null )
|
||||
{
|
||||
throw new IllegalArgumentException("plugin.version: null");
|
||||
}
|
||||
|
||||
PluginDescriptor pluginDescriptor = loadPlugin( plugin, session.getCurrentProject(), session );
|
||||
|
||||
MojoDescriptor mojoDescriptor = pluginDescriptor.getMojo( goal );
|
||||
|
|
Loading…
Reference in New Issue