Status status = git.status().call();
Repository repository = git.getRepository();
File repoDir = repository.getDirectory().getParentFile();
if (!status.isClean())
{
AddCommand add = git.add();
MavenProject rootProject = ReleaseUtil.getRootProject(reactorProjects);
// File rootBaseDir = rootProject.getBasedir();
for (MavenProject project : reactorProjects)
{
String pomPath = relativePath(repoDir, project.getFile());
if (getLogger().isDebugEnabled())
{
getLogger().debug("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)
{