org.sonar.ant
Class SonarTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.sonar.ant.SonarTask
All Implemented Interfaces:
Cloneable

public class SonarTask
extends org.apache.tools.ant.Task


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
SonarTask()
           
 
Method Summary
 void addConfiguredProperty(org.apache.tools.ant.types.Environment.Variable property)
          Note that name of this method is important - see http://ant.apache.org/manual/develop.html#nested-elements
 org.apache.tools.ant.types.Path createBinaries()
           
 org.apache.tools.ant.types.Path createLibraries()
           
 org.apache.tools.ant.types.Path createSources()
           
 org.apache.tools.ant.types.Path createTests()
           
 void execute()
          Note about how Ant handles exceptions: according to DefaultLogger.buildFinished(BuildEvent) if we want to print stack trace, then we shouldn't use BuildException with message.
 File getBaseDir()
           
 String getInitTarget()
           
 String getKey()
           
 Properties getProperties()
           
 String getServerUrl()
           
static String getTaskVersion()
           
 String getVersion()
           
 File getWorkDir()
           
 void setBaseDir(File baseDir)
           
 void setInitTarget(String initTarget)
           
 void setKey(String key)
           
 void setVersion(String version)
           
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SonarTask

public SonarTask()
Method Detail

getServerUrl

public String getServerUrl()
Returns:
value of property "sonar.host.url", default is "http://localhost:9000"

getWorkDir

public File getWorkDir()
Returns:
work directory, default is ".sonar" in project directory

setBaseDir

public void setBaseDir(File baseDir)
Since:
1.1

getBaseDir

public File getBaseDir()
Returns:
base directory, default is the current project base directory
Since:
1.1

setInitTarget

public void setInitTarget(String initTarget)
Since:
1.1

getInitTarget

public String getInitTarget()
Since:
1.1

setKey

public void setKey(String key)

getKey

public String getKey()

setVersion

public void setVersion(String version)

getVersion

public String getVersion()

addConfiguredProperty

public void addConfiguredProperty(org.apache.tools.ant.types.Environment.Variable property)
Note that name of this method is important - see http://ant.apache.org/manual/develop.html#nested-elements


getProperties

public Properties getProperties()

createSources

public org.apache.tools.ant.types.Path createSources()

createTests

public org.apache.tools.ant.types.Path createTests()

createBinaries

public org.apache.tools.ant.types.Path createBinaries()

createLibraries

public org.apache.tools.ant.types.Path createLibraries()

execute

public void execute()
Note about how Ant handles exceptions: according to DefaultLogger.buildFinished(BuildEvent) if we want to print stack trace, then we shouldn't use BuildException with message.

Overrides:
execute in class org.apache.tools.ant.Task

getTaskVersion

public static String getTaskVersion()


Copyright © 2011 SonarSource. All Rights Reserved.