test_class.file: app-cleaner/src/test/java/com/kdgregory/pomutil/cleaner/transform/TestReplaceExplicitVersionsWithProperties.java
test_class.identifier: TestReplaceExplicitVersionsWithProperties
test_class.superclass: extends AbstractTransformerTest
test_case.body: @Test
      public void testDisablePluginConversion() throws Exception
      {
          CommandLine args = new CommandLine("--noConvertPluginVersions");
          new ReplaceExplicitVersionsWithProperties(loadPom("cleaner/VersionProps7.xml"), args).transform();
  
          assertProperty("commons-io.version",                    "2.1");
          assertProperty("storm.version",                         "0.7.0");
          assertProperty("plugin.maven-antrun-plugin.version",    "");
          assertProperty("plugin.maven-compiler-plugin.version",  "");
          assertProperty("plugin.cobertura-maven-plugin.version", "");
  
          assertEquals("build plugin", "1.3",
                                       newXPath("/mvn:project/mvn:build/mvn:pluginManagement/mvn:plugins/mvn:plugin/mvn:version")
                                       .evaluateAsString(dom()));
          assertEquals("build plugin", "2.3.2",
                                       newXPath("/mvn:project/mvn:build/mvn:plugins/mvn:plugin/mvn:version")
                                       .evaluateAsString(dom()));
          assertEquals("build plugin", "2.5.1",
                                       newXPath("/mvn:project/mvn:reporting/mvn:plugins/mvn:plugin/mvn:version")
                                       .evaluateAsString(dom()));
      }
test_case.class_method_signature: TestReplaceExplicitVersionsWithProperties.testDisablePluginConversion()
test_case.full_signature: @Test public void testDisablePluginConversion()
test_case.identifier: testDisablePluginConversion
test_case.invocations: transform loadPom assertProperty assertProperty assertProperty assertProperty assertProperty assertEquals evaluateAsString newXPath dom assertEquals evaluateAsString newXPath dom assertEquals evaluateAsString newXPath dom
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDisablePluginConversion()
focal_class.declarator: logger = LoggerFactory.getLogger(getClass())
focal_class.original_string: Logger logger = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: logger
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.declarator: replaceExisting
focal_class.modifier: private
focal_class.original_string: private boolean replaceExisting;
focal_class.type: boolean
focal_class.var_name: replaceExisting
focal_class.declarator: disablePlugins
focal_class.modifier: private
focal_class.original_string: private boolean disablePlugins;
focal_class.type: boolean
focal_class.var_name: disablePlugins
focal_class.declarator: groupsToAppendArtifactId
focal_class.modifier: private
focal_class.original_string: private Set<String> groupsToAppendArtifactId;
focal_class.type: Set<String>
focal_class.var_name: groupsToAppendArtifactId
focal_class.file: app-cleaner/src/main/java/com/kdgregory/pomutil/cleaner/transform/ReplaceExplicitVersionsWithProperties.java
focal_class.identifier: ReplaceExplicitVersionsWithProperties
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.ReplaceExplicitVersionsWithProperties(PomWrapper pom, CommandLine args)
focal_class.full_signature: public  ReplaceExplicitVersionsWithProperties(PomWrapper pom, CommandLine args)
focal_class.identifier: ReplaceExplicitVersionsWithProperties
focal_class.modifiers: public
focal_class.parameters: (PomWrapper pom, CommandLine args)
focal_class.signature:  ReplaceExplicitVersionsWithProperties(PomWrapper pom, CommandLine args)
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.ReplaceExplicitVersionsWithProperties(PomWrapper pom)
focal_class.full_signature: public  ReplaceExplicitVersionsWithProperties(PomWrapper pom)
focal_class.identifier: ReplaceExplicitVersionsWithProperties
focal_class.modifiers: public
focal_class.parameters: (PomWrapper pom)
focal_class.signature:  ReplaceExplicitVersionsWithProperties(PomWrapper pom)
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.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.class_method_signature: ReplaceExplicitVersionsWithProperties.replaceExistingDependencyProps(List<Element> dependencies, Map<String,String> properties)
focal_class.full_signature: private Set<String> replaceExistingDependencyProps(List<Element> dependencies, Map<String,String> properties)
focal_class.identifier: replaceExistingDependencyProps
focal_class.modifiers: private
focal_class.parameters: (List<Element> dependencies, Map<String,String> properties)
focal_class.return: Set<String>
focal_class.signature: Set<String> replaceExistingDependencyProps(List<Element> dependencies, Map<String,String> properties)
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.removeReplacedProperties(Set<String> propNames)
focal_class.full_signature: private void removeReplacedProperties(Set<String> propNames)
focal_class.identifier: removeReplacedProperties
focal_class.modifiers: private
focal_class.parameters: (Set<String> propNames)
focal_class.return: void
focal_class.signature: void removeReplacedProperties(Set<String> propNames)
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.updateDependencies(List<Element> dependencies, Map<String,String> props)
focal_class.full_signature: private Set<String> updateDependencies(List<Element> dependencies, Map<String,String> props)
focal_class.identifier: updateDependencies
focal_class.modifiers: private
focal_class.parameters: (List<Element> dependencies, Map<String,String> props)
focal_class.return: Set<String>
focal_class.signature: Set<String> updateDependencies(List<Element> dependencies, Map<String,String> props)
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.generatePropertyName(Map<String,String> props, Element dependency)
focal_class.full_signature: private String generatePropertyName(Map<String,String> props, Element dependency)
focal_class.identifier: generatePropertyName
focal_class.modifiers: private
focal_class.parameters: (Map<String,String> props, Element dependency)
focal_class.return: String
focal_class.signature: String generatePropertyName(Map<String,String> props, Element dependency)
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.updateDependency(Element dependency, String version)
focal_class.full_signature: private void updateDependency(Element dependency, String version)
focal_class.identifier: updateDependency
focal_class.modifiers: private
focal_class.parameters: (Element dependency, String version)
focal_class.return: void
focal_class.signature: void updateDependency(Element dependency, String version)
focal_class.class_method_signature: ReplaceExplicitVersionsWithProperties.addNewProperties(Map<String,String> props, Set<String> newProps)
focal_class.full_signature: private void addNewProperties(Map<String,String> props, Set<String> newProps)
focal_class.identifier: addNewProperties
focal_class.modifiers: private
focal_class.parameters: (Map<String,String> props, Set<String> newProps)
focal_class.return: void
focal_class.signature: void addNewProperties(Map<String,String> props, Set<String> newProps)
focal_class.superclass: extends AbstractTransformer
focal_method.body: @Override
      public void transform()
      {
          if (disabled)
              return;
  
          Map<String,String> allProps = pom.getProperties();
          List<Element> dependencies = selectAllDependencies();
          if (! disablePlugins)
              dependencies.addAll(selectAllPlugins());
  
          if (replaceExisting)
          {
              Set<String> oldProps = replaceExistingDependencyProps(dependencies, allProps);
              removeReplacedProperties(oldProps);
          }
  
          Set<String> newProps = updateDependencies(dependencies, allProps);
          addNewProperties(allProps, newProps);
      }
focal_method.class_method_signature: ReplaceExplicitVersionsWithProperties.transform()
focal_method.full_signature: @Override public void transform()
focal_method.identifier: transform
focal_method.invocations: getProperties selectAllDependencies addAll selectAllPlugins replaceExistingDependencyProps removeReplacedProperties updateDependencies addNewProperties
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void transform()