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) booleanexceptionsprivate static org.slf4j.Loggerlogger(package private) AntMessagesmessages(package private) java.lang.Stringonfail(package private) booleanpedantic(package private) java.util.List<java.lang.String>progress(package private) java.util.List<org.apache.tools.ant.taskdefs.Property>properties(package private) ReporterAdapterreporter(package private) booleantrace(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 voidaddProperty(org.apache.tools.ant.taskdefs.Property property)voidaddWsproperty(org.apache.tools.ant.taskdefs.Property property)Reporter.SetLocationerror(java.lang.String s, java.lang.Object... args)Create an error.Reporter.SetLocationexception(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)Dedicated message for an exception.protected ProjectgetBndProject(java.io.File basedir)java.util.List<java.lang.String>getErrors()Return the errors.static java.io.FilegetFile(java.io.File base, java.lang.String file)Report.LocationgetLocation(java.lang.String msg)Return the errors for the given error or warning.java.util.List<java.lang.String>getWarnings()Return the warnings.booleanisExceptions()booleanisOk()Check if this report has any relevant errors that should make the run associated with this report invalid.booleanisPedantic()The provider of the reporter wants pedantic reporting, meaning every possible warning should be reported.booleanisTrace()protected java.lang.Stringjoin(java.util.Collection<?> classpath, java.lang.String string)voidprogress(float progress, java.lang.String s, java.lang.Object... args)Deprecated.Use SLF4J Logger.info() instead.protected booleanreport()protected booleanreport(Reporter reporter)voidsetExceptions(boolean exceptions)voidsetPedantic(boolean pedantic)voidsetTrace(boolean trace)protected java.util.List<java.lang.String>split(java.lang.String dependsOn, java.lang.String string)voidtrace(java.lang.String s, java.lang.Object... args)Deprecated.Use SLF4J Logger.debug instead.Reporter.SetLocationwarning(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:ReporterThe provider of the reporter wants pedantic reporting, meaning every possible warning should be reported.- Specified by:
isPedanticin 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:ReporterCreate 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:ReportReturn the errors for the given error or warning. Can return null.- Specified by:
getLocationin interfaceReport- Parameters:
msg- The message- Returns:
- null or the location of the message
-
isOk
public boolean isOk()
Description copied from interface:ReportCheck 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:ReporterDedicated message for an exception.
-
error
public Reporter.SetLocation error(java.lang.String s, java.lang.Object... args)
Description copied from interface:ReporterCreate 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:ReportReturn 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:ReportReturn the warnings. This list must not be changed and may be immutable.- Specified by:
getWarningsin 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:ReporterCreate 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:ReporterCreate a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
-
getBndProject
protected Project getBndProject(java.io.File basedir)
-
-