canonicalRepoDir = repoDir.getCanonicalFile();
}
catch (IOException e)
{
throw
new MavenJGitFlowException(
"Cannot get canonical name for repository directory <" +
repoDir + ">",
e
);
}
}
if (!status.isClean())
{
AddCommand add = git.add();
MavenProject rootProject = ReleaseUtil.getRootProject(reactorProjects);
// File rootBaseDir = rootProject.getBasedir();
for (MavenProject project : reactorProjects)
{
String pomPath = relativePath(canonicalRepoDir, project.getFile());
if (getLogger().isDebugEnabled())
{
getLogger().debug("(" + fullBranchName + ") adding file pattern for poms commit: " + pomPath);
}
if (isWindows)
{
pomPath = StringUtils.replace(pomPath, "\\", "/");
}
add.addFilepattern(pomPath);
}
add.call();
git.commit().setMessage(message).call();
}
}
catch (GitAPIException e)
{
throw new MavenJGitFlowException("error committing pom changes: " + e.getMessage(), e);
}
catch (IOException e)
{
throw new MavenJGitFlowException("error committing pom changes: " + e.getMessage(), e);
}
}