case FEATURE:
cacheKey = ProjectCacheKey.FEATURE_BRANCH;
break;
default:
throw new JGitFlowExtensionException("Unsupported branch type '" + branchType.name() + "' while running " + this.getClass().getSimpleName() + " command");
}
ReleaseContext ctx = contextProvider.getContext();
List<MavenProject> branchProjects = branchHelper.getProjectsForCurrentBranch();
projectHelper.checkPomForVersionState(VersionState.RELEASE, branchProjects);
if (!ctx.isAllowSnapshots())
{
List<String> snapshots = projectHelper.checkForNonReactorSnapshots(cacheKey, branchProjects);
if (!snapshots.isEmpty())
{
String details = Joiner.on(ls).join(snapshots);
throw new UnresolvedSnapshotsException("Cannot finish a " + branchType.name().toLowerCase() + " due to snapshot dependencies:" + ls + details);
}
}
}
catch (Exception e)
{
throw new JGitFlowExtensionException("Error verifying version state in poms: " + e.getMessage(), e);
}
}