Author: brett Date: Wed Oct 17 21:11:41 2007 New Revision: 585855 URL: http://svn.apache.org/viewvc?rev=585855&view=rev Log: ignore content in profiles - the bootstrap was choking on the core-it-executor which it doesn't need to run
Modified: maven/components/branches/maven-2.0.x/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/ModelReader.java Modified: maven/components/branches/maven-2.0.x/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/ModelReader.java URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/ModelReader.java?rev=585855&r1=585854&r2=585855&view=diff ============================================================================== --- maven/components/branches/maven-2.0.x/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/ModelReader.java (original) +++ maven/components/branches/maven-2.0.x/bootstrap/bootstrap-mini/src/main/java/org/apache/maven/bootstrap/model/ModelReader.java Wed Oct 17 21:11:41 2007 @@ -48,6 +48,8 @@ private Resource currentResource; + private boolean insideProfiles; + private boolean insideParent; private boolean insideDependency; @@ -118,10 +120,20 @@ public void startElement( String uri, String localName, String rawName, Attributes attributes ) { + // skip profile contents + if ( insideProfiles ) + { + return; + } + if ( rawName.equals( "parent" ) ) { insideParent = true; } + else if ( rawName.equals( "profiles" ) ) + { + insideProfiles = true; + } else if ( rawName.equals( "repository" ) ) { currentRepository = new Repository(); @@ -187,6 +199,12 @@ public void characters( char buffer[], int start, int length ) { + // skip profile contents + if ( insideProfiles ) + { + return; + } + bodyText.append( buffer, start, length ); } @@ -198,6 +216,16 @@ public void endElement( String uri, String localName, String rawName ) throws SAXException { + if ( rawName.equals( "profiles" ) ) + { + insideProfiles = false; + } + + if ( insideProfiles ) + { + return; + } + // support both v3 <extend> and v4 <parent> if ( rawName.equals( "parent" ) ) {