public static Xpp3Dom build( Reader reader ) throws XmlPullParserException, IOException { return build( reader, DEFAULT_TRIM ); }
public static Xpp3Dom build( XmlPullParser parser ) throws XmlPullParserException, IOException { return build( parser, DEFAULT_TRIM ); }
public static Xpp3Dom build( InputStream is, String encoding, boolean trim ) throws XmlPullParserException, IOException { try { final XmlPullParser parser = new MXParser(); parser.setInput( is, encoding ); final Xpp3Dom xpp3Dom = build( parser, trim ); is.close(); is = null; return xpp3Dom; } finally { IOUtil.close( is ); } }
public PlexusConfiguration buildConfiguration( Reader configuration ) throws PlexusConfigurationException { try { return new XmlPlexusConfiguration( Xpp3DomBuilder.build( configuration ) ); } catch ( IOException | XmlPullParserException e ) { throw new PlexusConfigurationException( e.getMessage(), e ); } } }
public PlexusConfiguration buildConfiguration( Reader configuration ) throws PlexusConfigurationException { try { return new XmlPlexusConfiguration( Xpp3DomBuilder.build( configuration ) ); } catch ( IOException | XmlPullParserException e ) { throw new PlexusConfigurationException( e.getMessage(), e ); } } }
public static Xpp3Dom build( Reader reader, boolean trim ) throws XmlPullParserException, IOException { try { final XmlPullParser parser = new MXParser(); parser.setInput( reader ); final Xpp3Dom xpp3Dom = build( parser, trim ); reader.close(); reader = null; return xpp3Dom; } finally { IOUtil.close( reader ); } }
/** * @since 3.3.0 */ public ExtensionDescriptor build( InputStream is ) throws IOException { ExtensionDescriptor extensionDescriptor = new ExtensionDescriptor(); Xpp3Dom dom; try { dom = Xpp3DomBuilder.build( ReaderFactory.newXmlReader( is ) ); } catch ( XmlPullParserException e ) { throw (IOException) new IOException( e.getMessage() ).initCause( e ); } if ( !"extension".equals( dom.getName() ) ) { throw new IOException( "Unexpected root element \"" + dom.getName() + "\", expected \"extension\"" ); } extensionDescriptor.setExportedPackages( parseStrings( dom.getChild( "exportedPackages" ) ) ); extensionDescriptor.setExportedArtifacts( parseStrings( dom.getChild( "exportedArtifacts" ) ) ); return extensionDescriptor; }
execution.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
execution.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
phase.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
phase.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
configurationContainer.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
reportSet.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
toolchainModel.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
pluginExecution.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
reportPlugin.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
reportSet.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
configurationContainer.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
reportPlugin.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );
server.setConfiguration( org.codehaus.plexus.util.xml.Xpp3DomBuilder.build( parser, true ) );