Tabnine Logo
StopExecutionException
Code IndexAdd Tabnine to your IDE (free)

How to use
StopExecutionException
in
org.gradle.api.tasks

Best Java code snippets using org.gradle.api.tasks.StopExecutionException (Showing top 16 results out of 315)

origin: gradle.plugin.earth.cube.gradle.plugins/cube-gradleplugins-commons

@TaskAction
public void launch() throws Exception {
  addClasspath(new File(_installationDir, "startup.jar").getAbsolutePath());
  
  List<String> args = new ArrayList<>();
  args.add("-clean");
  args.add("-application");
  args.add(_sApplication);
  if(_workspaceDir != null) {
    args.add("-data");
    args.add(_workspaceDir.getAbsolutePath());
  }
  args.addAll(_args);
  
  try(URLClassLoader cl = new URLClassLoader(_classpath.toArray(new URL[_classpath.size()]))) {
    Class<?> c = cl.loadClass("org.eclipse.equinox.launcher.Main");
    Method m = c.getDeclaredMethod("run", String[].class);
    Object o = c.newInstance();
    int nRC = (int) m.invoke(o, new Object[] { args.toArray(new String[args.size()]) });
    if(nRC != 0)
      throw new StopExecutionException("Eclipse returned exit code " + nRC + "!");
  }
}
 
origin: gradle.plugin.com.github.nomensvyat/SwitchBoxPlugin

private FieldMap loadInternal(File file) {
  checkFile(file);
  try {
    byte[] readAllBytes = Files.readAllBytes(Paths.get(file.getAbsolutePath()));
    String jsonString = new String(readAllBytes);
    cachedFieldMap = gson.fromJson(jsonMinify.minify(jsonString), FieldMap.class);
  } catch (FileNotFoundException e) {
    throw new IllegalStateException("File not found", e);
  } catch (IOException e) {
    throw new IllegalStateException("Can't read file", e);
  } catch (JsonParseException e) {
    StopExecutionException stopExecutionException = new StopExecutionException(
        "Can't parse fields from file: " + file.getAbsolutePath());
    stopExecutionException.initCause(e);
    throw stopExecutionException;
  }
  cacheTimestamp = file.lastModified();
  return cachedFieldMap;
}
origin: org.gradle/gradle-core

private GradleException executeActions(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) {
  LOGGER.debug("Executing actions for {}.", task);
  final List<ContextAwareTaskAction> actions = new ArrayList<ContextAwareTaskAction>(task.getTaskActions());
  for (ContextAwareTaskAction action : actions) {
    state.setDidWork(true);
    task.getStandardOutputCapture().start();
    try {
      executeAction(action.getDisplayName(), task, action, context);
    } catch (StopActionException e) {
      // Ignore
      LOGGER.debug("Action stopped by some action with message: {}", e.getMessage());
    } catch (StopExecutionException e) {
      LOGGER.info("Execution stopped by some action with message: {}", e.getMessage());
      break;
    } catch (Throwable t) {
      return new TaskExecutionException(task, t);
    } finally {
      task.getStandardOutputCapture().stop();
    }
  }
  return null;
}
origin: org.gradle/gradle-core

public FileCollection stopExecutionIfEmpty() {
  if (isEmpty()) {
    throw new StopExecutionException(String.format("%s does not contain any files.", getCapDisplayName()));
  }
  return this;
}
origin: org.shipkit/shipkit

  public void execute(ExecResult exec) {
    if (exec.getExitValue() != 0) {
      LOG.info("External process returned exit code: {}. Stopping the execution of the task.");
      //Cleanly stop executing the task, without making the task failed.
      throw new StopExecutionException();
    }
  }
};
origin: mockito/shipkit

  public void execute(ExecResult exec) {
    if (exec.getExitValue() != 0) {
      LOG.info("External process returned exit code: {}. Stopping the execution of the task.");
      //Cleanly stop executing the task, without making the task failed.
      throw new StopExecutionException();
    }
  }
};
origin: gradle.plugin.com.intershop.gradle.plugin.azure/azurePlugin

  private String createLink(CloudBlobContainer blobContainer, String projectDir, String versionDir, String fileName)
          throws URISyntaxException, StorageException
  {
    String blobRef = new StringBuffer()
            .append(projectDir)
            .append("/")
            .append(versionDir)
            .append("/")
            .append(fileName)
            .toString();

    if (!blobContainer.getBlockBlobReference(blobRef).exists())
    {
      throw new StopExecutionException("blob file does not exists: " + blobRef);
    }

    String link = new StringBuffer()
            .append(blobContainer.getUri().toASCIIString())
            .append("/")
            .append(blobRef)
            .append("?")
            .append(generateSASToken(blobContainer, TOKEN_TIME_SPAN))
            .toString();
    return link;
  }
}
origin: gradle.plugin.com.intershop.gradle.plugin.azure/azurePlugin

@TaskAction
public void generateWorkspaceId()
{
  if (idFile.getAsFile().get().exists()) {
    throw new StopExecutionException("A workspaceID file already exists. Use 'clean' for deleting it.");
  }
  String wsid = new StringBuilder()
          .append(this.workspaceIdPrefix.toLowerCase().replaceAll("[^a-z0-9]", ""))
          .append('-')
          .append(this.projectName.get().toLowerCase().replaceAll("[^a-z0-9]", ""))
          .append('-')
          .append(SdkContext.randomResourceName("", 6))
          .toString()
          .replaceAll("^-+", "");
  try
  {
    BufferedWriter writer = new BufferedWriter(new FileWriter(idFile.getAsFile().get()));
    writer.write(wsid);
    writer.close();
  }
  catch(IOException e)
  {
    throw new TaskExecutionException(this, e);
  }
}
origin: mockito/shipkit

  @Override
  public void execute(ShipkitExecTask task) {
    task.setDescription("Checks if release is needed. If so it will prepare for ci release and perform release.");
    task.getExecCommands().add(execCommand(
      "Checking if release is needed", asList(GradleWrapper.getWrapperCommand(), ReleaseNeededPlugin.RELEASE_NEEDED), execResult -> {
        if (!new File(project.getBuildDir(), ReleaseNeeded.RELEASE_NEEDED_FILENAME).exists()) {
          throw new StopExecutionException();
        }
      }));
    task.getExecCommands().add(execCommand(
        "Preparing working copy for the release", asList(GradleWrapper.getWrapperCommand(), GitSetupPlugin.CI_RELEASE_PREPARE_TASK)));
    task.getExecCommands().add(execCommand(
        "Performing the release", asList(GradleWrapper.getWrapperCommand(), ReleasePlugin.PERFORM_RELEASE_TASK)));
    TaskSuccessfulMessage.logOnSuccess(task, "  Release " + project.getVersion() + " was shipped! Thank you for using Shipkit!");
  }
});
origin: org.shipkit/shipkit

  @Override
  public void execute(ShipkitExecTask task) {
    task.setDescription("Checks if release is needed. If so it will prepare for ci release and perform release.");
    task.getExecCommands().add(execCommand(
      "Checking if release is needed", asList(GradleWrapper.getWrapperCommand(), ReleaseNeededPlugin.RELEASE_NEEDED), execResult -> {
        if (!new File(project.getBuildDir(), ReleaseNeeded.RELEASE_NEEDED_FILENAME).exists()) {
          throw new StopExecutionException();
        }
      }));
    task.getExecCommands().add(execCommand(
        "Preparing working copy for the release", asList(GradleWrapper.getWrapperCommand(), GitSetupPlugin.CI_RELEASE_PREPARE_TASK)));
    task.getExecCommands().add(execCommand(
        "Performing the release", asList(GradleWrapper.getWrapperCommand(), ReleasePlugin.PERFORM_RELEASE_TASK)));
    TaskSuccessfulMessage.logOnSuccess(task, "  Release " + project.getVersion() + " was shipped! Thank you for using Shipkit!");
  }
});
origin: gradle.plugin.com.liferay/gradle-plugins-change-log-builder

Project project = getProject();
throw new StopExecutionException(
  project + " does not have changes for range " + range);
origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin

t.onlyIf(a -> {
  if (a.getInputs().getSourceFiles().isEmpty()) {
    throw new StopExecutionException("no platform file found");
t.onlyIf(a -> {
  if (a.getInputs().getSourceFiles().isEmpty()) {
    throw new StopExecutionException("no allExtensions file found");
origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin

t.onlyIf(a -> {
  if (a.getInputs().getSourceFiles().isEmpty()) {
    throw new StopExecutionException("no datahub file found");
origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin

String sha256SumOrNull = sha256Sum.getOrNull();
if (md5HashOrNull == null && sha256SumOrNull == null) {
  throw new StopExecutionException("Please define either md5Hash or sha256Sum");
    throw new StopExecutionException(String.format("Download of %s not successful. Hashes don't match. Found: %s Expected: %s", targetPath.getFileName(), fileHash, expectedHash));
origin: btkelly/gnag

} else {
 getLogger().lifecycle(failedMessage);
 throw new StopExecutionException(failedMessage);
origin: gradle.plugin.mpern.sap.commerce/commerce-gradle-plugin

String sha256SumOrNull = sha256Sum.getOrNull();
if (md5HashOrNull == null && sha256SumOrNull == null) {
  throw new StopExecutionException("Please define either md5Hash or sha256Sum");
org.gradle.api.tasksStopExecutionException

Most used methods

  • <init>
  • getMessage
  • initCause

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • findViewById (Activity)
  • getContentResolver (Context)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now