View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.5.1,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.buildcache.xml.config.io.xpp3;
25  
26    //---------------------------------/
27   //- Imported classes and packages -/
28  //---------------------------------/
29  
30  import java.io.IOException;
31  import java.io.InputStream;
32  import java.io.Reader;
33  import java.text.DateFormat;
34  import org.apache.maven.buildcache.xml.config.AttachedOutputs;
35  import org.apache.maven.buildcache.xml.config.CacheConfig;
36  import org.apache.maven.buildcache.xml.config.Configuration;
37  import org.apache.maven.buildcache.xml.config.CoordinatesBase;
38  import org.apache.maven.buildcache.xml.config.DirName;
39  import org.apache.maven.buildcache.xml.config.DirScanConfig;
40  import org.apache.maven.buildcache.xml.config.Discovery;
41  import org.apache.maven.buildcache.xml.config.EffectivePom;
42  import org.apache.maven.buildcache.xml.config.Exclude;
43  import org.apache.maven.buildcache.xml.config.Executables;
44  import org.apache.maven.buildcache.xml.config.ExecutionConfigurationScan;
45  import org.apache.maven.buildcache.xml.config.ExecutionControl;
46  import org.apache.maven.buildcache.xml.config.ExecutionIdsList;
47  import org.apache.maven.buildcache.xml.config.GoalId;
48  import org.apache.maven.buildcache.xml.config.GoalReconciliation;
49  import org.apache.maven.buildcache.xml.config.GoalsList;
50  import org.apache.maven.buildcache.xml.config.Include;
51  import org.apache.maven.buildcache.xml.config.Input;
52  import org.apache.maven.buildcache.xml.config.Local;
53  import org.apache.maven.buildcache.xml.config.MultiModule;
54  import org.apache.maven.buildcache.xml.config.Output;
55  import org.apache.maven.buildcache.xml.config.OutputExclude;
56  import org.apache.maven.buildcache.xml.config.PathSet;
57  import org.apache.maven.buildcache.xml.config.PluginConfigurationScan;
58  import org.apache.maven.buildcache.xml.config.PluginSet;
59  import org.apache.maven.buildcache.xml.config.ProjectVersioning;
60  import org.apache.maven.buildcache.xml.config.PropertyName;
61  import org.apache.maven.buildcache.xml.config.Reconcile;
62  import org.apache.maven.buildcache.xml.config.Remote;
63  import org.apache.maven.buildcache.xml.config.TagExclude;
64  import org.apache.maven.buildcache.xml.config.TagScanConfig;
65  import org.apache.maven.buildcache.xml.config.TrackedProperty;
66  import org.codehaus.plexus.util.xml.XmlStreamReader;
67  import org.codehaus.plexus.util.xml.pull.EntityReplacementMap;
68  import org.codehaus.plexus.util.xml.pull.MXParser;
69  import org.codehaus.plexus.util.xml.pull.XmlPullParser;
70  import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
71  
72  /**
73   * Class BuildCacheConfigXpp3Reader.
74   * 
75   * @version $Revision$ $Date$
76   */
77  @SuppressWarnings( "all" )
78  public class BuildCacheConfigXpp3Reader
79  {
80  
81        //--------------------------/
82       //- Class/Member Variables -/
83      //--------------------------/
84  
85      /**
86       * If set the parser will be loaded with all single characters
87       * from the XHTML specification.
88       * The entities used:
89       * <ul>
90       * <li>http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent</li>
91       * <li>http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent</li>
92       * <li>http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent</li>
93       * </ul>
94       */
95      private boolean addDefaultEntities = true;
96  
97      /**
98       * Field contentTransformer.
99       */
100     public final ContentTransformer contentTransformer;
101 
102 
103       //----------------/
104      //- Constructors -/
105     //----------------/
106 
107     public BuildCacheConfigXpp3Reader()
108     {
109         this( new ContentTransformer()
110         {
111             public String transform( String source, String fieldName )
112             {
113                 return source;
114             }
115         } );
116     } //-- org.apache.maven.buildcache.xml.config.io.xpp3.BuildCacheConfigXpp3Reader()
117 
118     public BuildCacheConfigXpp3Reader(ContentTransformer contentTransformer)
119     {
120         this.contentTransformer = contentTransformer;
121     } //-- org.apache.maven.buildcache.xml.config.io.xpp3.BuildCacheConfigXpp3Reader(ContentTransformer)
122 
123 
124       //-----------/
125      //- Methods -/
126     //-----------/
127 
128     /**
129      * Method checkFieldWithDuplicate.
130      * 
131      * @param parser a parser object.
132      * @param parsed a parsed object.
133      * @param alias a alias object.
134      * @param tagName a tagName object.
135      * @throws XmlPullParserException XmlPullParserException if
136      * any.
137      * @return boolean
138      */
139     private boolean checkFieldWithDuplicate( XmlPullParser parser, String tagName, String alias, java.util.Set<String> parsed )
140         throws XmlPullParserException
141     {
142         if ( !( parser.getName().equals( tagName ) || parser.getName().equals( alias ) ) )
143         {
144             return false;
145         }
146         if ( !parsed.add( tagName ) )
147         {
148             throw new XmlPullParserException( "Duplicated tag: '" + tagName + "'", parser, null );
149         }
150         return true;
151     } //-- boolean checkFieldWithDuplicate( XmlPullParser, String, String, java.util.Set )
152 
153     /**
154      * Method checkUnknownAttribute.
155      * 
156      * @param parser a parser object.
157      * @param strict a strict object.
158      * @param tagName a tagName object.
159      * @param attribute a attribute object.
160      * @throws XmlPullParserException XmlPullParserException if
161      * any.
162      * @throws IOException IOException if any.
163      */
164     private void checkUnknownAttribute( XmlPullParser parser, String attribute, String tagName, boolean strict )
165         throws XmlPullParserException, IOException
166     {
167         // strictXmlAttributes = true for model: if strict == true, not only elements are checked but attributes too
168         if ( strict )
169         {
170             throw new XmlPullParserException( "Unknown attribute '" + attribute + "' for tag '" + tagName + "'", parser, null );
171         }
172     } //-- void checkUnknownAttribute( XmlPullParser, String, String, boolean )
173 
174     /**
175      * Method checkUnknownElement.
176      * 
177      * @param parser a parser object.
178      * @param strict a strict object.
179      * @throws XmlPullParserException XmlPullParserException if
180      * any.
181      * @throws IOException IOException if any.
182      */
183     private void checkUnknownElement( XmlPullParser parser, boolean strict )
184         throws XmlPullParserException, IOException
185     {
186         if ( strict )
187         {
188             throw new XmlPullParserException( "Unrecognised tag: '" + parser.getName() + "'", parser, null );
189         }
190 
191         for ( int unrecognizedTagCount = 1; unrecognizedTagCount > 0; )
192         {
193             int eventType = parser.next();
194             if ( eventType == XmlPullParser.START_TAG )
195             {
196                 unrecognizedTagCount++;
197             }
198             else if ( eventType == XmlPullParser.END_TAG )
199             {
200                 unrecognizedTagCount--;
201             }
202         }
203     } //-- void checkUnknownElement( XmlPullParser, boolean )
204 
205     /**
206      * Returns the state of the "add default entities" flag.
207      * 
208      * @return boolean
209      */
210     public boolean getAddDefaultEntities()
211     {
212         return addDefaultEntities;
213     } //-- boolean getAddDefaultEntities()
214 
215     /**
216      * Method getBooleanValue.
217      * 
218      * @param s a s object.
219      * @param parser a parser object.
220      * @param attribute a attribute object.
221      * @throws XmlPullParserException XmlPullParserException if
222      * any.
223      * @return boolean
224      */
225     private boolean getBooleanValue( String s, String attribute, XmlPullParser parser )
226         throws XmlPullParserException
227     {
228         return getBooleanValue( s, attribute, parser, null );
229     } //-- boolean getBooleanValue( String, String, XmlPullParser )
230 
231     /**
232      * Method getBooleanValue.
233      * 
234      * @param s a s object.
235      * @param defaultValue a defaultValue object.
236      * @param parser a parser object.
237      * @param attribute a attribute object.
238      * @throws XmlPullParserException XmlPullParserException if
239      * any.
240      * @return boolean
241      */
242     private boolean getBooleanValue( String s, String attribute, XmlPullParser parser, String defaultValue )
243         throws XmlPullParserException
244     {
245         if ( s != null && s.length() != 0 )
246         {
247             return Boolean.valueOf( s ).booleanValue();
248         }
249         if ( defaultValue != null )
250         {
251             return Boolean.valueOf( defaultValue ).booleanValue();
252         }
253         return false;
254     } //-- boolean getBooleanValue( String, String, XmlPullParser, String )
255 
256     /**
257      * Method getByteValue.
258      * 
259      * @param s a s object.
260      * @param strict a strict object.
261      * @param parser a parser object.
262      * @param attribute a attribute object.
263      * @throws XmlPullParserException XmlPullParserException if
264      * any.
265      * @return byte
266      */
267     private byte getByteValue( String s, String attribute, XmlPullParser parser, boolean strict )
268         throws XmlPullParserException
269     {
270         if ( s != null )
271         {
272             try
273             {
274                 return Byte.valueOf( s ).byteValue();
275             }
276             catch ( NumberFormatException nfe )
277             {
278                 if ( strict )
279                 {
280                     throw new XmlPullParserException( "Unable to parse element '" + attribute + "', must be a byte", parser, nfe );
281                 }
282             }
283         }
284         return 0;
285     } //-- byte getByteValue( String, String, XmlPullParser, boolean )
286 
287     /**
288      * Method getCharacterValue.
289      * 
290      * @param s a s object.
291      * @param parser a parser object.
292      * @param attribute a attribute object.
293      * @throws XmlPullParserException XmlPullParserException if
294      * any.
295      * @return char
296      */
297     private char getCharacterValue( String s, String attribute, XmlPullParser parser )
298         throws XmlPullParserException
299     {
300         if ( s != null )
301         {
302             return s.charAt( 0 );
303         }
304         return 0;
305     } //-- char getCharacterValue( String, String, XmlPullParser )
306 
307     /**
308      * Method getDateValue.
309      * 
310      * @param s a s object.
311      * @param parser a parser object.
312      * @param attribute a attribute object.
313      * @throws XmlPullParserException XmlPullParserException if
314      * any.
315      * @return Date
316      */
317     private java.util.Date getDateValue( String s, String attribute, XmlPullParser parser )
318         throws XmlPullParserException
319     {
320         return getDateValue( s, attribute, null, parser );
321     } //-- java.util.Date getDateValue( String, String, XmlPullParser )
322 
323     /**
324      * Method getDateValue.
325      * 
326      * @param s a s object.
327      * @param parser a parser object.
328      * @param dateFormat a dateFormat object.
329      * @param attribute a attribute object.
330      * @throws XmlPullParserException XmlPullParserException if
331      * any.
332      * @return Date
333      */
334     private java.util.Date getDateValue( String s, String attribute, String dateFormat, XmlPullParser parser )
335         throws XmlPullParserException
336     {
337         if ( s != null )
338         {
339             String effectiveDateFormat = dateFormat;
340             if ( dateFormat == null )
341             {
342                 effectiveDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS";
343             }
344             if ( "long".equals( effectiveDateFormat ) )
345             {
346                 try
347                 {
348                     return new java.util.Date( Long.parseLong( s ) );
349                 }
350                 catch ( NumberFormatException e )
351                 {
352                     throw new XmlPullParserException( e.getMessage(), parser, e );
353                 }
354             }
355             else
356             {
357                 try
358                 {
359                     DateFormat dateParser = new java.text.SimpleDateFormat( effectiveDateFormat, java.util.Locale.US );
360                     return dateParser.parse( s );
361                 }
362                 catch ( java.text.ParseException e )
363                 {
364                     throw new XmlPullParserException( e.getMessage(), parser, e );
365                 }
366             }
367         }
368         return null;
369     } //-- java.util.Date getDateValue( String, String, String, XmlPullParser )
370 
371     /**
372      * Method getDoubleValue.
373      * 
374      * @param s a s object.
375      * @param strict a strict object.
376      * @param parser a parser object.
377      * @param attribute a attribute object.
378      * @throws XmlPullParserException XmlPullParserException if
379      * any.
380      * @return double
381      */
382     private double getDoubleValue( String s, String attribute, XmlPullParser parser, boolean strict )
383         throws XmlPullParserException
384     {
385         if ( s != null )
386         {
387             try
388             {
389                 return Double.valueOf( s ).doubleValue();
390             }
391             catch ( NumberFormatException nfe )
392             {
393                 if ( strict )
394                 {
395                     throw new XmlPullParserException( "Unable to parse element '" + attribute + "', must be a floating point number", parser, nfe );
396                 }
397             }
398         }
399         return 0;
400     } //-- double getDoubleValue( String, String, XmlPullParser, boolean )
401 
402     /**
403      * Method getFloatValue.
404      * 
405      * @param s a s object.
406      * @param strict a strict object.
407      * @param parser a parser object.
408      * @param attribute a attribute object.
409      * @throws XmlPullParserException XmlPullParserException if
410      * any.
411      * @return float
412      */
413     private float getFloatValue( String s, String attribute, XmlPullParser parser, boolean strict )
414         throws XmlPullParserException
415     {
416         if ( s != null )
417         {
418             try
419             {
420                 return Float.valueOf( s ).floatValue();
421             }
422             catch ( NumberFormatException nfe )
423             {
424                 if ( strict )
425                 {
426                     throw new XmlPullParserException( "Unable to parse element '" + attribute + "', must be a floating point number", parser, nfe );
427                 }
428             }
429         }
430         return 0;
431     } //-- float getFloatValue( String, String, XmlPullParser, boolean )
432 
433     /**
434      * Method getIntegerValue.
435      * 
436      * @param s a s object.
437      * @param strict a strict object.
438      * @param parser a parser object.
439      * @param attribute a attribute object.
440      * @throws XmlPullParserException XmlPullParserException if
441      * any.
442      * @return int
443      */
444     private int getIntegerValue( String s, String attribute, XmlPullParser parser, boolean strict )
445         throws XmlPullParserException
446     {
447         if ( s != null )
448         {
449             try
450             {
451                 return Integer.valueOf( s ).intValue();
452             }
453             catch ( NumberFormatException nfe )
454             {
455                 if ( strict )
456                 {
457                     throw new XmlPullParserException( "Unable to parse element '" + attribute + "', must be an integer", parser, nfe );
458                 }
459             }
460         }
461         return 0;
462     } //-- int getIntegerValue( String, String, XmlPullParser, boolean )
463 
464     /**
465      * Method getLongValue.
466      * 
467      * @param s a s object.
468      * @param strict a strict object.
469      * @param parser a parser object.
470      * @param attribute a attribute object.
471      * @throws XmlPullParserException XmlPullParserException if
472      * any.
473      * @return long
474      */
475     private long getLongValue( String s, String attribute, XmlPullParser parser, boolean strict )
476         throws XmlPullParserException
477     {
478         if ( s != null )
479         {
480             try
481             {
482                 return Long.valueOf( s ).longValue();
483             }
484             catch ( NumberFormatException nfe )
485             {
486                 if ( strict )
487                 {
488                     throw new XmlPullParserException( "Unable to parse element '" + attribute + "', must be a long integer", parser, nfe );
489                 }
490             }
491         }
492         return 0;
493     } //-- long getLongValue( String, String, XmlPullParser, boolean )
494 
495     /**
496      * Method getRequiredAttributeValue.
497      * 
498      * @param s a s object.
499      * @param strict a strict object.
500      * @param parser a parser object.
501      * @param attribute a attribute object.
502      * @throws XmlPullParserException XmlPullParserException if
503      * any.
504      * @return String
505      */
506     private String getRequiredAttributeValue( String s, String attribute, XmlPullParser parser, boolean strict )
507         throws XmlPullParserException
508     {
509         if ( s == null )
510         {
511             if ( strict )
512             {
513                 throw new XmlPullParserException( "Missing required value for attribute '" + attribute + "'", parser, null );
514             }
515         }
516         return s;
517     } //-- String getRequiredAttributeValue( String, String, XmlPullParser, boolean )
518 
519     /**
520      * Method getShortValue.
521      * 
522      * @param s a s object.
523      * @param strict a strict object.
524      * @param parser a parser object.
525      * @param attribute a attribute object.
526      * @throws XmlPullParserException XmlPullParserException if
527      * any.
528      * @return short
529      */
530     private short getShortValue( String s, String attribute, XmlPullParser parser, boolean strict )
531         throws XmlPullParserException
532     {
533         if ( s != null )
534         {
535             try
536             {
537                 return Short.valueOf( s ).shortValue();
538             }
539             catch ( NumberFormatException nfe )
540             {
541                 if ( strict )
542                 {
543                     throw new XmlPullParserException( "Unable to parse element '" + attribute + "', must be a short integer", parser, nfe );
544                 }
545             }
546         }
547         return 0;
548     } //-- short getShortValue( String, String, XmlPullParser, boolean )
549 
550     /**
551      * Method getTrimmedValue.
552      * 
553      * @param s a s object.
554      * @return String
555      */
556     private String getTrimmedValue( String s )
557     {
558         if ( s != null )
559         {
560             s = s.trim();
561         }
562         return s;
563     } //-- String getTrimmedValue( String )
564 
565     /**
566      * Method interpolatedTrimmed.
567      * 
568      * @param value a value object.
569      * @param context a context object.
570      * @return String
571      */
572     private String interpolatedTrimmed( String value, String context )
573     {
574         return getTrimmedValue( contentTransformer.transform( value, context ) );
575     } //-- String interpolatedTrimmed( String, String )
576 
577     /**
578      * Method nextTag.
579      * 
580      * @param parser a parser object.
581      * @throws IOException IOException if any.
582      * @throws XmlPullParserException XmlPullParserException if
583      * any.
584      * @return int
585      */
586     private int nextTag( XmlPullParser parser )
587         throws IOException, XmlPullParserException
588     {
589         int eventType = parser.next();
590         if ( eventType == XmlPullParser.TEXT )
591         {
592             eventType = parser.next();
593         }
594         if ( eventType != XmlPullParser.START_TAG && eventType != XmlPullParser.END_TAG )
595         {
596             throw new XmlPullParserException( "expected START_TAG or END_TAG not " + XmlPullParser.TYPES[eventType], parser, null );
597         }
598         return eventType;
599     } //-- int nextTag( XmlPullParser )
600 
601     /**
602      * Method read.
603      * 
604      * @param parser a parser object.
605      * @param strict a strict object.
606      * @throws IOException IOException if any.
607      * @throws XmlPullParserException XmlPullParserException if
608      * any.
609      * @return CacheConfig
610      */
611     public CacheConfig read( XmlPullParser parser, boolean strict )
612         throws IOException, XmlPullParserException
613     {
614         CacheConfig cacheConfig = null;
615         int eventType = parser.getEventType();
616         boolean parsed = false;
617         while ( eventType != XmlPullParser.END_DOCUMENT )
618         {
619             if ( eventType == XmlPullParser.START_TAG )
620             {
621                 if ( strict && ! "cache".equals( parser.getName() ) )
622                 {
623                     throw new XmlPullParserException( "Expected root element 'cache' but found '" + parser.getName() + "'", parser, null );
624                 }
625                 else if ( parsed )
626                 {
627                     // fallback, already expected a XmlPullParserException due to invalid XML
628                     throw new XmlPullParserException( "Duplicated tag: 'cache'", parser, null );
629                 }
630                 cacheConfig = parseCacheConfig( parser, strict );
631                 cacheConfig.setModelEncoding( parser.getInputEncoding() );
632                 parsed = true;
633             }
634             eventType = parser.next();
635         }
636         if ( parsed )
637         {
638             return cacheConfig;
639         }
640         throw new XmlPullParserException( "Expected root element 'cache' but found no element at all: invalid XML document", parser, null );
641     } //-- CacheConfig read( XmlPullParser, boolean )
642 
643     /**
644      * @see XmlStreamReader
645      * 
646      * @param reader a reader object.
647      * @param strict a strict object.
648      * @throws IOException IOException if any.
649      * @throws XmlPullParserException XmlPullParserException if
650      * any.
651      * @return CacheConfig
652      */
653     public CacheConfig read( Reader reader, boolean strict )
654         throws IOException, XmlPullParserException
655     {
656         XmlPullParser parser = addDefaultEntities ? new MXParser(EntityReplacementMap.defaultEntityReplacementMap) : new MXParser( );
657 
658         parser.setInput( reader );
659 
660 
661         return read( parser, strict );
662     } //-- CacheConfig read( Reader, boolean )
663 
664     /**
665      * @see XmlStreamReader
666      * 
667      * @param reader a reader object.
668      * @throws IOException IOException if any.
669      * @throws XmlPullParserException XmlPullParserException if
670      * any.
671      * @return CacheConfig
672      */
673     public CacheConfig read( Reader reader )
674         throws IOException, XmlPullParserException
675     {
676         return read( reader, true );
677     } //-- CacheConfig read( Reader )
678 
679     /**
680      * Method read.
681      * 
682      * @param in a in object.
683      * @param strict a strict object.
684      * @throws IOException IOException if any.
685      * @throws XmlPullParserException XmlPullParserException if
686      * any.
687      * @return CacheConfig
688      */
689     public CacheConfig read( InputStream in, boolean strict )
690         throws IOException, XmlPullParserException
691     {
692         return read( new XmlStreamReader( in ), strict );
693     } //-- CacheConfig read( InputStream, boolean )
694 
695     /**
696      * Method read.
697      * 
698      * @param in a in object.
699      * @throws IOException IOException if any.
700      * @throws XmlPullParserException XmlPullParserException if
701      * any.
702      * @return CacheConfig
703      */
704     public CacheConfig read( InputStream in )
705         throws IOException, XmlPullParserException
706     {
707         return read( new XmlStreamReader( in ) );
708     } //-- CacheConfig read( InputStream )
709 
710     /**
711      * Method parseAttachedOutputs.
712      * 
713      * @param parser a parser object.
714      * @param strict a strict object.
715      * @throws IOException IOException if any.
716      * @throws XmlPullParserException XmlPullParserException if
717      * any.
718      * @return AttachedOutputs
719      */
720     private AttachedOutputs parseAttachedOutputs( XmlPullParser parser, boolean strict )
721         throws IOException, XmlPullParserException
722     {
723         String tagName = parser.getName();
724         AttachedOutputs attachedOutputs = new AttachedOutputs();
725         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
726         {
727             String name = parser.getAttributeName( i );
728             String value = parser.getAttributeValue( i );
729 
730             if ( name.indexOf( ':' ) >= 0 )
731             {
732                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
733             }
734             else
735             {
736                 checkUnknownAttribute( parser, name, tagName, strict );
737             }
738         }
739         java.util.Set<String> parsed = new java.util.HashSet<String>();
740         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
741         {
742             if ( checkFieldWithDuplicate( parser, "preservePermissions", null, parsed ) )
743             {
744                 attachedOutputs.setPreservePermissions( getBooleanValue( interpolatedTrimmed( parser.nextText(), "preservePermissions" ), "preservePermissions", parser, "true" ) );
745             }
746             else if ( checkFieldWithDuplicate( parser, "dirNames", null, parsed ) )
747             {
748                 java.util.List<DirName> dirNames = new java.util.ArrayList<DirName>();
749                 while ( parser.nextTag() == XmlPullParser.START_TAG )
750                 {
751                     if ( "dirName".equals( parser.getName() ) )
752                     {
753                         dirNames.add( parseDirName( parser, strict ) );
754                     }
755                     else
756                     {
757                         checkUnknownElement( parser, strict );
758                     }
759                 }
760                 attachedOutputs.setDirNames( dirNames );
761             }
762             else
763             {
764                 checkUnknownElement( parser, strict );
765             }
766         }
767         return attachedOutputs;
768     } //-- AttachedOutputs parseAttachedOutputs( XmlPullParser, boolean )
769 
770     /**
771      * Method parseCacheConfig.
772      * 
773      * @param parser a parser object.
774      * @param strict a strict object.
775      * @throws IOException IOException if any.
776      * @throws XmlPullParserException XmlPullParserException if
777      * any.
778      * @return CacheConfig
779      */
780     private CacheConfig parseCacheConfig( XmlPullParser parser, boolean strict )
781         throws IOException, XmlPullParserException
782     {
783         String tagName = parser.getName();
784         CacheConfig cacheConfig = new CacheConfig();
785         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
786         {
787             String name = parser.getAttributeName( i );
788             String value = parser.getAttributeValue( i );
789 
790             if ( name.indexOf( ':' ) >= 0 )
791             {
792                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
793             }
794             else if ( "xmlns".equals( name ) )
795             {
796                 // ignore xmlns attribute in root class, which is a reserved attribute name
797             }
798             else
799             {
800                 checkUnknownAttribute( parser, name, tagName, strict );
801             }
802         }
803         java.util.Set<String> parsed = new java.util.HashSet<String>();
804         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
805         {
806             if ( checkFieldWithDuplicate( parser, "configuration", null, parsed ) )
807             {
808                 cacheConfig.setConfiguration( parseConfiguration( parser, strict ) );
809             }
810             else if ( checkFieldWithDuplicate( parser, "input", null, parsed ) )
811             {
812                 cacheConfig.setInput( parseInput( parser, strict ) );
813             }
814             else if ( checkFieldWithDuplicate( parser, "output", null, parsed ) )
815             {
816                 cacheConfig.setOutput( parseOutput( parser, strict ) );
817             }
818             else if ( checkFieldWithDuplicate( parser, "executionControl", null, parsed ) )
819             {
820                 cacheConfig.setExecutionControl( parseExecutionControl( parser, strict ) );
821             }
822             else
823             {
824                 checkUnknownElement( parser, strict );
825             }
826         }
827         return cacheConfig;
828     } //-- CacheConfig parseCacheConfig( XmlPullParser, boolean )
829 
830     /**
831      * Method parseConfiguration.
832      * 
833      * @param parser a parser object.
834      * @param strict a strict object.
835      * @throws IOException IOException if any.
836      * @throws XmlPullParserException XmlPullParserException if
837      * any.
838      * @return Configuration
839      */
840     private Configuration parseConfiguration( XmlPullParser parser, boolean strict )
841         throws IOException, XmlPullParserException
842     {
843         String tagName = parser.getName();
844         Configuration configuration = new Configuration();
845         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
846         {
847             String name = parser.getAttributeName( i );
848             String value = parser.getAttributeValue( i );
849 
850             if ( name.indexOf( ':' ) >= 0 )
851             {
852                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
853             }
854             else
855             {
856                 checkUnknownAttribute( parser, name, tagName, strict );
857             }
858         }
859         java.util.Set<String> parsed = new java.util.HashSet<String>();
860         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
861         {
862             if ( checkFieldWithDuplicate( parser, "enabled", null, parsed ) )
863             {
864                 configuration.setEnabled( getBooleanValue( interpolatedTrimmed( parser.nextText(), "enabled" ), "enabled", parser, "true" ) );
865             }
866             else if ( checkFieldWithDuplicate( parser, "hashAlgorithm", null, parsed ) )
867             {
868                 configuration.setHashAlgorithm( interpolatedTrimmed( parser.nextText(), "hashAlgorithm" ) );
869             }
870             else if ( checkFieldWithDuplicate( parser, "validateXml", null, parsed ) )
871             {
872                 configuration.setValidateXml( getBooleanValue( interpolatedTrimmed( parser.nextText(), "validateXml" ), "validateXml", parser, "false" ) );
873             }
874             else if ( checkFieldWithDuplicate( parser, "mandatoryClean", null, parsed ) )
875             {
876                 configuration.setMandatoryClean( getBooleanValue( interpolatedTrimmed( parser.nextText(), "mandatoryClean" ), "mandatoryClean", parser, "false" ) );
877             }
878             else if ( checkFieldWithDuplicate( parser, "multiModule", null, parsed ) )
879             {
880                 configuration.setMultiModule( parseMultiModule( parser, strict ) );
881             }
882             else if ( checkFieldWithDuplicate( parser, "projectVersioning", null, parsed ) )
883             {
884                 configuration.setProjectVersioning( parseProjectVersioning( parser, strict ) );
885             }
886             else if ( checkFieldWithDuplicate( parser, "remote", null, parsed ) )
887             {
888                 configuration.setRemote( parseRemote( parser, strict ) );
889             }
890             else if ( checkFieldWithDuplicate( parser, "attachedOutputs", null, parsed ) )
891             {
892                 configuration.setAttachedOutputs( parseAttachedOutputs( parser, strict ) );
893             }
894             else if ( checkFieldWithDuplicate( parser, "local", null, parsed ) )
895             {
896                 configuration.setLocal( parseLocal( parser, strict ) );
897             }
898             else if ( checkFieldWithDuplicate( parser, "debugs", null, parsed ) )
899             {
900                 java.util.List<String> debugs = new java.util.ArrayList<String>();
901                 while ( parser.nextTag() == XmlPullParser.START_TAG )
902                 {
903                     if ( "debug".equals( parser.getName() ) )
904                     {
905                         debugs.add( interpolatedTrimmed( parser.nextText(), "debugs" ) );
906                     }
907                     else
908                     {
909                         checkUnknownElement( parser, strict );
910                     }
911                 }
912                 configuration.setDebugs( debugs );
913             }
914             else
915             {
916                 checkUnknownElement( parser, strict );
917             }
918         }
919         return configuration;
920     } //-- Configuration parseConfiguration( XmlPullParser, boolean )
921 
922     /**
923      * Method parseCoordinatesBase.
924      * 
925      * @param parser a parser object.
926      * @param strict a strict object.
927      * @throws IOException IOException if any.
928      * @throws XmlPullParserException XmlPullParserException if
929      * any.
930      * @return CoordinatesBase
931      */
932     private CoordinatesBase parseCoordinatesBase( XmlPullParser parser, boolean strict )
933         throws IOException, XmlPullParserException
934     {
935         String tagName = parser.getName();
936         CoordinatesBase coordinatesBase = new CoordinatesBase();
937         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
938         {
939             String name = parser.getAttributeName( i );
940             String value = parser.getAttributeValue( i );
941 
942             if ( name.indexOf( ':' ) >= 0 )
943             {
944                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
945             }
946             else if ( "groupId".equals( name ) )
947             {
948                 coordinatesBase.setGroupId( interpolatedTrimmed( value, "groupId" ) );
949             }
950             else if ( "artifactId".equals( name ) )
951             {
952                 coordinatesBase.setArtifactId( interpolatedTrimmed( value, "artifactId" ) );
953             }
954             else
955             {
956                 checkUnknownAttribute( parser, name, tagName, strict );
957             }
958         }
959         java.util.Set<String> parsed = new java.util.HashSet<String>();
960         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
961         {
962             checkUnknownElement( parser, strict );
963         }
964         return coordinatesBase;
965     } //-- CoordinatesBase parseCoordinatesBase( XmlPullParser, boolean )
966 
967     /**
968      * Method parseDirName.
969      * 
970      * @param parser a parser object.
971      * @param strict a strict object.
972      * @throws IOException IOException if any.
973      * @throws XmlPullParserException XmlPullParserException if
974      * any.
975      * @return DirName
976      */
977     private DirName parseDirName( XmlPullParser parser, boolean strict )
978         throws IOException, XmlPullParserException
979     {
980         String tagName = parser.getName();
981         DirName dirName = new DirName();
982         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
983         {
984             String name = parser.getAttributeName( i );
985             String value = parser.getAttributeValue( i );
986 
987             if ( name.indexOf( ':' ) >= 0 )
988             {
989                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
990             }
991             else if ( "glob".equals( name ) )
992             {
993                 dirName.setGlob( interpolatedTrimmed( value, "glob" ) );
994             }
995             else
996             {
997                 checkUnknownAttribute( parser, name, tagName, strict );
998             }
999         }
1000         dirName.setValue( interpolatedTrimmed( parser.nextText(), "value" ) );
1001         return dirName;
1002     } //-- DirName parseDirName( XmlPullParser, boolean )
1003 
1004     /**
1005      * Method parseDirScanConfig.
1006      * 
1007      * @param parser a parser object.
1008      * @param strict a strict object.
1009      * @throws IOException IOException if any.
1010      * @throws XmlPullParserException XmlPullParserException if
1011      * any.
1012      * @return DirScanConfig
1013      */
1014     private DirScanConfig parseDirScanConfig( XmlPullParser parser, boolean strict )
1015         throws IOException, XmlPullParserException
1016     {
1017         String tagName = parser.getName();
1018         DirScanConfig dirScanConfig = new DirScanConfig();
1019         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1020         {
1021             String name = parser.getAttributeName( i );
1022             String value = parser.getAttributeValue( i );
1023 
1024             if ( name.indexOf( ':' ) >= 0 )
1025             {
1026                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1027             }
1028             else if ( "ignoreParent".equals( name ) )
1029             {
1030                 dirScanConfig.setIgnoreParent( getBooleanValue( interpolatedTrimmed( value, "ignoreParent" ), "ignoreParent", parser, "false" ) );
1031             }
1032             else if ( "mode".equals( name ) )
1033             {
1034                 dirScanConfig.setMode( interpolatedTrimmed( value, "mode" ) );
1035             }
1036             else
1037             {
1038                 checkUnknownAttribute( parser, name, tagName, strict );
1039             }
1040         }
1041         java.util.Set<String> parsed = new java.util.HashSet<String>();
1042         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1043         {
1044             if ( checkFieldWithDuplicate( parser, "includes", null, parsed ) )
1045             {
1046                 java.util.List<TagScanConfig> includes = new java.util.ArrayList<TagScanConfig>();
1047                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1048                 {
1049                     if ( "include".equals( parser.getName() ) )
1050                     {
1051                         includes.add( parseTagScanConfig( parser, strict ) );
1052                     }
1053                     else
1054                     {
1055                         checkUnknownElement( parser, strict );
1056                     }
1057                 }
1058                 dirScanConfig.setIncludes( includes );
1059             }
1060             else if ( checkFieldWithDuplicate( parser, "excludes", null, parsed ) )
1061             {
1062                 java.util.List<TagExclude> excludes = new java.util.ArrayList<TagExclude>();
1063                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1064                 {
1065                     if ( "exclude".equals( parser.getName() ) )
1066                     {
1067                         excludes.add( parseTagExclude( parser, strict ) );
1068                     }
1069                     else
1070                     {
1071                         checkUnknownElement( parser, strict );
1072                     }
1073                 }
1074                 dirScanConfig.setExcludes( excludes );
1075             }
1076             else if ( checkFieldWithDuplicate( parser, "tagScanConfigs", null, parsed ) )
1077             {
1078                 java.util.List<TagScanConfig> tagScanConfigs = new java.util.ArrayList<TagScanConfig>();
1079                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1080                 {
1081                     if ( "tagScanConfig".equals( parser.getName() ) )
1082                     {
1083                         tagScanConfigs.add( parseTagScanConfig( parser, strict ) );
1084                     }
1085                     else
1086                     {
1087                         checkUnknownElement( parser, strict );
1088                     }
1089                 }
1090                 dirScanConfig.setTagScanConfigs( tagScanConfigs );
1091             }
1092             else
1093             {
1094                 checkUnknownElement( parser, strict );
1095             }
1096         }
1097         return dirScanConfig;
1098     } //-- DirScanConfig parseDirScanConfig( XmlPullParser, boolean )
1099 
1100     /**
1101      * Method parseDiscovery.
1102      * 
1103      * @param parser a parser object.
1104      * @param strict a strict object.
1105      * @throws IOException IOException if any.
1106      * @throws XmlPullParserException XmlPullParserException if
1107      * any.
1108      * @return Discovery
1109      */
1110     private Discovery parseDiscovery( XmlPullParser parser, boolean strict )
1111         throws IOException, XmlPullParserException
1112     {
1113         String tagName = parser.getName();
1114         Discovery discovery = new Discovery();
1115         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1116         {
1117             String name = parser.getAttributeName( i );
1118             String value = parser.getAttributeValue( i );
1119 
1120             if ( name.indexOf( ':' ) >= 0 )
1121             {
1122                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1123             }
1124             else
1125             {
1126                 checkUnknownAttribute( parser, name, tagName, strict );
1127             }
1128         }
1129         java.util.Set<String> parsed = new java.util.HashSet<String>();
1130         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1131         {
1132             if ( checkFieldWithDuplicate( parser, "scanProfiles", null, parsed ) )
1133             {
1134                 java.util.List<String> scanProfiles = new java.util.ArrayList<String>();
1135                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1136                 {
1137                     if ( "scanProfile".equals( parser.getName() ) )
1138                     {
1139                         scanProfiles.add( interpolatedTrimmed( parser.nextText(), "scanProfiles" ) );
1140                     }
1141                     else
1142                     {
1143                         checkUnknownElement( parser, strict );
1144                     }
1145                 }
1146                 discovery.setScanProfiles( scanProfiles );
1147             }
1148             else
1149             {
1150                 checkUnknownElement( parser, strict );
1151             }
1152         }
1153         return discovery;
1154     } //-- Discovery parseDiscovery( XmlPullParser, boolean )
1155 
1156     /**
1157      * Method parseEffectivePom.
1158      * 
1159      * @param parser a parser object.
1160      * @param strict a strict object.
1161      * @throws IOException IOException if any.
1162      * @throws XmlPullParserException XmlPullParserException if
1163      * any.
1164      * @return EffectivePom
1165      */
1166     private EffectivePom parseEffectivePom( XmlPullParser parser, boolean strict )
1167         throws IOException, XmlPullParserException
1168     {
1169         String tagName = parser.getName();
1170         EffectivePom effectivePom = new EffectivePom();
1171         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1172         {
1173             String name = parser.getAttributeName( i );
1174             String value = parser.getAttributeValue( i );
1175 
1176             if ( name.indexOf( ':' ) >= 0 )
1177             {
1178                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1179             }
1180             else
1181             {
1182                 checkUnknownAttribute( parser, name, tagName, strict );
1183             }
1184         }
1185         java.util.Set<String> parsed = new java.util.HashSet<String>();
1186         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1187         {
1188             if ( checkFieldWithDuplicate( parser, "excludeProperties", null, parsed ) )
1189             {
1190                 java.util.List<String> excludeProperties = new java.util.ArrayList<String>();
1191                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1192                 {
1193                     if ( "excludeProperty".equals( parser.getName() ) )
1194                     {
1195                         excludeProperties.add( interpolatedTrimmed( parser.nextText(), "excludeProperties" ) );
1196                     }
1197                     else
1198                     {
1199                         checkUnknownElement( parser, strict );
1200                     }
1201                 }
1202                 effectivePom.setExcludeProperties( excludeProperties );
1203             }
1204             else
1205             {
1206                 checkUnknownElement( parser, strict );
1207             }
1208         }
1209         return effectivePom;
1210     } //-- EffectivePom parseEffectivePom( XmlPullParser, boolean )
1211 
1212     /**
1213      * Method parseExclude.
1214      * 
1215      * @param parser a parser object.
1216      * @param strict a strict object.
1217      * @throws IOException IOException if any.
1218      * @throws XmlPullParserException XmlPullParserException if
1219      * any.
1220      * @return Exclude
1221      */
1222     private Exclude parseExclude( XmlPullParser parser, boolean strict )
1223         throws IOException, XmlPullParserException
1224     {
1225         String tagName = parser.getName();
1226         Exclude exclude = new Exclude();
1227         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1228         {
1229             String name = parser.getAttributeName( i );
1230             String value = parser.getAttributeValue( i );
1231 
1232             if ( name.indexOf( ':' ) >= 0 )
1233             {
1234                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1235             }
1236             else if ( "glob".equals( name ) )
1237             {
1238                 exclude.setGlob( interpolatedTrimmed( value, "glob" ) );
1239             }
1240             else if ( "entryType".equals( name ) )
1241             {
1242                 exclude.setEntryType( interpolatedTrimmed( value, "entryType" ) );
1243             }
1244             else if ( "matcherType".equals( name ) )
1245             {
1246                 exclude.setMatcherType( interpolatedTrimmed( value, "matcherType" ) );
1247             }
1248             else
1249             {
1250                 checkUnknownAttribute( parser, name, tagName, strict );
1251             }
1252         }
1253         exclude.setValue( interpolatedTrimmed( parser.nextText(), "value" ) );
1254         return exclude;
1255     } //-- Exclude parseExclude( XmlPullParser, boolean )
1256 
1257     /**
1258      * Method parseExecutables.
1259      * 
1260      * @param parser a parser object.
1261      * @param strict a strict object.
1262      * @throws IOException IOException if any.
1263      * @throws XmlPullParserException XmlPullParserException if
1264      * any.
1265      * @return Executables
1266      */
1267     private Executables parseExecutables( XmlPullParser parser, boolean strict )
1268         throws IOException, XmlPullParserException
1269     {
1270         String tagName = parser.getName();
1271         Executables executables = new Executables();
1272         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1273         {
1274             String name = parser.getAttributeName( i );
1275             String value = parser.getAttributeValue( i );
1276 
1277             if ( name.indexOf( ':' ) >= 0 )
1278             {
1279                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1280             }
1281             else
1282             {
1283                 checkUnknownAttribute( parser, name, tagName, strict );
1284             }
1285         }
1286         java.util.Set<String> parsed = new java.util.HashSet<String>();
1287         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1288         {
1289             if ( checkFieldWithDuplicate( parser, "plugins", null, parsed ) )
1290             {
1291                 java.util.List<PluginSet> plugins = new java.util.ArrayList<PluginSet>();
1292                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1293                 {
1294                     if ( "plugin".equals( parser.getName() ) )
1295                     {
1296                         plugins.add( parsePluginSet( parser, strict ) );
1297                     }
1298                     else
1299                     {
1300                         checkUnknownElement( parser, strict );
1301                     }
1302                 }
1303                 executables.setPlugins( plugins );
1304             }
1305             else if ( checkFieldWithDuplicate( parser, "executions", null, parsed ) )
1306             {
1307                 java.util.List<ExecutionIdsList> executions = new java.util.ArrayList<ExecutionIdsList>();
1308                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1309                 {
1310                     if ( "execution".equals( parser.getName() ) )
1311                     {
1312                         executions.add( parseExecutionIdsList( parser, strict ) );
1313                     }
1314                     else
1315                     {
1316                         checkUnknownElement( parser, strict );
1317                     }
1318                 }
1319                 executables.setExecutions( executions );
1320             }
1321             else if ( checkFieldWithDuplicate( parser, "goalsLists", null, parsed ) )
1322             {
1323                 java.util.List<GoalsList> goalsLists = new java.util.ArrayList<GoalsList>();
1324                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1325                 {
1326                     if ( "goalsList".equals( parser.getName() ) )
1327                     {
1328                         goalsLists.add( parseGoalsList( parser, strict ) );
1329                     }
1330                     else
1331                     {
1332                         checkUnknownElement( parser, strict );
1333                     }
1334                 }
1335                 executables.setGoalsLists( goalsLists );
1336             }
1337             else
1338             {
1339                 checkUnknownElement( parser, strict );
1340             }
1341         }
1342         return executables;
1343     } //-- Executables parseExecutables( XmlPullParser, boolean )
1344 
1345     /**
1346      * Method parseExecutionConfigurationScan.
1347      * 
1348      * @param parser a parser object.
1349      * @param strict a strict object.
1350      * @throws IOException IOException if any.
1351      * @throws XmlPullParserException XmlPullParserException if
1352      * any.
1353      * @return ExecutionConfigurationScan
1354      */
1355     private ExecutionConfigurationScan parseExecutionConfigurationScan( XmlPullParser parser, boolean strict )
1356         throws IOException, XmlPullParserException
1357     {
1358         String tagName = parser.getName();
1359         ExecutionConfigurationScan executionConfigurationScan = new ExecutionConfigurationScan();
1360         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1361         {
1362             String name = parser.getAttributeName( i );
1363             String value = parser.getAttributeValue( i );
1364 
1365             if ( name.indexOf( ':' ) >= 0 )
1366             {
1367                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1368             }
1369             else if ( "ignoreParentConfig".equals( name ) )
1370             {
1371                 executionConfigurationScan.setIgnoreParentConfig( getBooleanValue( interpolatedTrimmed( value, "ignoreParentConfig" ), "ignoreParentConfig", parser, "false" ) );
1372             }
1373             else
1374             {
1375                 checkUnknownAttribute( parser, name, tagName, strict );
1376             }
1377         }
1378         java.util.Set<String> parsed = new java.util.HashSet<String>();
1379         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1380         {
1381             if ( checkFieldWithDuplicate( parser, "execIds", null, parsed ) )
1382             {
1383                 java.util.List<String> execIds = new java.util.ArrayList<String>();
1384                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1385                 {
1386                     if ( "execId".equals( parser.getName() ) )
1387                     {
1388                         execIds.add( interpolatedTrimmed( parser.nextText(), "execIds" ) );
1389                     }
1390                     else
1391                     {
1392                         checkUnknownElement( parser, strict );
1393                     }
1394                 }
1395                 executionConfigurationScan.setExecIds( execIds );
1396             }
1397             else if ( checkFieldWithDuplicate( parser, "dirScan", null, parsed ) )
1398             {
1399                 executionConfigurationScan.setDirScan( parseDirScanConfig( parser, strict ) );
1400             }
1401             else
1402             {
1403                 checkUnknownElement( parser, strict );
1404             }
1405         }
1406         return executionConfigurationScan;
1407     } //-- ExecutionConfigurationScan parseExecutionConfigurationScan( XmlPullParser, boolean )
1408 
1409     /**
1410      * Method parseExecutionControl.
1411      * 
1412      * @param parser a parser object.
1413      * @param strict a strict object.
1414      * @throws IOException IOException if any.
1415      * @throws XmlPullParserException XmlPullParserException if
1416      * any.
1417      * @return ExecutionControl
1418      */
1419     private ExecutionControl parseExecutionControl( XmlPullParser parser, boolean strict )
1420         throws IOException, XmlPullParserException
1421     {
1422         String tagName = parser.getName();
1423         ExecutionControl executionControl = new ExecutionControl();
1424         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1425         {
1426             String name = parser.getAttributeName( i );
1427             String value = parser.getAttributeValue( i );
1428 
1429             if ( name.indexOf( ':' ) >= 0 )
1430             {
1431                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1432             }
1433             else
1434             {
1435                 checkUnknownAttribute( parser, name, tagName, strict );
1436             }
1437         }
1438         java.util.Set<String> parsed = new java.util.HashSet<String>();
1439         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1440         {
1441             if ( checkFieldWithDuplicate( parser, "runAlways", null, parsed ) )
1442             {
1443                 executionControl.setRunAlways( parseExecutables( parser, strict ) );
1444             }
1445             else if ( checkFieldWithDuplicate( parser, "ignoreMissing", null, parsed ) )
1446             {
1447                 executionControl.setIgnoreMissing( parseExecutables( parser, strict ) );
1448             }
1449             else if ( checkFieldWithDuplicate( parser, "reconcile", null, parsed ) )
1450             {
1451                 executionControl.setReconcile( parseReconcile( parser, strict ) );
1452             }
1453             else
1454             {
1455                 checkUnknownElement( parser, strict );
1456             }
1457         }
1458         return executionControl;
1459     } //-- ExecutionControl parseExecutionControl( XmlPullParser, boolean )
1460 
1461     /**
1462      * Method parseExecutionIdsList.
1463      * 
1464      * @param parser a parser object.
1465      * @param strict a strict object.
1466      * @throws IOException IOException if any.
1467      * @throws XmlPullParserException XmlPullParserException if
1468      * any.
1469      * @return ExecutionIdsList
1470      */
1471     private ExecutionIdsList parseExecutionIdsList( XmlPullParser parser, boolean strict )
1472         throws IOException, XmlPullParserException
1473     {
1474         String tagName = parser.getName();
1475         ExecutionIdsList executionIdsList = new ExecutionIdsList();
1476         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1477         {
1478             String name = parser.getAttributeName( i );
1479             String value = parser.getAttributeValue( i );
1480 
1481             if ( name.indexOf( ':' ) >= 0 )
1482             {
1483                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1484             }
1485             else if ( "groupId".equals( name ) )
1486             {
1487                 executionIdsList.setGroupId( interpolatedTrimmed( value, "groupId" ) );
1488             }
1489             else if ( "artifactId".equals( name ) )
1490             {
1491                 executionIdsList.setArtifactId( interpolatedTrimmed( value, "artifactId" ) );
1492             }
1493             else
1494             {
1495                 checkUnknownAttribute( parser, name, tagName, strict );
1496             }
1497         }
1498         java.util.Set<String> parsed = new java.util.HashSet<String>();
1499         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1500         {
1501             if ( checkFieldWithDuplicate( parser, "execIds", null, parsed ) )
1502             {
1503                 java.util.List<String> execIds = new java.util.ArrayList<String>();
1504                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1505                 {
1506                     if ( "execId".equals( parser.getName() ) )
1507                     {
1508                         execIds.add( interpolatedTrimmed( parser.nextText(), "execIds" ) );
1509                     }
1510                     else
1511                     {
1512                         checkUnknownElement( parser, strict );
1513                     }
1514                 }
1515                 executionIdsList.setExecIds( execIds );
1516             }
1517             else
1518             {
1519                 checkUnknownElement( parser, strict );
1520             }
1521         }
1522         return executionIdsList;
1523     } //-- ExecutionIdsList parseExecutionIdsList( XmlPullParser, boolean )
1524 
1525     /**
1526      * Method parseGoalId.
1527      * 
1528      * @param parser a parser object.
1529      * @param strict a strict object.
1530      * @throws IOException IOException if any.
1531      * @throws XmlPullParserException XmlPullParserException if
1532      * any.
1533      * @return GoalId
1534      */
1535     private GoalId parseGoalId( XmlPullParser parser, boolean strict )
1536         throws IOException, XmlPullParserException
1537     {
1538         String tagName = parser.getName();
1539         GoalId goalId = new GoalId();
1540         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1541         {
1542             String name = parser.getAttributeName( i );
1543             String value = parser.getAttributeValue( i );
1544 
1545             if ( name.indexOf( ':' ) >= 0 )
1546             {
1547                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1548             }
1549             else if ( "goal".equals( name ) )
1550             {
1551                 goalId.setGoal( interpolatedTrimmed( value, "goal" ) );
1552             }
1553             else if ( "groupId".equals( name ) )
1554             {
1555                 goalId.setGroupId( interpolatedTrimmed( value, "groupId" ) );
1556             }
1557             else if ( "artifactId".equals( name ) )
1558             {
1559                 goalId.setArtifactId( interpolatedTrimmed( value, "artifactId" ) );
1560             }
1561             else
1562             {
1563                 checkUnknownAttribute( parser, name, tagName, strict );
1564             }
1565         }
1566         java.util.Set<String> parsed = new java.util.HashSet<String>();
1567         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1568         {
1569             checkUnknownElement( parser, strict );
1570         }
1571         return goalId;
1572     } //-- GoalId parseGoalId( XmlPullParser, boolean )
1573 
1574     /**
1575      * Method parseGoalReconciliation.
1576      * 
1577      * @param parser a parser object.
1578      * @param strict a strict object.
1579      * @throws IOException IOException if any.
1580      * @throws XmlPullParserException XmlPullParserException if
1581      * any.
1582      * @return GoalReconciliation
1583      */
1584     private GoalReconciliation parseGoalReconciliation( XmlPullParser parser, boolean strict )
1585         throws IOException, XmlPullParserException
1586     {
1587         String tagName = parser.getName();
1588         GoalReconciliation goalReconciliation = new GoalReconciliation();
1589         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1590         {
1591             String name = parser.getAttributeName( i );
1592             String value = parser.getAttributeValue( i );
1593 
1594             if ( name.indexOf( ':' ) >= 0 )
1595             {
1596                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1597             }
1598             else if ( "goal".equals( name ) )
1599             {
1600                 goalReconciliation.setGoal( interpolatedTrimmed( value, "goal" ) );
1601             }
1602             else if ( "groupId".equals( name ) )
1603             {
1604                 goalReconciliation.setGroupId( interpolatedTrimmed( value, "groupId" ) );
1605             }
1606             else if ( "artifactId".equals( name ) )
1607             {
1608                 goalReconciliation.setArtifactId( interpolatedTrimmed( value, "artifactId" ) );
1609             }
1610             else
1611             {
1612                 checkUnknownAttribute( parser, name, tagName, strict );
1613             }
1614         }
1615         java.util.Set<String> parsed = new java.util.HashSet<String>();
1616         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1617         {
1618             if ( checkFieldWithDuplicate( parser, "reconciles", null, parsed ) )
1619             {
1620                 java.util.List<TrackedProperty> reconciles = new java.util.ArrayList<TrackedProperty>();
1621                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1622                 {
1623                     if ( "reconcile".equals( parser.getName() ) )
1624                     {
1625                         reconciles.add( parseTrackedProperty( parser, strict ) );
1626                     }
1627                     else
1628                     {
1629                         checkUnknownElement( parser, strict );
1630                     }
1631                 }
1632                 goalReconciliation.setReconciles( reconciles );
1633             }
1634             else if ( checkFieldWithDuplicate( parser, "logs", null, parsed ) )
1635             {
1636                 java.util.List<PropertyName> logs = new java.util.ArrayList<PropertyName>();
1637                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1638                 {
1639                     if ( "log".equals( parser.getName() ) )
1640                     {
1641                         logs.add( parsePropertyName( parser, strict ) );
1642                     }
1643                     else
1644                     {
1645                         checkUnknownElement( parser, strict );
1646                     }
1647                 }
1648                 goalReconciliation.setLogs( logs );
1649             }
1650             else if ( checkFieldWithDuplicate( parser, "nologs", null, parsed ) )
1651             {
1652                 java.util.List<PropertyName> nologs = new java.util.ArrayList<PropertyName>();
1653                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1654                 {
1655                     if ( "nolog".equals( parser.getName() ) )
1656                     {
1657                         nologs.add( parsePropertyName( parser, strict ) );
1658                     }
1659                     else
1660                     {
1661                         checkUnknownElement( parser, strict );
1662                     }
1663                 }
1664                 goalReconciliation.setNologs( nologs );
1665             }
1666             else if ( checkFieldWithDuplicate( parser, "logAll", null, parsed ) )
1667             {
1668                 goalReconciliation.setLogAll( getBooleanValue( interpolatedTrimmed( parser.nextText(), "logAll" ), "logAll", parser, "true" ) );
1669             }
1670             else
1671             {
1672                 checkUnknownElement( parser, strict );
1673             }
1674         }
1675         return goalReconciliation;
1676     } //-- GoalReconciliation parseGoalReconciliation( XmlPullParser, boolean )
1677 
1678     /**
1679      * Method parseGoalsList.
1680      * 
1681      * @param parser a parser object.
1682      * @param strict a strict object.
1683      * @throws IOException IOException if any.
1684      * @throws XmlPullParserException XmlPullParserException if
1685      * any.
1686      * @return GoalsList
1687      */
1688     private GoalsList parseGoalsList( XmlPullParser parser, boolean strict )
1689         throws IOException, XmlPullParserException
1690     {
1691         String tagName = parser.getName();
1692         GoalsList goalsList = new GoalsList();
1693         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1694         {
1695             String name = parser.getAttributeName( i );
1696             String value = parser.getAttributeValue( i );
1697 
1698             if ( name.indexOf( ':' ) >= 0 )
1699             {
1700                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1701             }
1702             else if ( "groupId".equals( name ) )
1703             {
1704                 goalsList.setGroupId( interpolatedTrimmed( value, "groupId" ) );
1705             }
1706             else if ( "artifactId".equals( name ) )
1707             {
1708                 goalsList.setArtifactId( interpolatedTrimmed( value, "artifactId" ) );
1709             }
1710             else
1711             {
1712                 checkUnknownAttribute( parser, name, tagName, strict );
1713             }
1714         }
1715         java.util.Set<String> parsed = new java.util.HashSet<String>();
1716         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1717         {
1718             if ( checkFieldWithDuplicate( parser, "goals", null, parsed ) )
1719             {
1720                 java.util.List<String> goals = new java.util.ArrayList<String>();
1721                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1722                 {
1723                     if ( "goal".equals( parser.getName() ) )
1724                     {
1725                         goals.add( interpolatedTrimmed( parser.nextText(), "goals" ) );
1726                     }
1727                     else
1728                     {
1729                         checkUnknownElement( parser, strict );
1730                     }
1731                 }
1732                 goalsList.setGoals( goals );
1733             }
1734             else
1735             {
1736                 checkUnknownElement( parser, strict );
1737             }
1738         }
1739         return goalsList;
1740     } //-- GoalsList parseGoalsList( XmlPullParser, boolean )
1741 
1742     /**
1743      * Method parseInclude.
1744      * 
1745      * @param parser a parser object.
1746      * @param strict a strict object.
1747      * @throws IOException IOException if any.
1748      * @throws XmlPullParserException XmlPullParserException if
1749      * any.
1750      * @return Include
1751      */
1752     private Include parseInclude( XmlPullParser parser, boolean strict )
1753         throws IOException, XmlPullParserException
1754     {
1755         String tagName = parser.getName();
1756         Include include = new Include();
1757         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1758         {
1759             String name = parser.getAttributeName( i );
1760             String value = parser.getAttributeValue( i );
1761 
1762             if ( name.indexOf( ':' ) >= 0 )
1763             {
1764                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1765             }
1766             else if ( "recursive".equals( name ) )
1767             {
1768                 include.setRecursive( getBooleanValue( interpolatedTrimmed( value, "recursive" ), "recursive", parser, "true" ) );
1769             }
1770             else if ( "glob".equals( name ) )
1771             {
1772                 include.setGlob( interpolatedTrimmed( value, "glob" ) );
1773             }
1774             else
1775             {
1776                 checkUnknownAttribute( parser, name, tagName, strict );
1777             }
1778         }
1779         include.setValue( interpolatedTrimmed( parser.nextText(), "value" ) );
1780         return include;
1781     } //-- Include parseInclude( XmlPullParser, boolean )
1782 
1783     /**
1784      * Method parseInput.
1785      * 
1786      * @param parser a parser object.
1787      * @param strict a strict object.
1788      * @throws IOException IOException if any.
1789      * @throws XmlPullParserException XmlPullParserException if
1790      * any.
1791      * @return Input
1792      */
1793     private Input parseInput( XmlPullParser parser, boolean strict )
1794         throws IOException, XmlPullParserException
1795     {
1796         String tagName = parser.getName();
1797         Input input = new Input();
1798         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1799         {
1800             String name = parser.getAttributeName( i );
1801             String value = parser.getAttributeValue( i );
1802 
1803             if ( name.indexOf( ':' ) >= 0 )
1804             {
1805                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1806             }
1807             else
1808             {
1809                 checkUnknownAttribute( parser, name, tagName, strict );
1810             }
1811         }
1812         java.util.Set<String> parsed = new java.util.HashSet<String>();
1813         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1814         {
1815             if ( checkFieldWithDuplicate( parser, "global", null, parsed ) )
1816             {
1817                 input.setGlobal( parsePathSet( parser, strict ) );
1818             }
1819             else if ( checkFieldWithDuplicate( parser, "plugins", null, parsed ) )
1820             {
1821                 java.util.List<PluginConfigurationScan> plugins = new java.util.ArrayList<PluginConfigurationScan>();
1822                 while ( parser.nextTag() == XmlPullParser.START_TAG )
1823                 {
1824                     if ( "plugin".equals( parser.getName() ) )
1825                     {
1826                         plugins.add( parsePluginConfigurationScan( parser, strict ) );
1827                     }
1828                     else
1829                     {
1830                         checkUnknownElement( parser, strict );
1831                     }
1832                 }
1833                 input.setPlugins( plugins );
1834             }
1835             else
1836             {
1837                 checkUnknownElement( parser, strict );
1838             }
1839         }
1840         return input;
1841     } //-- Input parseInput( XmlPullParser, boolean )
1842 
1843     /**
1844      * Method parseLocal.
1845      * 
1846      * @param parser a parser object.
1847      * @param strict a strict object.
1848      * @throws IOException IOException if any.
1849      * @throws XmlPullParserException XmlPullParserException if
1850      * any.
1851      * @return Local
1852      */
1853     private Local parseLocal( XmlPullParser parser, boolean strict )
1854         throws IOException, XmlPullParserException
1855     {
1856         String tagName = parser.getName();
1857         Local local = new Local();
1858         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1859         {
1860             String name = parser.getAttributeName( i );
1861             String value = parser.getAttributeValue( i );
1862 
1863             if ( name.indexOf( ':' ) >= 0 )
1864             {
1865                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1866             }
1867             else
1868             {
1869                 checkUnknownAttribute( parser, name, tagName, strict );
1870             }
1871         }
1872         java.util.Set<String> parsed = new java.util.HashSet<String>();
1873         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1874         {
1875             if ( checkFieldWithDuplicate( parser, "location", null, parsed ) )
1876             {
1877                 local.setLocation( interpolatedTrimmed( parser.nextText(), "location" ) );
1878             }
1879             else if ( checkFieldWithDuplicate( parser, "maxBuildsCached", null, parsed ) )
1880             {
1881                 local.setMaxBuildsCached( getIntegerValue( interpolatedTrimmed( parser.nextText(), "maxBuildsCached" ), "maxBuildsCached", parser, strict ) );
1882             }
1883             else
1884             {
1885                 checkUnknownElement( parser, strict );
1886             }
1887         }
1888         return local;
1889     } //-- Local parseLocal( XmlPullParser, boolean )
1890 
1891     /**
1892      * Method parseMultiModule.
1893      * 
1894      * @param parser a parser object.
1895      * @param strict a strict object.
1896      * @throws IOException IOException if any.
1897      * @throws XmlPullParserException XmlPullParserException if
1898      * any.
1899      * @return MultiModule
1900      */
1901     private MultiModule parseMultiModule( XmlPullParser parser, boolean strict )
1902         throws IOException, XmlPullParserException
1903     {
1904         String tagName = parser.getName();
1905         MultiModule multiModule = new MultiModule();
1906         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1907         {
1908             String name = parser.getAttributeName( i );
1909             String value = parser.getAttributeValue( i );
1910 
1911             if ( name.indexOf( ':' ) >= 0 )
1912             {
1913                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1914             }
1915             else
1916             {
1917                 checkUnknownAttribute( parser, name, tagName, strict );
1918             }
1919         }
1920         java.util.Set<String> parsed = new java.util.HashSet<String>();
1921         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1922         {
1923             if ( checkFieldWithDuplicate( parser, "discovery", null, parsed ) )
1924             {
1925                 multiModule.setDiscovery( parseDiscovery( parser, strict ) );
1926             }
1927             else
1928             {
1929                 checkUnknownElement( parser, strict );
1930             }
1931         }
1932         return multiModule;
1933     } //-- MultiModule parseMultiModule( XmlPullParser, boolean )
1934 
1935     /**
1936      * Method parseOutput.
1937      * 
1938      * @param parser a parser object.
1939      * @param strict a strict object.
1940      * @throws IOException IOException if any.
1941      * @throws XmlPullParserException XmlPullParserException if
1942      * any.
1943      * @return Output
1944      */
1945     private Output parseOutput( XmlPullParser parser, boolean strict )
1946         throws IOException, XmlPullParserException
1947     {
1948         String tagName = parser.getName();
1949         Output output = new Output();
1950         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1951         {
1952             String name = parser.getAttributeName( i );
1953             String value = parser.getAttributeValue( i );
1954 
1955             if ( name.indexOf( ':' ) >= 0 )
1956             {
1957                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
1958             }
1959             else
1960             {
1961                 checkUnknownAttribute( parser, name, tagName, strict );
1962             }
1963         }
1964         java.util.Set<String> parsed = new java.util.HashSet<String>();
1965         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
1966         {
1967             if ( checkFieldWithDuplicate( parser, "exclude", null, parsed ) )
1968             {
1969                 output.setExclude( parseOutputExclude( parser, strict ) );
1970             }
1971             else
1972             {
1973                 checkUnknownElement( parser, strict );
1974             }
1975         }
1976         return output;
1977     } //-- Output parseOutput( XmlPullParser, boolean )
1978 
1979     /**
1980      * Method parseOutputExclude.
1981      * 
1982      * @param parser a parser object.
1983      * @param strict a strict object.
1984      * @throws IOException IOException if any.
1985      * @throws XmlPullParserException XmlPullParserException if
1986      * any.
1987      * @return OutputExclude
1988      */
1989     private OutputExclude parseOutputExclude( XmlPullParser parser, boolean strict )
1990         throws IOException, XmlPullParserException
1991     {
1992         String tagName = parser.getName();
1993         OutputExclude outputExclude = new OutputExclude();
1994         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
1995         {
1996             String name = parser.getAttributeName( i );
1997             String value = parser.getAttributeValue( i );
1998 
1999             if ( name.indexOf( ':' ) >= 0 )
2000             {
2001                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2002             }
2003             else
2004             {
2005                 checkUnknownAttribute( parser, name, tagName, strict );
2006             }
2007         }
2008         java.util.Set<String> parsed = new java.util.HashSet<String>();
2009         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2010         {
2011             if ( checkFieldWithDuplicate( parser, "patterns", null, parsed ) )
2012             {
2013                 java.util.List<String> patterns = new java.util.ArrayList<String>();
2014                 while ( parser.nextTag() == XmlPullParser.START_TAG )
2015                 {
2016                     if ( "pattern".equals( parser.getName() ) )
2017                     {
2018                         patterns.add( interpolatedTrimmed( parser.nextText(), "patterns" ) );
2019                     }
2020                     else
2021                     {
2022                         checkUnknownElement( parser, strict );
2023                     }
2024                 }
2025                 outputExclude.setPatterns( patterns );
2026             }
2027             else
2028             {
2029                 checkUnknownElement( parser, strict );
2030             }
2031         }
2032         return outputExclude;
2033     } //-- OutputExclude parseOutputExclude( XmlPullParser, boolean )
2034 
2035     /**
2036      * Method parsePathSet.
2037      * 
2038      * @param parser a parser object.
2039      * @param strict a strict object.
2040      * @throws IOException IOException if any.
2041      * @throws XmlPullParserException XmlPullParserException if
2042      * any.
2043      * @return PathSet
2044      */
2045     private PathSet parsePathSet( XmlPullParser parser, boolean strict )
2046         throws IOException, XmlPullParserException
2047     {
2048         String tagName = parser.getName();
2049         PathSet pathSet = new PathSet();
2050         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2051         {
2052             String name = parser.getAttributeName( i );
2053             String value = parser.getAttributeValue( i );
2054 
2055             if ( name.indexOf( ':' ) >= 0 )
2056             {
2057                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2058             }
2059             else
2060             {
2061                 checkUnknownAttribute( parser, name, tagName, strict );
2062             }
2063         }
2064         java.util.Set<String> parsed = new java.util.HashSet<String>();
2065         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2066         {
2067             if ( checkFieldWithDuplicate( parser, "glob", null, parsed ) )
2068             {
2069                 pathSet.setGlob( interpolatedTrimmed( parser.nextText(), "glob" ) );
2070             }
2071             else if ( checkFieldWithDuplicate( parser, "includes", null, parsed ) )
2072             {
2073                 java.util.List<Include> includes = new java.util.ArrayList<Include>();
2074                 while ( parser.nextTag() == XmlPullParser.START_TAG )
2075                 {
2076                     if ( "include".equals( parser.getName() ) )
2077                     {
2078                         includes.add( parseInclude( parser, strict ) );
2079                     }
2080                     else
2081                     {
2082                         checkUnknownElement( parser, strict );
2083                     }
2084                 }
2085                 pathSet.setIncludes( includes );
2086             }
2087             else if ( checkFieldWithDuplicate( parser, "excludes", null, parsed ) )
2088             {
2089                 java.util.List<Exclude> excludes = new java.util.ArrayList<Exclude>();
2090                 while ( parser.nextTag() == XmlPullParser.START_TAG )
2091                 {
2092                     if ( "exclude".equals( parser.getName() ) )
2093                     {
2094                         excludes.add( parseExclude( parser, strict ) );
2095                     }
2096                     else
2097                     {
2098                         checkUnknownElement( parser, strict );
2099                     }
2100                 }
2101                 pathSet.setExcludes( excludes );
2102             }
2103             else
2104             {
2105                 checkUnknownElement( parser, strict );
2106             }
2107         }
2108         return pathSet;
2109     } //-- PathSet parsePathSet( XmlPullParser, boolean )
2110 
2111     /**
2112      * Method parsePluginConfigurationScan.
2113      * 
2114      * @param parser a parser object.
2115      * @param strict a strict object.
2116      * @throws IOException IOException if any.
2117      * @throws XmlPullParserException XmlPullParserException if
2118      * any.
2119      * @return PluginConfigurationScan
2120      */
2121     private PluginConfigurationScan parsePluginConfigurationScan( XmlPullParser parser, boolean strict )
2122         throws IOException, XmlPullParserException
2123     {
2124         String tagName = parser.getName();
2125         PluginConfigurationScan pluginConfigurationScan = new PluginConfigurationScan();
2126         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2127         {
2128             String name = parser.getAttributeName( i );
2129             String value = parser.getAttributeValue( i );
2130 
2131             if ( name.indexOf( ':' ) >= 0 )
2132             {
2133                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2134             }
2135             else if ( "excludeDependencies".equals( name ) )
2136             {
2137                 pluginConfigurationScan.setExcludeDependencies( getBooleanValue( interpolatedTrimmed( value, "excludeDependencies" ), "excludeDependencies", parser, "false" ) );
2138             }
2139             else if ( "groupId".equals( name ) )
2140             {
2141                 pluginConfigurationScan.setGroupId( interpolatedTrimmed( value, "groupId" ) );
2142             }
2143             else if ( "artifactId".equals( name ) )
2144             {
2145                 pluginConfigurationScan.setArtifactId( interpolatedTrimmed( value, "artifactId" ) );
2146             }
2147             else
2148             {
2149                 checkUnknownAttribute( parser, name, tagName, strict );
2150             }
2151         }
2152         java.util.Set<String> parsed = new java.util.HashSet<String>();
2153         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2154         {
2155             if ( checkFieldWithDuplicate( parser, "effectivePom", null, parsed ) )
2156             {
2157                 pluginConfigurationScan.setEffectivePom( parseEffectivePom( parser, strict ) );
2158             }
2159             else if ( checkFieldWithDuplicate( parser, "dirScan", null, parsed ) )
2160             {
2161                 pluginConfigurationScan.setDirScan( parseDirScanConfig( parser, strict ) );
2162             }
2163             else if ( checkFieldWithDuplicate( parser, "executions", null, parsed ) )
2164             {
2165                 java.util.List<ExecutionConfigurationScan> executions = new java.util.ArrayList<ExecutionConfigurationScan>();
2166                 while ( parser.nextTag() == XmlPullParser.START_TAG )
2167                 {
2168                     if ( "execution".equals( parser.getName() ) )
2169                     {
2170                         executions.add( parseExecutionConfigurationScan( parser, strict ) );
2171                     }
2172                     else
2173                     {
2174                         checkUnknownElement( parser, strict );
2175                     }
2176                 }
2177                 pluginConfigurationScan.setExecutions( executions );
2178             }
2179             else
2180             {
2181                 checkUnknownElement( parser, strict );
2182             }
2183         }
2184         return pluginConfigurationScan;
2185     } //-- PluginConfigurationScan parsePluginConfigurationScan( XmlPullParser, boolean )
2186 
2187     /**
2188      * Method parsePluginSet.
2189      * 
2190      * @param parser a parser object.
2191      * @param strict a strict object.
2192      * @throws IOException IOException if any.
2193      * @throws XmlPullParserException XmlPullParserException if
2194      * any.
2195      * @return PluginSet
2196      */
2197     private PluginSet parsePluginSet( XmlPullParser parser, boolean strict )
2198         throws IOException, XmlPullParserException
2199     {
2200         String tagName = parser.getName();
2201         PluginSet pluginSet = new PluginSet();
2202         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2203         {
2204             String name = parser.getAttributeName( i );
2205             String value = parser.getAttributeValue( i );
2206 
2207             if ( name.indexOf( ':' ) >= 0 )
2208             {
2209                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2210             }
2211             else if ( "groupId".equals( name ) )
2212             {
2213                 pluginSet.setGroupId( interpolatedTrimmed( value, "groupId" ) );
2214             }
2215             else if ( "artifactId".equals( name ) )
2216             {
2217                 pluginSet.setArtifactId( interpolatedTrimmed( value, "artifactId" ) );
2218             }
2219             else
2220             {
2221                 checkUnknownAttribute( parser, name, tagName, strict );
2222             }
2223         }
2224         java.util.Set<String> parsed = new java.util.HashSet<String>();
2225         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2226         {
2227             checkUnknownElement( parser, strict );
2228         }
2229         return pluginSet;
2230     } //-- PluginSet parsePluginSet( XmlPullParser, boolean )
2231 
2232     /**
2233      * Method parseProjectVersioning.
2234      * 
2235      * @param parser a parser object.
2236      * @param strict a strict object.
2237      * @throws IOException IOException if any.
2238      * @throws XmlPullParserException XmlPullParserException if
2239      * any.
2240      * @return ProjectVersioning
2241      */
2242     private ProjectVersioning parseProjectVersioning( XmlPullParser parser, boolean strict )
2243         throws IOException, XmlPullParserException
2244     {
2245         String tagName = parser.getName();
2246         ProjectVersioning projectVersioning = new ProjectVersioning();
2247         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2248         {
2249             String name = parser.getAttributeName( i );
2250             String value = parser.getAttributeValue( i );
2251 
2252             if ( name.indexOf( ':' ) >= 0 )
2253             {
2254                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2255             }
2256             else if ( "adjustMetaInf".equals( name ) )
2257             {
2258                 projectVersioning.setAdjustMetaInf( getBooleanValue( interpolatedTrimmed( value, "adjustMetaInf" ), "adjustMetaInf", parser, "false" ) );
2259             }
2260             else if ( "calculateProjectVersionChecksum".equals( name ) )
2261             {
2262                 projectVersioning.setCalculateProjectVersionChecksum( getBooleanValue( interpolatedTrimmed( value, "calculateProjectVersionChecksum" ), "calculateProjectVersionChecksum", parser, "false" ) );
2263             }
2264             else
2265             {
2266                 checkUnknownAttribute( parser, name, tagName, strict );
2267             }
2268         }
2269         java.util.Set<String> parsed = new java.util.HashSet<String>();
2270         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2271         {
2272             checkUnknownElement( parser, strict );
2273         }
2274         return projectVersioning;
2275     } //-- ProjectVersioning parseProjectVersioning( XmlPullParser, boolean )
2276 
2277     /**
2278      * Method parsePropertyName.
2279      * 
2280      * @param parser a parser object.
2281      * @param strict a strict object.
2282      * @throws IOException IOException if any.
2283      * @throws XmlPullParserException XmlPullParserException if
2284      * any.
2285      * @return PropertyName
2286      */
2287     private PropertyName parsePropertyName( XmlPullParser parser, boolean strict )
2288         throws IOException, XmlPullParserException
2289     {
2290         String tagName = parser.getName();
2291         PropertyName propertyName = new PropertyName();
2292         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2293         {
2294             String name = parser.getAttributeName( i );
2295             String value = parser.getAttributeValue( i );
2296 
2297             if ( name.indexOf( ':' ) >= 0 )
2298             {
2299                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2300             }
2301             else if ( "propertyName".equals( name ) )
2302             {
2303                 propertyName.setPropertyName( interpolatedTrimmed( value, "propertyName" ) );
2304             }
2305             else
2306             {
2307                 checkUnknownAttribute( parser, name, tagName, strict );
2308             }
2309         }
2310         propertyName.setValue( interpolatedTrimmed( parser.nextText(), "value" ) );
2311         return propertyName;
2312     } //-- PropertyName parsePropertyName( XmlPullParser, boolean )
2313 
2314     /**
2315      * Method parseReconcile.
2316      * 
2317      * @param parser a parser object.
2318      * @param strict a strict object.
2319      * @throws IOException IOException if any.
2320      * @throws XmlPullParserException XmlPullParserException if
2321      * any.
2322      * @return Reconcile
2323      */
2324     private Reconcile parseReconcile( XmlPullParser parser, boolean strict )
2325         throws IOException, XmlPullParserException
2326     {
2327         String tagName = parser.getName();
2328         Reconcile reconcile = new Reconcile();
2329         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2330         {
2331             String name = parser.getAttributeName( i );
2332             String value = parser.getAttributeValue( i );
2333 
2334             if ( name.indexOf( ':' ) >= 0 )
2335             {
2336                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2337             }
2338             else if ( "logAllProperties".equals( name ) )
2339             {
2340                 reconcile.setLogAllProperties( getBooleanValue( interpolatedTrimmed( value, "logAllProperties" ), "logAllProperties", parser, "true" ) );
2341             }
2342             else
2343             {
2344                 checkUnknownAttribute( parser, name, tagName, strict );
2345             }
2346         }
2347         java.util.Set<String> parsed = new java.util.HashSet<String>();
2348         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2349         {
2350             if ( checkFieldWithDuplicate( parser, "plugins", null, parsed ) )
2351             {
2352                 java.util.List<GoalReconciliation> plugins = new java.util.ArrayList<GoalReconciliation>();
2353                 while ( parser.nextTag() == XmlPullParser.START_TAG )
2354                 {
2355                     if ( "plugin".equals( parser.getName() ) )
2356                     {
2357                         plugins.add( parseGoalReconciliation( parser, strict ) );
2358                     }
2359                     else
2360                     {
2361                         checkUnknownElement( parser, strict );
2362                     }
2363                 }
2364                 reconcile.setPlugins( plugins );
2365             }
2366             else
2367             {
2368                 checkUnknownElement( parser, strict );
2369             }
2370         }
2371         return reconcile;
2372     } //-- Reconcile parseReconcile( XmlPullParser, boolean )
2373 
2374     /**
2375      * Method parseRemote.
2376      * 
2377      * @param parser a parser object.
2378      * @param strict a strict object.
2379      * @throws IOException IOException if any.
2380      * @throws XmlPullParserException XmlPullParserException if
2381      * any.
2382      * @return Remote
2383      */
2384     private Remote parseRemote( XmlPullParser parser, boolean strict )
2385         throws IOException, XmlPullParserException
2386     {
2387         String tagName = parser.getName();
2388         Remote remote = new Remote();
2389         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2390         {
2391             String name = parser.getAttributeName( i );
2392             String value = parser.getAttributeValue( i );
2393 
2394             if ( name.indexOf( ':' ) >= 0 )
2395             {
2396                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2397             }
2398             else if ( "enabled".equals( name ) )
2399             {
2400                 remote.setEnabled( getBooleanValue( interpolatedTrimmed( value, "enabled" ), "enabled", parser, "true" ) );
2401             }
2402             else if ( "saveToRemote".equals( name ) )
2403             {
2404                 remote.setSaveToRemote( getBooleanValue( interpolatedTrimmed( value, "saveToRemote" ), "saveToRemote", parser, "false" ) );
2405             }
2406             else if ( "transport".equals( name ) )
2407             {
2408                 remote.setTransport( interpolatedTrimmed( value, "transport" ) );
2409             }
2410             else if ( "id".equals( name ) )
2411             {
2412                 remote.setId( interpolatedTrimmed( value, "id" ) );
2413             }
2414             else
2415             {
2416                 checkUnknownAttribute( parser, name, tagName, strict );
2417             }
2418         }
2419         java.util.Set<String> parsed = new java.util.HashSet<String>();
2420         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2421         {
2422             if ( checkFieldWithDuplicate( parser, "url", null, parsed ) )
2423             {
2424                 remote.setUrl( interpolatedTrimmed( parser.nextText(), "url" ) );
2425             }
2426             else
2427             {
2428                 checkUnknownElement( parser, strict );
2429             }
2430         }
2431         return remote;
2432     } //-- Remote parseRemote( XmlPullParser, boolean )
2433 
2434     /**
2435      * Method parseTagExclude.
2436      * 
2437      * @param parser a parser object.
2438      * @param strict a strict object.
2439      * @throws IOException IOException if any.
2440      * @throws XmlPullParserException XmlPullParserException if
2441      * any.
2442      * @return TagExclude
2443      */
2444     private TagExclude parseTagExclude( XmlPullParser parser, boolean strict )
2445         throws IOException, XmlPullParserException
2446     {
2447         String tagName = parser.getName();
2448         TagExclude tagExclude = new TagExclude();
2449         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2450         {
2451             String name = parser.getAttributeName( i );
2452             String value = parser.getAttributeValue( i );
2453 
2454             if ( name.indexOf( ':' ) >= 0 )
2455             {
2456                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2457             }
2458             else if ( "tagName".equals( name ) )
2459             {
2460                 tagExclude.setTagName( interpolatedTrimmed( value, "tagName" ) );
2461             }
2462             else
2463             {
2464                 checkUnknownAttribute( parser, name, tagName, strict );
2465             }
2466         }
2467         java.util.Set<String> parsed = new java.util.HashSet<String>();
2468         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2469         {
2470             checkUnknownElement( parser, strict );
2471         }
2472         return tagExclude;
2473     } //-- TagExclude parseTagExclude( XmlPullParser, boolean )
2474 
2475     /**
2476      * Method parseTagScanConfig.
2477      * 
2478      * @param parser a parser object.
2479      * @param strict a strict object.
2480      * @throws IOException IOException if any.
2481      * @throws XmlPullParserException XmlPullParserException if
2482      * any.
2483      * @return TagScanConfig
2484      */
2485     private TagScanConfig parseTagScanConfig( XmlPullParser parser, boolean strict )
2486         throws IOException, XmlPullParserException
2487     {
2488         String tagName = parser.getName();
2489         TagScanConfig tagScanConfig = new TagScanConfig();
2490         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2491         {
2492             String name = parser.getAttributeName( i );
2493             String value = parser.getAttributeValue( i );
2494 
2495             if ( name.indexOf( ':' ) >= 0 )
2496             {
2497                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2498             }
2499             else if ( "recursive".equals( name ) )
2500             {
2501                 tagScanConfig.setRecursive( getBooleanValue( interpolatedTrimmed( value, "recursive" ), "recursive", parser, "true" ) );
2502             }
2503             else if ( "glob".equals( name ) )
2504             {
2505                 tagScanConfig.setGlob( interpolatedTrimmed( value, "glob" ) );
2506             }
2507             else if ( "tagName".equals( name ) )
2508             {
2509                 tagScanConfig.setTagName( interpolatedTrimmed( value, "tagName" ) );
2510             }
2511             else
2512             {
2513                 checkUnknownAttribute( parser, name, tagName, strict );
2514             }
2515         }
2516         java.util.Set<String> parsed = new java.util.HashSet<String>();
2517         while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
2518         {
2519             checkUnknownElement( parser, strict );
2520         }
2521         return tagScanConfig;
2522     } //-- TagScanConfig parseTagScanConfig( XmlPullParser, boolean )
2523 
2524     /**
2525      * Method parseTrackedProperty.
2526      * 
2527      * @param parser a parser object.
2528      * @param strict a strict object.
2529      * @throws IOException IOException if any.
2530      * @throws XmlPullParserException XmlPullParserException if
2531      * any.
2532      * @return TrackedProperty
2533      */
2534     private TrackedProperty parseTrackedProperty( XmlPullParser parser, boolean strict )
2535         throws IOException, XmlPullParserException
2536     {
2537         String tagName = parser.getName();
2538         TrackedProperty trackedProperty = new TrackedProperty();
2539         for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
2540         {
2541             String name = parser.getAttributeName( i );
2542             String value = parser.getAttributeValue( i );
2543 
2544             if ( name.indexOf( ':' ) >= 0 )
2545             {
2546                 // just ignore attributes with non-default namespace (for example: xmlns:xsi)
2547             }
2548             else if ( "propertyName".equals( name ) )
2549             {
2550                 trackedProperty.setPropertyName( interpolatedTrimmed( value, "propertyName" ) );
2551             }
2552             else if ( "skipValue".equals( name ) )
2553             {
2554                 trackedProperty.setSkipValue( interpolatedTrimmed( value, "skipValue" ) );
2555             }
2556             else if ( "defaultValue".equals( name ) )
2557             {
2558                 trackedProperty.setDefaultValue( interpolatedTrimmed( value, "defaultValue" ) );
2559             }
2560             else
2561             {
2562                 checkUnknownAttribute( parser, name, tagName, strict );
2563             }
2564         }
2565         trackedProperty.setValue( interpolatedTrimmed( parser.nextText(), "value" ) );
2566         return trackedProperty;
2567     } //-- TrackedProperty parseTrackedProperty( XmlPullParser, boolean )
2568 
2569     /**
2570      * Sets the state of the "add default entities" flag.
2571      * 
2572      * @param addDefaultEntities a addDefaultEntities object.
2573      */
2574     public void setAddDefaultEntities( boolean addDefaultEntities )
2575     {
2576         this.addDefaultEntities = addDefaultEntities;
2577     } //-- void setAddDefaultEntities( boolean )
2578 
2579     public static interface ContentTransformer
2580 {
2581     /**
2582      * Interpolate the value read from the xpp3 document
2583      * @param source The source value
2584      * @param fieldName A description of the field being interpolated. The implementation may use this to
2585      *                           log stuff.
2586      * @return The interpolated value.
2587      */
2588     String transform( String source, String fieldName );
2589 }
2590 
2591 }