{
foundRoot = true;
}
else if ( strict && ! foundRoot )
{
throw new XmlPullParserException( "Expected root element '" + tagName + "' but found '" + parser.getName() + "'", parser, null );
}
else if ( checkFieldWithDuplicate( parser, "localRepository", null, parsed ) )
{
settings.setLocalRepository( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "interactiveMode", null, parsed ) )
{
settings.setInteractiveMode( getBooleanValue( getTrimmedValue( parser.nextText() ), "interactiveMode", parser, "true" ) );
}
else if ( checkFieldWithDuplicate( parser, "usePluginRegistry", null, parsed ) )
{
settings.setUsePluginRegistry( getBooleanValue( getTrimmedValue( parser.nextText() ), "usePluginRegistry", parser, "false" ) );
}
else if ( checkFieldWithDuplicate( parser, "offline", null, parsed ) )
{
settings.setOffline( getBooleanValue( getTrimmedValue( parser.nextText() ), "offline", parser, "false" ) );
}
else if ( checkFieldWithDuplicate( parser, "proxies", null, parsed ) )
{
java.util.List proxies = new java.util.ArrayList/*<Proxy>*/();
settings.setProxies( proxies );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "proxy" ) )
{
proxies.add( parseProxy( "proxy", 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, "servers", null, parsed ) )
{
java.util.List servers = new java.util.ArrayList/*<Server>*/();
settings.setServers( servers );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "server" ) )
{
servers.add( parseServer( "server", 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, "mirrors", null, parsed ) )
{
java.util.List mirrors = new java.util.ArrayList/*<Mirror>*/();
settings.setMirrors( mirrors );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "mirror" ) )
{
mirrors.add( parseMirror( "mirror", 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, "profiles", null, parsed ) )
{
java.util.List profiles = new java.util.ArrayList/*<Profile>*/();
settings.setProfiles( profiles );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "profile" ) )
{
profiles.add( parseProfile( "profile", 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, "activeProfiles", null, parsed ) )
{
java.util.List activeProfiles = new java.util.ArrayList/*<String>*/();
settings.setActiveProfiles( activeProfiles );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "activeProfile" ) )
{
activeProfiles.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, "pluginGroups", null, parsed ) )
{
java.util.List pluginGroups = new java.util.ArrayList/*<String>*/();
settings.setPluginGroups( pluginGroups );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "pluginGroup" ) )
{
pluginGroups.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 ( strict )
{
throw new XmlPullParserException( "Unrecognised tag: '" + parser.getName() + "'", parser, null );
}
}
eventType = parser.next();
}
return settings;