Examples of CommandExecutionException


Examples of org.apache.maven.wagon.CommandExecutionException

            Streams streams = CommandExecutorStreamProcessor.processStreams( stderrReader, stdoutReader );

            if ( streams.getErr().length() > 0 && !ignoreFailures )
            {
                int exitCode = channel.getExitStatus();
                throw new CommandExecutionException( "Exit code: " + exitCode + " - " + streams.getErr() );
            }

            return streams;
        }
        catch ( IOException e )
        {
            throw new CommandExecutionException( "Cannot execute remote command: " + command, e );
        }
        catch ( JSchException e )
        {
            throw new CommandExecutionException( "Cannot execute remote command: " + command, e );
        }
        finally
        {
            IOUtil.close( stdoutReader );
            IOUtil.close( stderrReader );
View Full Code Here

Examples of org.axonframework.commandhandling.CommandExecutionException

            if (failure instanceof Error) {
                throw (Error) failure;
            } else if (failure instanceof RuntimeException) {
                throw (RuntimeException) failure;
            } else {
                throw new CommandExecutionException("An exception occurred while executing a command", failure);
            }
        } else {
            return result;
        }
    }
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

               }
               else
               {
                  name = "at index [" + option.getIndex() + "]";
               }
               throw new CommandExecutionException(command, "command option '"
                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               boolean vetoed = false;
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  PreCommandExecution event = new PreCommandExecution(command, originalStatement, parameterArray);
                  manager.fireEvent(event, new Annotation[0]);
                  vetoed = event.isVetoed();
                  if (!vetoed)
                  {
                     command.getMethod().invoke(plugin, paramStaging);
                     status = Status.SUCCESS;
                  }
               }
               catch (Exception e)
               {
                  throw new CommandExecutionException(command, e);
               }
               finally
               {
                  Thread.currentThread().setContextClassLoader(current);
                  if (!vetoed)
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

            if (!command.isSetup())
               enforcer.verifyAvailable(shell.getCurrentProject(), command.getParent());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

         {
            enforcer.verifyAvailable(shell.getCurrentProject(), command.getPluginMetadata());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

               }
               else
               {
                  name = "at index [" + option.getIndex() + "]";
               }
               throw new CommandExecutionException(command, "command option '"
                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               boolean success = false;
               try
               {
                  command.getMethod().invoke(plugin, paramStaging);
                  success = true;
               }
               catch (Exception e)
               {
                  throw new CommandExecutionException(command, e);
               }
               finally
               {
                  if (success)
                     manager.fireEvent(new CommandExecuted(Status.SUCCESS), new Annotation[] {});
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

            if (!command.isSetup())
               enforcer.verifyAvailable(shell.getCurrentProject(), command.getParent());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

               }
               else
               {
                  name = "at index [" + option.getIndex() + "]";
               }
               throw new CommandExecutionException(command, "command option '"
                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  command.getMethod().invoke(plugin, paramStaging);
               }
               catch (Exception e)
               {
                  throw new CommandExecutionException(command, e);
               }
               finally
               {
                  Thread.currentThread().setContextClassLoader(current);
                  manager.fireEvent(new CommandExecuted(status, command, parameterArray), new Annotation[] {});
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

            if (!command.isSetup())
               enforcer.verifyAvailable(shell.getCurrentProject(), command.getParent());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.forge.shell.exceptions.CommandExecutionException

               }
               else
               {
                  name = "at index [" + option.getIndex() + "]";
               }
               throw new CommandExecutionException(command, "command option '"
                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               boolean success = false;
               try
               {
                  command.getMethod().invoke(plugin, paramStaging);
                  success = true;
               }
               catch (Exception e)
               {
                  throw new CommandExecutionException(command, e);
               }
               finally
               {
                  if (success)
                     manager.fireEvent(new CommandExecuted(Status.SUCCESS, command), new Annotation[] {});
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.