{
extensions.add( parseExtension( "extension", parser, strict ) );
}
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, "defaultGoal", null, parsed ) )
{
build.setDefaultGoal( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "resources", null, parsed ) )
{
java.util.List resources = new java.util.ArrayList/*<Resource>*/();
build.setResources( resources );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "resource" ) )
{
resources.add( parseResource( "resource", parser, strict ) );
}
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, "testResources", null, parsed ) )
{
java.util.List testResources = new java.util.ArrayList/*<Resource>*/();
build.setTestResources( testResources );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "testResource" ) )
{
testResources.add( parseResource( "testResource", parser, strict ) );
}
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, "directory", null, parsed ) )
{
build.setDirectory( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "finalName", null, parsed ) )
{
build.setFinalName( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "filters", null, parsed ) )
{
java.util.List filters = new java.util.ArrayList/*<String>*/();
build.setFilters( filters );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "filter" ) )
{
filters.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, "pluginManagement", null, parsed ) )
{
build.setPluginManagement( parsePluginManagement( "pluginManagement", parser, strict ) );
}
else if ( checkFieldWithDuplicate( parser, "plugins", null, parsed ) )
{
java.util.List plugins = new java.util.ArrayList/*<Plugin>*/();
build.setPlugins( plugins );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "plugin" ) )
{
plugins.add( parsePlugin( "plugin", parser, strict ) );
}
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 ( strict )
{
throw new XmlPullParserException( "Unrecognised tag: '" + parser.getName() + "'", parser, null );
}
else
{
// swallow up to end tag since this is not valid
while ( parser.next() != XmlPullParser.END_TAG ) {}