test_class.file: app-cleaner/src/test/java/com/kdgregory/pomutil/cleaner/transform/TestNormalizePlugins.java
test_class.identifier: TestNormalizePlugins
test_class.superclass: extends AbstractTransformerTest
test_case.body: @Test
      public void testDisabled() throws Exception
      {
          CommandLine args = new CommandLine("--noPluginNormalize");
          new NormalizePlugins(loadPom("cleaner/PluginNormalize1.xml"), args).transform();
  
          Element plug1 = newXPath("//mvn:artifactId[text()='maven-antrun-plugin']/..").evaluateAsElement(dom());
          List<Element> children1 = DomUtil.getChildren(plug1);
          assertEquals("plugin #1, #/children", 2, children1.size());
          assertEquals("plugin #1, child #1 name",  "version",                  DomUtil.getLocalName(children1.get(0)));
          assertEquals("plugin #1, child #1 value", "1.3",                      DomUtil.getText(children1.get(0)));
          assertEquals("plugin #1, child #2 name",  "artifactId",               DomUtil.getLocalName(children1.get(1)));
          assertEquals("plugin #1, child #2 value", "maven-antrun-plugin",      DomUtil.getText(children1.get(1)));
      }
test_case.class_method_signature: TestNormalizePlugins.testDisabled()
test_case.full_signature: @Test public void testDisabled()
test_case.identifier: testDisabled
test_case.invocations: transform loadPom evaluateAsElement newXPath dom getChildren assertEquals size assertEquals getLocalName get assertEquals getText get assertEquals getLocalName get assertEquals getText get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDisabled()
focal_class.declarator: STANDARD_CHILDREN = new String[] {
              "groupId", "artifactId", "version",
              "extensions", "inherited", "configuration",
              "dependencies", "executions"
              }
focal_class.modifier: private static final
focal_class.original_string: private static final String[] STANDARD_CHILDREN = new String[] {
              "groupId", "artifactId", "version",
              "extensions", "inherited", "configuration",
              "dependencies", "executions"
              };
focal_class.type: String[]
focal_class.var_name: STANDARD_CHILDREN
focal_class.declarator: disabled
focal_class.modifier: private
focal_class.original_string: private boolean disabled;
focal_class.type: boolean
focal_class.var_name: disabled
focal_class.file: app-cleaner/src/main/java/com/kdgregory/pomutil/cleaner/transform/NormalizePlugins.java
focal_class.identifier: NormalizePlugins
focal_class.class_method_signature: NormalizePlugins.NormalizePlugins(PomWrapper pom, CommandLine args)
focal_class.full_signature: public  NormalizePlugins(PomWrapper pom, CommandLine args)
focal_class.identifier: NormalizePlugins
focal_class.modifiers: public
focal_class.parameters: (PomWrapper pom, CommandLine args)
focal_class.signature:  NormalizePlugins(PomWrapper pom, CommandLine args)
focal_class.class_method_signature: NormalizePlugins.NormalizePlugins(PomWrapper pom)
focal_class.full_signature: public  NormalizePlugins(PomWrapper pom)
focal_class.identifier: NormalizePlugins
focal_class.modifiers: public
focal_class.parameters: (PomWrapper pom)
focal_class.signature:  NormalizePlugins(PomWrapper pom)
focal_class.class_method_signature: NormalizePlugins.transform()
focal_class.full_signature: @Override public void transform()
focal_class.identifier: transform
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void transform()
focal_class.superclass: extends AbstractTransformer
focal_method.body: @Override
      public void transform()
      {
          if (disabled)
              return;
  
          for (Element plugin : selectAllPlugins())
          {
              if (DomUtil.getChild(plugin, "groupId") == null)
              {
                  Element groupId = DomUtil.appendChildInheritNamespace(plugin, "groupId");
                  DomUtil.setText(groupId, "org.apache.maven.plugins");
              }
              Utils.reconstruct(plugin, STANDARD_CHILDREN);
          }
      }
focal_method.class_method_signature: NormalizePlugins.transform()
focal_method.full_signature: @Override public void transform()
focal_method.identifier: transform
focal_method.invocations: selectAllPlugins getChild appendChildInheritNamespace setText reconstruct
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void transform()