Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8452385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:29:10+00:00 2026-06-10T11:29:10+00:00

I have a task sshexec in an ant buildfile. This task shows the output

  • 0

I have a task sshexec in an ant buildfile. This task shows the output of the command i wish to execute. My question is: how to not show the output?

here is my task:

<sshexec verbose="false" failonerror="true"
  trust="yes" host="${app.deploy.server}"
  username="${deploy.user}"
  command="find /home/software/public_html/${app.name} -name *.jar* -exec md5sum {} +"
  password="${deploy.password}"
  output="jarsAtServer.txt" outputproperty="trash" />

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:29:12+00:00Added an answer on June 10, 2026 at 11:29 am

    You can silence the output from sshexec task (or any other task) by using a custom logger:

    import org.apache.tools.ant.*;
    public class MuteTaskLogger extends DefaultLogger
    {
        public void messageLogged(BuildEvent event)
        {
            Task task = event.getTask();
            if (task != null &&
                task.getTaskName().equals(event.getProject().getProperty("mute.task")))
            {
                return;
            }
            super.messageLogged(event);
        }
    }
    

    Compile with:

    javac -cp ant.jar MuteTaskLogger.java
    

    The task to mute is specified with the property “mute.task”:

    ant -logger MuteTaskLogger -Dmute.task=sshexec -lib <folder-of-MuteTaskLogger-class>
    

    You can tidy it up by putting MuteTaskLogger into one of the Ant library directories. The logger and mute.task properties can be added to the ANT_ARGS environment variable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ant target where I successfully use a sshexec-task to install a
I have MSbuild task like this to sign all the output modules of our
I have a task here that requires heavy DOM manipulation. Because this can have
I am new this sharepoint development and i have task in hand to do
I have task to get static method using reflection like this : myType.GetMethod(MyMethod,BindingFlags.Static |
I'm trying to use the sshexec task for ANT on my OSX box, when
Here's a generalized scenario. I have Tasks and I have Task Events. I've created
I have a task like this... def self.perform(parsed_json) do_hard_work use_faye_to_push_status rescue => exception use_faye_to_push_error
I'm using the SSHEXEC ant task to run an SSH script against a remote
I have this Task model: class Task < ActiveRecord::Base acts_as_tree :order => 'sort_order' end

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.