org.sonar.ant
Class SonarTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.sonar.ant.SonarTask
- All Implemented Interfaces:
- Cloneable
public class SonarTask
- extends org.apache.tools.ant.Task
| 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 |
| 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 |
SonarTask
public SonarTask()
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.