code: public void execute() throws MojoExecutionException, MojoFailureException
     {
        if (file == null)
           throw new MojoFailureException("File not defined");
  
        if (!file.exists())
           throw new MojoFailureException("File doesn't exists: " + file);
  
        try
        {
           Boolean result = null;
           if (isLocal())
           {
              Object value = executeCommand("local-undeploy", new Serializable[] {file.toURI().toURL()});
  
              if (value instanceof Boolean)
              {
                 result = (Boolean)value;
              }
              else
              {
                 throw (Throwable)value;
              }
           }
           else
           {
              Object value = executeCommand("remote-undeploy", new Serializable[] {file.getName()});
  
              if (value instanceof Boolean)
              {
                 result = (Boolean)value;
              }
              else
              {
                 throw (Throwable)value;
              }
           }
  
           if (result.booleanValue())
           {
              getLog().info("Undeployed: " + file.getName());
           }
           else
           {
              getLog().info(file.getName() + " wasn't undeployed");
           }
        }
        catch (Throwable t)
        {
           throw new MojoFailureException("Unable to undeploy to " + getHost() + ":" + getPort() +
                                          " (" + t.getMessage() + ")", t);
        }
     }
docs: {@inheritDoc}