test_class.declarator: logger = LoggerFactory.getLogger(getClass())
test_class.original_string: Logger logger = LoggerFactory.getLogger(getClass());
test_class.type: Logger
test_class.var_name: logger
test_class.file: app-version/src/test/java/com/kdgregory/pomutil/version/TestVersionUpdater.java
test_class.identifier: TestVersionUpdater
test_case.body: @Test
      public void testAutomaticVersionDetectionRegulaToSnapshot() throws Exception
      {
          logger.info("*** testAutomaticVersionDetectionRegulaToSnapshot ***");
  
          String oldVersion = "1.0.1";
          String newVersion = "1.0.2-SNAPSHOT";
  
          List<File> poms = createTestPoms("basepom.xml", 1);
          File pom = poms.get(0);
          updatePom(pom, PomPaths.PROJECT_VERSION, oldVersion);
  
          new VersionUpdater("com.example.pomutil.test", "example", null, null, true, false, false).run(poms);
          PomWrapper check = new PomWrapper(pom);
          assertEquals(newVersion, check.getGAV().version);
      }
test_case.class_method_signature: TestVersionUpdater.testAutomaticVersionDetectionRegulaToSnapshot()
test_case.full_signature: @Test public void testAutomaticVersionDetectionRegulaToSnapshot()
test_case.identifier: testAutomaticVersionDetectionRegulaToSnapshot
test_case.invocations: info createTestPoms get updatePom run assertEquals getGAV
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAutomaticVersionDetectionRegulaToSnapshot()
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: groupId
focal_class.modifier: private
focal_class.original_string: private String groupId;
focal_class.type: String
focal_class.var_name: groupId
focal_class.declarator: artifactId
focal_class.modifier: private
focal_class.original_string: private String artifactId;
focal_class.type: String
focal_class.var_name: artifactId
focal_class.declarator: fromVersion
focal_class.modifier: private
focal_class.original_string: private String fromVersion;
focal_class.type: String
focal_class.var_name: fromVersion
focal_class.declarator: toVersion
focal_class.modifier: private
focal_class.original_string: private String toVersion;
focal_class.type: String
focal_class.var_name: toVersion
focal_class.declarator: autoVersion
focal_class.modifier: private
focal_class.original_string: private boolean autoVersion;
focal_class.type: boolean
focal_class.var_name: autoVersion
focal_class.declarator: updateParent
focal_class.modifier: private
focal_class.original_string: private boolean updateParent;
focal_class.type: boolean
focal_class.var_name: updateParent
focal_class.declarator: updateDependencies
focal_class.modifier: private
focal_class.original_string: private boolean updateDependencies;
focal_class.type: boolean
focal_class.var_name: updateDependencies
focal_class.file: app-version/src/main/java/com/kdgregory/pomutil/version/VersionUpdater.java
focal_class.identifier: VersionUpdater
focal_class.class_method_signature: VersionUpdater.VersionUpdater(
          String groupId, String artifactId, String fromVersion, String toVersion,
          boolean autoVersion, boolean updateParent, boolean updateDependencies)
focal_class.full_signature: public  VersionUpdater(
          String groupId, String artifactId, String fromVersion, String toVersion,
          boolean autoVersion, boolean updateParent, boolean updateDependencies)
focal_class.identifier: VersionUpdater
focal_class.modifiers: public
focal_class.parameters: (
          String groupId, String artifactId, String fromVersion, String toVersion,
          boolean autoVersion, boolean updateParent, boolean updateDependencies)
focal_class.signature:  VersionUpdater(
          String groupId, String artifactId, String fromVersion, String toVersion,
          boolean autoVersion, boolean updateParent, boolean updateDependencies)
focal_class.class_method_signature: VersionUpdater.run(List<File> files)
focal_class.full_signature: public void run(List<File> files)
focal_class.identifier: run
focal_class.modifiers: public
focal_class.parameters: (List<File> files)
focal_class.return: void
focal_class.signature: void run(List<File> files)
focal_class.class_method_signature: VersionUpdater.possiblyUpdateProjectVersion(PomWrapper wrapped)
focal_class.full_signature: private boolean possiblyUpdateProjectVersion(PomWrapper wrapped)
focal_class.identifier: possiblyUpdateProjectVersion
focal_class.modifiers: private
focal_class.parameters: (PomWrapper wrapped)
focal_class.return: boolean
focal_class.signature: boolean possiblyUpdateProjectVersion(PomWrapper wrapped)
focal_class.class_method_signature: VersionUpdater.possiblyUpdateParentVersion(PomWrapper wrapped)
focal_class.full_signature: private boolean possiblyUpdateParentVersion(PomWrapper wrapped)
focal_class.identifier: possiblyUpdateParentVersion
focal_class.modifiers: private
focal_class.parameters: (PomWrapper wrapped)
focal_class.return: boolean
focal_class.signature: boolean possiblyUpdateParentVersion(PomWrapper wrapped)
focal_class.class_method_signature: VersionUpdater.possiblyUpdateDependencies(PomWrapper wrapped)
focal_class.full_signature: private boolean possiblyUpdateDependencies(PomWrapper wrapped)
focal_class.identifier: possiblyUpdateDependencies
focal_class.modifiers: private
focal_class.parameters: (PomWrapper wrapped)
focal_class.return: boolean
focal_class.signature: boolean possiblyUpdateDependencies(PomWrapper wrapped)
focal_class.class_method_signature: VersionUpdater.possiblyUpdateProperties(PomWrapper wrapped, Set<Element> targetDependencies, Set<String> targetProperties)
focal_class.full_signature: private boolean possiblyUpdateProperties(PomWrapper wrapped, Set<Element> targetDependencies, Set<String> targetProperties)
focal_class.identifier: possiblyUpdateProperties
focal_class.modifiers: private
focal_class.parameters: (PomWrapper wrapped, Set<Element> targetDependencies, Set<String> targetProperties)
focal_class.return: boolean
focal_class.signature: boolean possiblyUpdateProperties(PomWrapper wrapped, Set<Element> targetDependencies, Set<String> targetProperties)
focal_class.class_method_signature: VersionUpdater.groupAndArtifactMatches(Element reference)
focal_class.full_signature: private boolean groupAndArtifactMatches(Element reference)
focal_class.identifier: groupAndArtifactMatches
focal_class.modifiers: private
focal_class.parameters: (Element reference)
focal_class.return: boolean
focal_class.signature: boolean groupAndArtifactMatches(Element reference)
focal_class.class_method_signature: VersionUpdater.oldVersionMatches(Element container)
focal_class.full_signature: private boolean oldVersionMatches(Element container)
focal_class.identifier: oldVersionMatches
focal_class.modifiers: private
focal_class.parameters: (Element container)
focal_class.return: boolean
focal_class.signature: boolean oldVersionMatches(Element container)
focal_class.class_method_signature: VersionUpdater.oldVersionMatches(String existingVersion)
focal_class.full_signature: private boolean oldVersionMatches(String existingVersion)
focal_class.identifier: oldVersionMatches
focal_class.modifiers: private
focal_class.parameters: (String existingVersion)
focal_class.return: boolean
focal_class.signature: boolean oldVersionMatches(String existingVersion)
focal_class.class_method_signature: VersionUpdater.updateVersionElement(String containerType, Element container)
focal_class.full_signature: private void updateVersionElement(String containerType, Element container)
focal_class.identifier: updateVersionElement
focal_class.modifiers: private
focal_class.parameters: (String containerType, Element container)
focal_class.return: void
focal_class.signature: void updateVersionElement(String containerType, Element container)
focal_class.class_method_signature: VersionUpdater.determineNewVersion(String existingVersion)
focal_class.full_signature: private String determineNewVersion(String existingVersion)
focal_class.identifier: determineNewVersion
focal_class.modifiers: private
focal_class.parameters: (String existingVersion)
focal_class.return: String
focal_class.signature: String determineNewVersion(String existingVersion)
focal_method.body: public void run(List<File> files)
      throws Exception
      {
          for (File file : files)
          {
              logger.info("processing: " + file.getPath());
              try
              {
                  PomWrapper wrapped = new PomWrapper(file);
                  boolean changed = possiblyUpdateProjectVersion(wrapped)
                                  | possiblyUpdateParentVersion(wrapped)
                                  | possiblyUpdateDependencies(wrapped);
                  if (changed)
                  {
                      FileOutputStream out = new FileOutputStream(file);
                      try
                      {
                          OutputUtil.compactStream(wrapped.getDom(), out);
                      }
                      finally
                      {
                          IOUtil.closeQuietly(out);
                      }
                  }
              }
              catch (Exception ex)
              {
                  logger.warn("unable to parse file: " + file);
              }
          }
      }
focal_method.class_method_signature: VersionUpdater.run(List<File> files)
focal_method.full_signature: public void run(List<File> files)
focal_method.identifier: run
focal_method.invocations: info getPath possiblyUpdateProjectVersion possiblyUpdateParentVersion possiblyUpdateDependencies compactStream getDom closeQuietly warn
focal_method.modifiers: public
focal_method.parameters: (List<File> files)
focal_method.return: void
focal_method.signature: void run(List<File> files)