Package org.codehaus.plexus.util.xml

Examples of org.codehaus.plexus.util.xml.Xpp3Dom.addChild()


            metadata = new Xpp3Dom( "metadata" );
            addChild( metadata, "groupId", artifact.getGroupId() );
            addChild( metadata, "artifactId", artifact.getArtifactId() );
            Xpp3Dom versioning = new Xpp3Dom( "versioning" );
            versioning.addChild( addChildren( new Xpp3Dom( "versions" ), "version", allVersions ) );
            addChild( versioning, "lastUpdated", timestamp );
            metadata.addChild( versioning );

            metadata = Xpp3DomUtils.mergeXpp3Dom( metadata, readMetadata( metadataFile ) );
View Full Code Here


            dom.addChild( componentDom );

            for ( Xpp3Dom component : components.values() )
            {
                componentDom.addChild( component );
            }

            Xpp3DomWriter.write( writer, dom );
        }
        finally
View Full Code Here

            dom.addChild( componentDom );

            for ( Xpp3Dom mojo : mojos )
            {
                componentDom.addChild( mojo );
            }

            Xpp3DomWriter.write( writer, dom );
        }
        finally
View Full Code Here

    while(modules.getChildCount() > 0) {
      modules.removeChild(0);
    }
    //Recreate the module's children, forcing the uri.
    for(EarModule earModule : earModules) {
      modules.addChild(earModule.getAsDom());
    }
  }

  private File getTempDirectory() throws IOException {
    File tempDir = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
View Full Code Here

    } else {
      DomUtils.removeChildren(nonFilteredFileExtensionsNode);
    }
   
    for (Xpp3Dom ext : extensions) {
      nonFilteredFileExtensionsNode.addChild(ext);
    }
  }

  private void setValue(Xpp3Dom configuration, String childName, Object value) {
    Xpp3Dom  childNode = configuration.getChild(childName);
View Full Code Here

      resourcesNode.setAttribute("default-value", ""); //$NON-NLS-1$ //$NON-NLS-2$
      DomUtils.removeChildren(resourcesNode);
    }
    for (Xpp3Dom resource : resources)
    {
      resourcesNode.addChild(resource);
    }
  }
 
  private MojoExecution getExecution(MavenExecutionPlan executionPlan, String artifactId) {
    if (executionPlan == null) return null;
View Full Code Here

                       Xpp3Dom formats = mojo.mojoExecution.getConfiguration().getChild( "formats" );
                       if (formats == null) {
                           formats = new Xpp3Dom( "formats" );
                           mojo.mojoExecution.getConfiguration().addChild( formats );
                       }
                       formats.addChild( fmt );
          }
        }
      }
    }
    return true;
View Full Code Here

                Xpp3Dom childConfiguration = new Xpp3Dom( rawName );
                int depth = elements.size();
                if ( depth > 0 )
                {
                    Xpp3Dom parent = (Xpp3Dom) elements.get( depth - 1 );
                    parent.addChild( childConfiguration );
                }
                elements.add( childConfiguration );
                if ( xmlStreamReader.isEndElement() )
                {
                    values.add( null );
View Full Code Here

            xpp3Dom.setAttribute( attribute.getName(), attribute.getValue() );
        }
        for ( Iterator i = element.elementIterator(); i.hasNext(); )
        {
            Element child = (Element) i.next();
            xpp3Dom.addChild( writeElementToXpp3Dom( child ) );
        }
        return xpp3Dom;
    } //-- Xpp3Dom writeElementToXpp3Dom(Element)

    /**
 
View Full Code Here

                Xpp3Dom childConfiguration = new Xpp3Dom( rawName );
                int depth = elements.size();
                if ( depth > 0 )
                {
                    Xpp3Dom parent = (Xpp3Dom) elements.get( depth - 1 );
                    parent.addChild( childConfiguration );
                }
                elements.add( childConfiguration );
                if ( xmlStreamReader.isEndElement() )
                {
                    values.add( null );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.