Package org.jboss.forge.addon.maven.plugins

Examples of org.jboss.forge.addon.maven.plugins.ConfigurationElementBuilder.addChild()


      // Copy non-conflicting elements from old config element
      for (final PluginElement child : prev.getChildren()) {
        if (!(child instanceof ConfigurationElement)) {
          // configElem should only contain other ConfigurationElemnents, so
          // this case is non-conflicting
          retVal.addChild(child);
        }
        else {
          final ConfigurationElement oldChild = ConfigurationElement.class.cast(child);
          if (!configElem.hasChildByName(oldChild.getName(), true))
            retVal.addChild(oldChild);
View Full Code Here


          retVal.addChild(child);
        }
        else {
          final ConfigurationElement oldChild = ConfigurationElement.class.cast(child);
          if (!configElem.hasChildByName(oldChild.getName(), true))
            retVal.addChild(oldChild);
        }
      }
      // Add or merge from new config element
      for (final PluginElement child : configElem.getChildren()) {
        if (!(child instanceof ConfigurationElement)) {
View Full Code Here

          throw new IllegalArgumentException("Cannot merge PluginElement of type " + child.getClass().getName());
        }
        else {
          final ConfigurationElement newChild = ConfigurationElement.class.cast(child);
          if (prev.hasChildByName(newChild.getName(), true)) {
            retVal.addChild(merge(prev.getChildByName(newChild.getName(), true), newChild));
          }
          else {
            retVal.addChild(newChild);
          }
        }
View Full Code Here

          final ConfigurationElement newChild = ConfigurationElement.class.cast(child);
          if (prev.hasChildByName(newChild.getName(), true)) {
            retVal.addChild(merge(prev.getChildByName(newChild.getName(), true), newChild));
          }
          else {
            retVal.addChild(newChild);
          }
        }
      }

      return retVal;
View Full Code Here

      // Copy non-conflicting elements from old config element
      for (final PluginElement child : prev.getChildren()) {
        if (!(child instanceof ConfigurationElement)) {
          // configElem should only contain other ConfigurationElemnents, so
          // this case is non-conflicting
          retVal.addChild(child);
        }
        else {
          final ConfigurationElement oldChild = ConfigurationElement.class.cast(child);
          if (!configElem.hasChildByName(oldChild.getName(), true))
            retVal.addChild(oldChild);
View Full Code Here

          retVal.addChild(child);
        }
        else {
          final ConfigurationElement oldChild = ConfigurationElement.class.cast(child);
          if (!configElem.hasChildByName(oldChild.getName(), true))
            retVal.addChild(oldChild);
        }
      }
      // Add or merge from new config element
      for (final PluginElement child : configElem.getChildren()) {
        if (!(child instanceof ConfigurationElement)) {
View Full Code Here

          throw new IllegalArgumentException("Cannot merge PluginElement of type " + child.getClass().getName());
        }
        else {
          final ConfigurationElement newChild = ConfigurationElement.class.cast(child);
          if (prev.hasChildByName(newChild.getName(), true)) {
            retVal.addChild(merge(prev.getChildByName(newChild.getName(), true), newChild));
          }
          else {
            retVal.addChild(newChild);
          }
        }
View Full Code Here

          final ConfigurationElement newChild = ConfigurationElement.class.cast(child);
          if (prev.hasChildByName(newChild.getName(), true)) {
            retVal.addChild(merge(prev.getChildByName(newChild.getName(), true), newChild));
          }
          else {
            retVal.addChild(newChild);
          }
        }
      }

      return retVal;
View Full Code Here

    final Execution execution = executions.iterator().next();
    final ConfigurationElement artifactItems = execution.getConfig().getConfigurationElement("artifactItems");
    final ConfigurationElementBuilder artifactItem = (ConfigurationElementBuilder) artifactItems.getChildren().get(0);

    final VersionFacet versionFacet = getProject().getFacet(VersionFacet.class);
    artifactItem.addChild(ConfigurationElementBuilder.create().setName("version")
            .setText(versionFacet.resolveVersion(WildflyDist)));
  }

}
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.