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