o Fixing a small bug that would cause a NPE if a plugin doesn't contain any mojos.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@180000 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Trygve Laugstol 2005-06-04 16:10:13 +00:00
parent 40d47927de
commit d34ec0926a
1 changed files with 21 additions and 18 deletions

View File

@ -251,6 +251,8 @@ public class DefaultLifecycleExecutor
Map goalMap = plugin.getGoalsAsMap(); Map goalMap = plugin.getGoalsAsMap();
if ( pluginDescriptor.getMojos() != null )
{
for ( Iterator j = pluginDescriptor.getMojos().iterator(); j.hasNext(); ) for ( Iterator j = pluginDescriptor.getMojos().iterator(); j.hasNext(); )
{ {
MojoDescriptor mojoDescriptor = (MojoDescriptor) j.next(); MojoDescriptor mojoDescriptor = (MojoDescriptor) j.next();
@ -279,6 +281,7 @@ public class DefaultLifecycleExecutor
} }
} }
} }
}
/** /**
* Take a look at a mojo contained within a plugin, look to see whether it contributes to a * Take a look at a mojo contained within a plugin, look to see whether it contributes to a