Package aQute.bnd.ant

Class BaseTask

    • 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  
      • 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

      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(aQute.libg.slf4j.GradleLogging.LIFECYCLE) 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
      • 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
    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
      • 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
      • exceptions

        boolean exceptions
    • Constructor Detail

      • BaseTask

        public BaseTask()
    • 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 interface Reporter
        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.
        Specified by:
        trace in interface Reporter
        Parameters:
        s - The format of the error
        args - The arguments of the error
      • 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 interface Report
        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.
        Specified by:
        isOk in interface Report
        Returns:
        true if this run should be disregarded due to errors
      • 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.
        Specified by:
        exception in interface Reporter
        Parameters:
        t - The exception
        format - The format of the message
        args - The arguments
      • 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.
        Specified by:
        error in interface Reporter
        Parameters:
        s - The format of the error
        args - The arguments of the error
        Returns:
        a SetLocation to set the location
      • 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.
        Specified by:
        getErrors in interface Report
        Returns:
        the errors
      • 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 interface Report
        Returns:
        the warnings
      • progress

        @Deprecated
        public void progress​(float progress,
                             java.lang.String s,
                             java.lang.Object... args)
        Deprecated.
        Use SLF4J Logger.info(aQute.libg.slf4j.GradleLogging.LIFECYCLE) 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.
        Specified by:
        progress in interface Reporter
        Parameters:
        progress - A value between 0 and 1 indicating the progress. 0 is starting and >=1 is done.
        s - The format of the error
        args - The arguments of the error
      • 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.
        Specified by:
        warning in interface Reporter
        Parameters:
        s - The format of the error
        args - The arguments of the error
        Returns:
        a SetLocation to set the location