Package aQute.bnd.ant
Class BaseTask
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.Task
-
- aQute.bnd.ant.BaseTask
-
- Direct Known Subclasses:
BndTask
,DeployTask
,EclipseTask
,ExpandPropertiesTask
,PackageTask
,PrepareTask
,ProjectBuildOrderTask
,ProjectTask
,ReleaseTask
,RunBundlesTask
,RunconfigToDistributionTask
,TestTask
,WrapTask
public class BaseTask extends org.apache.tools.ant.Task implements Reporter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
Report.Location
-
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
Reporter.SetLocation
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<java.lang.String>
errors
(package private) boolean
exceptions
private static org.slf4j.Logger
logger
(package private) AntMessages
messages
(package private) java.lang.String
onfail
(package private) boolean
pedantic
(package private) java.util.List<java.lang.String>
progress
(package private) java.util.List<org.apache.tools.ant.taskdefs.Property>
properties
(package private) ReporterAdapter
reporter
(package private) boolean
trace
(package private) java.util.List<java.lang.String>
warnings
(package private) java.util.List<org.apache.tools.ant.taskdefs.Property>
workspaceProps
-
Constructor Summary
Constructors Constructor Description BaseTask()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addProperty(org.apache.tools.ant.taskdefs.Property property)
void
addWsproperty(org.apache.tools.ant.taskdefs.Property property)
Reporter.SetLocation
error(java.lang.String s, java.lang.Object... args)
Create an error.Reporter.SetLocation
exception(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)
Dedicated message for an exception.java.util.List<java.lang.String>
getErrors()
Return the errors.static java.io.File
getFile(java.io.File base, java.lang.String file)
Report.Location
getLocation(java.lang.String msg)
Return the errors for the given error or warning.java.util.List<java.lang.String>
getWarnings()
Return the warnings.boolean
isExceptions()
boolean
isOk()
Check if this report has any relevant errors that should make the run associated with this report invalid.boolean
isPedantic()
The provider of the reporter wants pedantic reporting, meaning every possible warning should be reported.boolean
isTrace()
protected java.lang.String
join(java.util.Collection<?> classpath, java.lang.String string)
void
progress(float progress, java.lang.String s, java.lang.Object... args)
Deprecated.Use SLF4J Logger.info() instead.protected boolean
report()
protected boolean
report(Reporter reporter)
void
setExceptions(boolean exceptions)
void
setPedantic(boolean pedantic)
void
setTrace(boolean trace)
protected java.util.List<java.lang.String>
split(java.lang.String dependsOn, java.lang.String string)
void
trace(java.lang.String s, java.lang.Object... args)
Deprecated.Use SLF4J Logger.debug instead.Reporter.SetLocation
warning(java.lang.String s, java.lang.Object... args)
Create a warning.-
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
-
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
reporter
ReporterAdapter reporter
-
errors
java.util.List<java.lang.String> errors
-
warnings
java.util.List<java.lang.String> warnings
-
progress
java.util.List<java.lang.String> progress
-
pedantic
boolean pedantic
-
trace
boolean trace
-
onfail
java.lang.String onfail
-
properties
final java.util.List<org.apache.tools.ant.taskdefs.Property> properties
-
workspaceProps
final java.util.List<org.apache.tools.ant.taskdefs.Property> workspaceProps
-
messages
final AntMessages messages
-
exceptions
boolean exceptions
-
-
Method Detail
-
report
protected boolean report()
-
report
protected boolean report(Reporter reporter)
-
getFile
public static java.io.File getFile(java.io.File base, java.lang.String file)
-
split
protected java.util.List<java.lang.String> split(java.lang.String dependsOn, java.lang.String string)
-
join
protected java.lang.String join(java.util.Collection<?> classpath, java.lang.String string)
-
isPedantic
public boolean isPedantic()
Description copied from interface:Reporter
The provider of the reporter wants pedantic reporting, meaning every possible warning should be reported.- Specified by:
isPedantic
in interfaceReporter
- Returns:
- if this is a pedantic reporter.
-
setPedantic
public void setPedantic(boolean pedantic)
-
setTrace
public void setTrace(boolean trace)
-
isTrace
public boolean isTrace()
-
trace
@Deprecated public void trace(java.lang.String s, java.lang.Object... args)
Deprecated.Use SLF4J Logger.debug instead.Description copied from interface:Reporter
Create a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
-
addProperty
public void addProperty(org.apache.tools.ant.taskdefs.Property property)
-
addWsproperty
public void addWsproperty(org.apache.tools.ant.taskdefs.Property property)
-
isExceptions
public boolean isExceptions()
-
setExceptions
public void setExceptions(boolean exceptions)
-
getLocation
public Report.Location getLocation(java.lang.String msg)
Description copied from interface:Report
Return the errors for the given error or warning. Can return null.- Specified by:
getLocation
in interfaceReport
- Parameters:
msg
- The message- Returns:
- null or the location of the message
-
isOk
public boolean isOk()
Description copied from interface:Report
Check if this report has any relevant errors that should make the run associated with this report invalid. I.e. if this returns false then the run should be disregarded.
-
exception
public Reporter.SetLocation exception(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)
Description copied from interface:Reporter
Dedicated message for an exception.
-
error
public Reporter.SetLocation error(java.lang.String s, java.lang.Object... args)
Description copied from interface:Reporter
Create an error. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
-
getErrors
public java.util.List<java.lang.String> getErrors()
Description copied from interface:Report
Return the errors. This list must not be changed and may be immutable.
-
getWarnings
public java.util.List<java.lang.String> getWarnings()
Description copied from interface:Report
Return the warnings. This list must not be changed and may be immutable.- Specified by:
getWarnings
in interfaceReport
- Returns:
- the warnings
-
progress
@Deprecated public void progress(float progress, java.lang.String s, java.lang.Object... args)
Deprecated.Use SLF4J Logger.info() instead.Description copied from interface:Reporter
Create a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
-
warning
public Reporter.SetLocation warning(java.lang.String s, java.lang.Object... args)
Description copied from interface:Reporter
Create a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
-
-