Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (C) 2011 JFrog Ltd.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.jfrog.hudson.release.scm.svn;
Subversion scm coordinator. Interacts with the SubversionManager to fulfill the release process.

Yossi Shaul
    private SubversionManager scmManager;
    private boolean tagCreated;
    private final ReleaseAction releaseAction;
    public SubversionCoordinator(AbstractBuild buildBuildListener listenerReleaseAction releaseAction) {
        this. = releaseAction;
    public void prepare() throws IOExceptionInterruptedException {
         = new SubversionManager();
        if (.isCreateVcsTag()) {
             = true;
    public void beforeDevelopmentVersionChange() {
        // nothing special for svn
    public void afterDevelopmentVersionChange(boolean modifiedthrows IOExceptionInterruptedException {
        if (modified) {
    public void buildCompleted() throws IOExceptionInterruptedException {
        if (.getResult().isWorseThan(.)) {
            // build has failed, make sure to delete the tag and revert the working copy
            if () {
                .safeRevertTag(.getTagUrl(), getRevertTagMessage());


The message to delete the tag with, if the user has inputted a custom message to commit the tag, then a Reverting: message will prepended to the custom message to use when deleting the tag. Otherwise, the default message will be used.
    private String getRevertTagMessage() {
        String tagComment = .getDefaultVcsConfig().getTagComment();
        if (StringUtils.equals(.getTagComment(), tagComment)) {
            return tagComment;
        return . + "Reverting: " + .getTagComment();
    public String getRemoteUrlForPom() {
        return .getRemoteUrl();
New to GrepCode? Check out our FAQ X