congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Echo
Code IndexAdd Tabnine to your IDE (free)

How to use
Echo
in
org.apache.tools.ant.taskdefs

Best Java code snippets using org.apache.tools.ant.taskdefs.Echo (Showing top 8 results out of 315)

origin: org.apache.geronimo.genesis.plugins/plugin-support

  public void echo(final String msg) {
    assert msg != null;
    
    Echo echo = (Echo)createTask("echo");
    echo.setMessage(msg);
    echo.execute();
  }
}
origin: org.apache.ivy/ivy

private void appendDeliveryList(String msg) {
  Echo echo = (Echo) getProject().createTask("echo");
  echo.setOwningTarget(getOwningTarget());
  echo.init();
  echo.setFile(deliveryList);
  echo.setMessage(msg + "\n");
  echo.setAppend(true);
  echo.perform();
}
origin: org.rundeck/rundeck-core

private Echo createEcho(final String message, final Project project, final String logLevel) {
  final Echo echo = new Echo();
  echo.setProject(project);
  final Echo.EchoLevel level = new Echo.EchoLevel();
  level.setValue(logLevel);
  echo.setLevel(level);
  echo.setMessage(message);
  return echo;
}
origin: appfuse/appfuse

private void installInternationalizationKeys(String webFramework) {
  createLoadFileTask("src/main/resources/" + pojoName + "-ApplicationResources.properties", "i18n.file").execute();
  File existingFile = new File(destinationDirectory + "/src/main/resources/ApplicationResources.properties");
  // if ApplicationResources doesn't exist, assume appfuse-light and use messages instead
  if (!existingFile.exists()) {
    if ("wicket".equalsIgnoreCase(webFramework)) {
      existingFile = new File(destinationDirectory + "/src/main/java/" + project.getGroupId().replace(".", "/")
          + "/webapp/pages/AbstractWebPage.properties");
    } else {
      existingFile = new File(destinationDirectory + "/src/main/resources/messages.properties");
    }
  }
  parsePropertiesFile(existingFile, pojoName);
  Echo echoTask = (Echo) antProject.createTask("echo");
  echoTask.setFile(existingFile);
  echoTask.setAppend(true);
  echoTask.setMessage(antProject.getProperty("i18n.file"));
  echoTask.execute();
}
origin: i18nlog/i18nlog

/**
* @see org.apache.tools.ant.Task#execute()
*/
public void execute()
throws BuildException
{
 validateTaskConfiguration();
 // because <echo> task lets you have the message in the XML text node, we need to trim all newlines and whitespace
 message = message.replaceAll( "\r\n", "" ).replaceAll( "\n", "" ).trim();
 // let's get the arguments
 // let's convert the message (which is only a bundle key right now) to the actual localized message
 message = Msg.createMsg( m_bundle, m_locale, message, m_arguments.toArray() ).toString();
 // if property is set, put the message text in that property, otherwise, we echo the message
 if ( m_property != null )
 {
   Project proj = getOwningTarget().getProject();
   proj.setNewProperty( m_property, message );
 }
 else
 {
   super.execute();
 }
 return;
}
origin: com.github.odavid.maven.plugins/ant-maven-logger

  @Override
  public void messageLogged(BuildEvent event) {
    //By Default echo is WARN level, but we want to have it as INFO
    if(event.getTask() instanceof Echo){
      Echo echo = (Echo)event.getTask();
      if(event.getPriority() == MSG_WARN){
        echo.setLevel(ECHO_LEVEL_INFO);
        BuildEvent newevent = new BuildEvent(echo);
        newevent.setMessage(event.getMessage(), MSG_INFO);
        event = newevent;
      }
    }
    super.messageLogged(event);
  }
}
origin: net.open-esb.core/jbi-ant-tasks

/**
 * Does the work.
 *
 * @exception BuildException if something goes wrong with the build
 */
public void execute() throws BuildException
{
  String i18nKey = this.getKey();
  String bundleBase = this.getBundle();
  String msg = null;
  if ( i18nKey != null )
  {
    msg = loadMessageFromBundle(bundleBase, i18nKey, getArguments());
  }
  
  if ( msg != null )
  {
    this.setMessage(msg);
  }
  // do actual echo
  super.execute();
}

origin: org.codehaus.mojo/plugin-support

  public void echo(final String msg) {
    assert msg != null;
    
    Echo echo = (Echo)createTask("echo");
    echo.setMessage(msg);
    echo.execute();
  }
}
org.apache.tools.ant.taskdefsEcho

Javadoc

Writes a message to the Ant logging facilities.

Most used methods

  • execute
    Does the work.
  • setMessage
    Message to write.
  • setAppend
    If true, append to existing file.
  • setFile
    File to write to.
  • setLevel
    Set the logging level. Level should be one of * error * warning * info * verbose * debug The de
  • <init>
  • getLocation
  • getProject
  • init
  • perform
  • setOutput
    Resource to write to.
  • setOwningTarget
  • setOutput,
  • setOwningTarget,
  • setProject

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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