Executes git branch -d.

@param branchName
Branch name to delete.
@throws MojoFailureException
@throws CommandLineException
336089
protected void gitBranchDelete(final String branchName)
            throws MojoFailureException, CommandLineException {
        getLog().info("Deleting '" + branchName + "' branch.");

        executeGitCommand("branch", "-d", branchName);
    }
818076
@Override
	public void execute() throws MojoExecutionException, MojoFailureException {
	    try {
			final ResourcesAggregator aggr = this.createResourcesAggregator();
			
			final File fullOutputDirectory = new File(baseOutputDirectory, skinOutputDirectory);
			this.doAggregation(aggr, skinConfigurationFile, fullOutputDirectory);
		} catch (AggregationException e) {
			throw new MojoExecutionException("aggregation failed", e);
		} catch (IOException e) {
			throw new MojoExecutionException("IOException occurred", e);
		}
	}
241959
public static void deleteValue(String branch, String entry) throws IOException, InterruptedException {
	if (entry == null) {
	    String[] cmd = new String[] { "reg", "delete", cleanBrunch(branch), "/f" };
	    executeQuery(cmd);
	    // executeQuery("reg delete \""+List.trim(branch,"\\")+"\" /f");
	}
	else {
	    String[] cmd = new String[] { "reg", "delete", cleanBrunch(branch), "/v", entry, "/f" };
	    executeQuery(cmd);
	    // executeQuery("reg delete \""+List.trim(branch,"\\")+"\" /v "+entry+" /f");
	}
    }
493588
public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        if ( isSkipping() )
        {
            getLog().debug( "Skipping execution, as demanded by user." );
            return;
        }
        if ( transformationSets == null || transformationSets.length == 0 )
        {
            throw new MojoFailureException( "No TransformationSets configured." );
        }
        checkCatalogHandling();

        Object oldProxySettings = activateProxy();
        try
        {
            Resolver resolver = getResolver();
            for ( int i = 0; i < transformationSets.length; i++ )
            {
                TransformationSet transformationSet = transformationSets[i];
                resolver.setXincludeAware( transformationSet.isXincludeAware() );
                resolver.setValidating( transformationSet.isValidating() );
                transform( resolver, transformationSet );
            }
        }
        finally
        {
            passivateProxy( oldProxySettings );
        }
    }
448402
protected void gitMergeSquash(final String branchName)
            throws MojoFailureException, CommandLineException {
        getLog().info("Squashing '" + branchName + "' branch.");
        executeGitCommand("merge", "--squash", branchName);
    }
690911
private boolean gitFetchRemote(final String branchName)
            throws MojoFailureException, CommandLineException {
        getLog().info(
                "Fetching remote branch '" + gitFlowConfig.getOrigin() + " "
                        + branchName + "'.");

        CommandResult result = executeGitCommandExitCode("fetch", "--quiet",
                gitFlowConfig.getOrigin(), branchName);

        boolean success = result.getExitCode() == SUCCESS_EXIT_CODE;
        if (!success) {
            getLog().warn(
                    "There were some problems fetching remote branch '"
                            + gitFlowConfig.getOrigin()
                            + " "
                            + branchName
                            + "'. You can turn off remote branch fetching by setting the 'fetchRemote' parameter to false.");
        }

        return success;
    }
1006759
public void run () throws MojoExecutionException, MojoFailureException
  {
    ESuccess exitCode;
    try
    {
      if (getLog ().isDebugEnabled ())
      {
        getLog ().debug ("Running " + getToolName () + ": " + this);
      }
      exitCode = execute ();
    }
    catch (final Exception e)
    {
      throw new MojoExecutionException ("Failed to execute " + getToolName (), e);
    }
    if (exitCode.isFailure ())
    {
      throw new MojoFailureException (getToolName () + " reported failure: " + this);
    }
  }
546526
public void execute() throws MojoExecutionException, MojoFailureException {
		try {
			createBundles();
		} catch (Exception ex) {
			Logger logger = Logger.getLogger(JawrMojo.class.getName());
			if(ex instanceof ServletException){
				logger.log(Level.SEVERE, null, ((ServletException)ex).getRootCause());
			}else{
				logger.log(Level.SEVERE, null, ex);
			}
			throw new MojoFailureException("JAWR Maven plugin failed: " + ex.getLocalizedMessage());
		}
	}
781692
public void execute() throws Exception {
    String site1 = getSecureBaseUrl(sites.get(0));
    String site2 = getSecureBaseUrl(sites.get(1));
    if(site1.equalsIgnoreCase(site2)) {
      System.err.println("Cannot clone a site into itself.");
      System.exit(1);
    }
    
    try{
      System.out.println("Getting status of ["+site1+"]");
      Status site1Status = StatusCommand.getSiteStatus(site1, token);
      
      System.out.println("Getting status of ["+site2+"]");
      Status site2Status = StatusCommand.getSiteStatus(site2, token);
      if(site1Status != null && site2Status != null) {
        
        String repo = site1Status.getRepo();
        String revision = site1Status.getRevision();
        String branch = site1Status.getBranch();
        
        if(site2Status.getRepo().equals(repo) && site2Status.getBranch().equals(branch) && site2Status.getRevision().equals(revision)) {
          System.err.println("Source [" + site1 + "] is on the same content repo, branch, and revision as the target [" + site2 + "].");
          checkSendUpdateConfigMessage(site1, site2, site1Status, site2Status);
          System.exit(1);
        }
        
        System.out.println("Sending update message to ["+site2+"]");
        UpdateCommand.sendUpdateMessage(site2, repo, branch, revision, "Cloned from ["+site1+"]: " + comment, token);
        checkSendUpdateConfigMessage(site1, site2, site1Status, site2Status);
      } else {
        System.err.println("Failed to get status from source and/or target.");
        System.exit(1);
      }
    } catch(Exception e) {
      e.printStackTrace();
      System.err.println("Failed to clone ["+site1+"] to ["+site2+"]: "+e.getMessage());
    }
  }
529433
public void execute() throws MojoExecutionException, MojoFailureException {
        // iterate through all <merge />
        for (Merger merger : mergers) {
            // get target file name...
            final File target = merger.getTarget();
            // get list of source files
            final List<File> sources = Arrays.asList(merger.getSources());
            // ...and use a stream
            final OutputStream targetStream = initOutput(target);
            // iterate source files
            for (File source : sources) {
                final InputStream sourceStream = initInput(source);
                // append
                appendStream(sourceStream, targetStream);
                // close source
                if (null != sourceStream) {
                    try {
                        sourceStream.close();
                    } catch (IOException e) {
                        throw new MojoExecutionException(
                            "Could not close file: "
                                + source.getAbsolutePath(), e);
                    }
                }
            }
            // close target
            if (null != targetStream) {
                try {
                    targetStream.close();
                } catch (IOException e) {
                    throw new MojoExecutionException("Could not close file: "
                        + target.getAbsolutePath(), e);
                }
            }
        }
    }
499310
public void deleteBranch(Serializable projectId, String branchName) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabBranch.URL + '/' + sanitizePath(branchName);
        retrieve().method(DELETE).to(tailUrl, Void.class);
    }
57332
@Override
    public void execute() throws MojoExecutionException {
        new WisdomExecutor().stop(this);
        File pid = new File(getWisdomRootDirectory(), "RUNNING_PID");
        if (WisdomExecutor.waitForFileDeletion(pid)) {
            getLog().info("Wisdom server stopped.");
        } else {
            throw new MojoExecutionException("The " + pid.getName() + " file still exists after having stopped the " +
                    "Wisdom instance - check log");
        }
    }
35321
@Override
	public JobExecutionResult execute(String jobName) throws Exception {
		Plan p = createProgramPlan(jobName);
		
		PlanExecutor executor = PlanExecutor.createLocalExecutor();
		initLogging();
		return executor.executePlan(p);
	}
431875
protected void gitFetchRemoteAndCreate(final String branchName)
            throws MojoFailureException, CommandLineException {
        if (!gitCheckBranchExists(branchName)) {
            getLog().info(
                    "Local branch '"
                            + branchName
                            + "' doesn't exist. Trying to fetch and check it out from '"
                            + gitFlowConfig.getOrigin() + "'.");
            gitFetchRemote(branchName);
            gitCreateAndCheckout(branchName, gitFlowConfig.getOrigin() + "/"
                    + branchName);
        }
    }
1201712
private String executeGitCommandReturn(final String... args)
            throws CommandLineException, MojoFailureException {
        return executeCommand(cmdGit, true, null, args).getOut();
    }
1320820
public void execute() throws MojoExecutionException {

		getLog().debug("- outputDirectory : " + outputDirectory);
		// security
		try {
			CheckService.isValidOutputDirectory(outputDirectory);
		} catch (InvalidOutputDirectoryException e) {
			throw new MojoExecutionException("CheckService return error(s)", e);
		}

		getLog().debug("- resources : " + resources);
		for (Resource resource : resources) {

			try {
				ResourceService.execute(this, resource, outputDirectory);
			} catch (ResourceExecutionException e) {
				throw new MojoExecutionException(
						"ResourceService return error(s)", e);
			}
		}

	}
1011577
public void execute() throws MojoFailureException, MojoExecutionException {
        // Validate
        validateArtifactInformation();

        Artifact artifact =
                artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, packaging, classifier );

        File existingFile = getLocalRepoFile(artifact);
        if (existingFile != null && existingFile.exists()) {
            System.out.println("Using cached remapped artifact "+ existingFile.getPath()); // delete file to reinstall
            return; // success
        }

        // Remap
        File outJar = null;
        try {
            // load input jar(s), as one combined jar (for jarmods)
            List<File> files = new ArrayList<File>();
            for (String filename : inJars) {
                files.add(FileLocator.getFile(filename));
            }
            Jar inJar = Jar.init(files);

            // temporary output file
            outJar = File.createTempFile(groupId + "." + artifactId + "-" + version, "." + packaging);

            // mappings
            JarMapping mapping = new JarMapping();
            if (excludedPackages != null) {
                for (String packageName : excludedPackages) {
                    mapping.addExcludedPackage(packageName);
                }
            }
            mapping.loadMappings(srgIn, reverse, numeric, inShadeRelocation, outShadeRelocation);
            mapping.setFallbackInheritanceProvider(new JarProvider(inJar));


            // access transformers
            RemapperProcessor preprocessor = null;
            if (accessTransformers != null) {
                AccessMap accessMap = new AccessMap();

                for (String filename : accessTransformers) {
                    if (filename != null && filename.length() != 0) {
                        accessMap.loadAccessTransformer(filename);
                    }
                }

                preprocessor = new RemapperProcessor(null, null, accessMap);
            }

            // Do the remap
            JarRemapper remapper = new JarRemapper(preprocessor, mapping);
            remapper.setGenerateAPI(generateAPI);
            remapper.remapJar(inJar, outJar);
        } catch (Exception ex) {
            ex.printStackTrace();
            throw new MojoExecutionException("Error creating remapped jar at "+outJar+": " + ex.getMessage(), ex);
        }

        // Replace main artifact with this remapped artifact
        if (replaceMainArtifact) {
            getLog().info("Replacing original artifact with remapped artifact.");
            File originalArtifact = project.getArtifact().getFile();
            originalArtifact.delete();
            if (!outJar.renameTo(originalArtifact)) {
                throw new MojoExecutionException("Error replacing remapped jar at "+originalArtifact+" with "+outJar);
            }
        }

        // Attach output artifact to this project
        if (attachArtifact) {
            if (attachArtifactClassifier == null || attachArtifactClassifier.equals("")) {
                attachArtifactClassifier = null;
            }

            getLog().info("Attaching artifact " + outJar.getPath());
            projectHelper.attachArtifact(project, attachArtifactType, attachArtifactClassifier, outJar);
        }

        // Install output artifact to local repository
        if (installArtifact) {
            installArtifact(artifact, outJar);
        }
    }