* @return PluginExecution
*/
private PluginExecution parsePluginExecution( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
PluginExecution pluginExecution = new PluginExecution();
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( checkFieldWithDuplicate( parser, "id", null, parsed ) )
{
pluginExecution.setId( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "phase", null, parsed ) )
{
pluginExecution.setPhase( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "goals", null, parsed ) )
{
java.util.List goals = new java.util.ArrayList/*<String>*/();
pluginExecution.setGoals( goals );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "goal" ) )
{
goals.add( getTrimmedValue( parser.nextText() ) );
}
else if ( strict )
{
throw new XmlPullParserException( "Unrecognised association: '" + parser.getName() + "'", parser, null );
}
else
{
// swallow up to end tag since this is not valid
while ( parser.next() != XmlPullParser.END_TAG ) {}
}
}
}
else if ( checkFieldWithDuplicate( parser, "inherited", null, parsed ) )
{
pluginExecution.setInherited( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "configuration", null, parsed ) )
{
pluginExecution.setConfiguration( Xpp3DomBuilder.build( parser ) );
}
else
{
if ( strict )
{