mirror of https://github.com/apache/maven.git
o merged r609576 (MNG-2925: NullPointerException in PluginDescriptor.getMojo() if there's no mojo in pom.xml)
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@609577 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ff53010e7e
commit
4e41fbea47
|
@ -258,6 +258,11 @@ public class PluginDescriptor
|
|||
|
||||
public MojoDescriptor getMojo( String goal )
|
||||
{
|
||||
if ( getMojos() == null )
|
||||
{
|
||||
return null; // no mojo in this POM
|
||||
}
|
||||
|
||||
// TODO: could we use a map? Maybe if the parent did that for components too, as this is too vulnerable to
|
||||
// changes above not being propogated to the map
|
||||
|
||||
|
|
Loading…
Reference in New Issue