Class ProjectBuilder

  • All Implemented Interfaces:
    Constants, Registry, aQute.service.reporter.Report, aQute.service.reporter.Reporter, java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<java.lang.String>

    public class ProjectBuilder
    extends Builder
    • Constructor Detail

      • ProjectBuilder

        public ProjectBuilder​(Project project)
    • Method Detail

      • getMacroDomains

        protected java.lang.Object[] getMacroDomains()
        We put our project and our workspace on the macro path.
        Overrides:
        getMacroDomains in class Processor
      • getSubBuilder

        public Builder getSubBuilder()
                              throws java.lang.Exception
        Overrides:
        getSubBuilder in class Builder
        Throws:
        java.lang.Exception
      • getProject

        public Project getProject()
      • init

        public void init()
        Description copied from class: Builder
        Allow any local initialization by subclasses before we build.
        Overrides:
        init in class Builder
      • addClasspath

        public void addClasspath​(Container c)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • changedFile

        protected void changedFile​(java.io.File f)
        Overrides:
        changedFile in class Builder
      • doBaseline

        public void doBaseline​(Jar dot)
                        throws java.lang.Exception
        Compare this builder's JAR with a baseline
        Overrides:
        doBaseline in class Builder
        Throws:
        java.lang.Exception
      • fillInLocationForPackageInfo

        public void fillInLocationForPackageInfo​(aQute.service.reporter.Report.Location location,
                                                 java.lang.String packageName)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getLastRevision

        public Jar getLastRevision()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getBaselineJar

        public Jar getBaselineJar()
                           throws java.lang.Exception
        This method attempts to find the baseline jar for the current project. It reads the -baseline property and treats it as instructions. These instructions are matched against the bsns of the jars (think sub builders!). If they match, the sub builder is selected.

        The instruction can then specify the following options:

          version :
         baseline version from repository file : a file path
         
        If neither is specified, the current version is used to find the highest version (without qualifier) that is below the current version. If a version is specified, we take the highest version with the same base version.

        Since baselining is expensive and easily generates errors you must enable it. The easiest solution is to -baseline: *. This will match all sub builders and will calculate the version.

        Returns:
        a Jar or null
        Throws:
        java.lang.Exception
      • report

        public void report​(java.util.Map<java.lang.String,​java.lang.Object> table)
                    throws java.lang.Exception
        Create a report of the settings
        Overrides:
        report in class Builder
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString()
        Description copied from class: Processor
        Printout of the status of this processor for toString()
        Overrides:
        toString in class Processor
      • getExportedRuns

        public java.util.List<Run> getExportedRuns()
                                            throws java.lang.Exception
        Return the bndrun files that need to be exported
        Throws:
        java.lang.Exception
      • builds

        public Jar[] builds()
                     throws java.lang.Exception
        Add some extra stuff to the builds() method like exporting.
        Overrides:
        builds in class Builder
        Throws:
        java.lang.Exception
      • startBuild

        protected void startBuild​(Builder builder)
                           throws java.lang.Exception
        Called when we start to build a builder. We reset our map of bsn -> version and set the default contents of the bundle.
        Overrides:
        startBuild in class Builder
        Throws:
        java.lang.Exception
      • doneBuild

        protected void doneBuild​(Builder builder)
                          throws java.lang.Exception
        Called when we're done with a builder. In this case we retrieve package information from builder.
        Overrides:
        doneBuild in class Builder
        Throws:
        java.lang.Exception
      • getSourceFileFor

        public java.lang.String getSourceFileFor​(Descriptors.TypeRef type)
                                          throws java.lang.Exception
        Find the source file for this type
        Overrides:
        getSourceFileFor in class Analyzer
        Parameters:
        type -
        Throws:
        java.lang.Exception
      • isInteractive

        public boolean isInteractive()
        Description copied from class: Processor
        Return if this is an interactive environment like Eclipse or runs in batch mode. If interactive, things can get refreshed.
        Overrides:
        isInteractive in class Processor
      • getBuildInfo

        public aQute.bnd.build.ProjectBuilder.BuildInfoImpl getBuildInfo()