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

Examples of org.jboss.forge.addon.maven.plugins.ConfigurationImpl


                  // Configurations
                  Map<String, String> cfgExecElmtsRefMap = new HashMap<>();
                  if (pluginExecutionRecessive.getConfiguration() != null
                           && pluginExecutionDominant.getConfiguration() != null)
                  {
                     Configuration pluginExecutionRecessiveCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionRecessive.getConfiguration());
                     Configuration pluginExecutionDominantCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionDominant.getConfiguration());
                     Configuration pluginExecutionMergedCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionMerged.getConfiguration());

                     for (ConfigurationElement e : pluginExecutionDominantCfg.listConfigurationElements())
                     {
                        // FIXME: recursively do a diff of childrens, if any
                        cfgExecElmtsRefMap.put(e.getName(), e.toString());
                     }
                     for (ConfigurationElement e : pluginExecutionRecessiveCfg.listConfigurationElements())
                     {
                        if (cfgExecElmtsRefMap.containsKey(e.getName()))
                        {
                           if (Strings.compare(cfgExecElmtsRefMap.get(e.getName()), e.toString()))
                           {
                              // Remove the execution configuration element as dominant and recessive have the same
                              // element
                              pluginExecutionMergedCfg.removeConfigurationElement(e.getName());
                           }
                        }
                     }
                     if (!pluginExecutionMergedCfg.hasConfigurationElements())
                     {
                        pluginExecutionMerged.setConfiguration(null);
                     }
                     try
                     {
                        pluginExecutionMerged.setConfiguration(Xpp3DomBuilder.build(
                                 new ByteArrayInputStream(pluginExecutionMergedCfg.toString().getBytes()), "UTF-8"));
                     }
                     catch (Exception ex)
                     {
                        throw new RuntimeException("Exception while parsing configuration", ex);
                     }
View Full Code Here


                  // Configurations
                  Map<String, String> cfgExecElmtsRefMap = new HashMap<>();
                  if (pluginExecutionRecessive.getConfiguration() != null
                           && pluginExecutionDominant.getConfiguration() != null)
                  {
                     Configuration pluginExecutionRecessiveCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionRecessive.getConfiguration());
                     Configuration pluginExecutionDominantCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionDominant.getConfiguration());
                     Configuration pluginExecutionMergedCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionMerged.getConfiguration());

                     for (ConfigurationElement e : pluginExecutionDominantCfg.listConfigurationElements())
                     {
                        // FIXME: recursively do a diff of childrens, if any
                        cfgExecElmtsRefMap.put(e.getName(), e.toString());
                     }
                     for (ConfigurationElement e : pluginExecutionRecessiveCfg.listConfigurationElements())
                     {
                        if (cfgExecElmtsRefMap.containsKey(e.getName()))
                        {
                           if (Strings.areEqual(cfgExecElmtsRefMap.get(e.getName()), e.toString()))
                           {
                              // Remove the execution configuration element as dominant and recessive have the same
                              // element
                              pluginExecutionMergedCfg.removeConfigurationElement(e.getName());
                           }
                        }
                     }
                     if (!pluginExecutionMergedCfg.hasConfigurationElements())
                     {
                        pluginExecutionMerged.setConfiguration(null);
                     }
                     try
                     {
                        pluginExecutionMerged.setConfiguration(Xpp3DomBuilder.build(
                                 new ByteArrayInputStream(pluginExecutionMergedCfg.toString().getBytes()), "UTF-8"));
                     }
                     catch (Exception ex)
                     {
                        throw new RuntimeException("Exception while parsing configuration", ex);
                     }
View Full Code Here

                  // Configurations
                  Map<String, String> cfgExecElmtsRefMap = new HashMap<String, String>();
                  if (pluginExecutionRecessive.getConfiguration() != null
                           && pluginExecutionDominant.getConfiguration() != null)
                  {
                     Configuration pluginExecutionRecessiveCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionRecessive.getConfiguration());
                     Configuration pluginExecutionDominantCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionDominant.getConfiguration());
                     Configuration pluginExecutionMergedCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionMerged.getConfiguration());

                     for (ConfigurationElement e : pluginExecutionDominantCfg.listConfigurationElements())
                     {
                        // FIXME: recursively do a diff of childrens, if any
                        cfgExecElmtsRefMap.put(e.getName(), e.toString());
                     }
                     for (ConfigurationElement e : pluginExecutionRecessiveCfg.listConfigurationElements())
                     {
                        if (cfgExecElmtsRefMap.containsKey(e.getName()))
                        {
                           if (Strings.areEqual(cfgExecElmtsRefMap.get(e.getName()), e.toString()))
                           {
                              // Remove the execution configuration element as dominant and recessive have the same
                              // element
                              pluginExecutionMergedCfg.removeConfigurationElement(e.getName());
                           }
                        }
                     }
                     if (!pluginExecutionMergedCfg.hasConfigurationElements())
                     {
                        pluginExecutionMerged.setConfiguration(null);
                     }
                     try
                     {
                        pluginExecutionMerged.setConfiguration(Xpp3DomBuilder.build(
                                 new ByteArrayInputStream(pluginExecutionMergedCfg.toString().getBytes()), "UTF-8"));
                     }
                     catch (Exception ex)
                     {
                        throw new RuntimeException("Exception while parsing configuration", ex);
                     }
View Full Code Here

                  // Configurations
                  Map<String, String> cfgExecElmtsRefMap = new HashMap<>();
                  if (pluginExecutionRecessive.getConfiguration() != null
                           && pluginExecutionDominant.getConfiguration() != null)
                  {
                     Configuration pluginExecutionRecessiveCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionRecessive.getConfiguration());
                     Configuration pluginExecutionDominantCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionDominant.getConfiguration());
                     Configuration pluginExecutionMergedCfg = new ConfigurationImpl(
                              (Xpp3Dom) pluginExecutionMerged.getConfiguration());

                     for (ConfigurationElement e : pluginExecutionDominantCfg.listConfigurationElements())
                     {
                        // FIXME: recursively do a diff of childrens, if any
                        cfgExecElmtsRefMap.put(e.getName(), e.toString());
                     }
                     for (ConfigurationElement e : pluginExecutionRecessiveCfg.listConfigurationElements())
                     {
                        if (cfgExecElmtsRefMap.containsKey(e.getName()))
                        {
                           if (Strings.areEqual(cfgExecElmtsRefMap.get(e.getName()), e.toString()))
                           {
                              // Remove the execution configuration element as dominant and recessive have the same
                              // element
                              pluginExecutionMergedCfg.removeConfigurationElement(e.getName());
                           }
                        }
                     }
                     if (!pluginExecutionMergedCfg.hasConfigurationElements())
                     {
                        pluginExecutionMerged.setConfiguration(null);
                     }
                     try
                     {
                        pluginExecutionMerged.setConfiguration(Xpp3DomBuilder.build(
                                 new ByteArrayInputStream(pluginExecutionMergedCfg.toString().getBytes()), "UTF-8"));
                     }
                     catch (Exception ex)
                     {
                        throw new RuntimeException("Exception while parsing configuration", ex);
                     }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.maven.plugins.ConfigurationImpl

Copyright © 2018 www.massapicom. 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.