Class BaseScriptUtils

    • Constructor Detail

      • BaseScriptUtils

        public BaseScriptUtils()
    • Method Detail

      • inlineProperty

        public void inlineProperty​(org.commonjava.maven.ext.common.model.Project currentProject,
                                   ProjectRef groupArtifact)
                            throws org.commonjava.maven.ext.common.ManipulationException
        Allows the specified group:artifact property to be inlined. This is useful to split up properties that cover multiple separate projects.
        Parameters:
        currentProject - The current project we are operating on.
        groupArtifact - A ProjectRef corresponding to the group and artifact of the dependency (or managed dependency) that we wish to inline. An artifactId may be a wildcard (i.e. '*').
        Throws:
        org.commonjava.maven.ext.common.ManipulationException - if an error occurs.
      • inlineProperty

        public void inlineProperty​(org.commonjava.maven.ext.common.model.Project currentProject,
                                   String propertyKey)
                            throws org.commonjava.maven.ext.common.ManipulationException
        Allows the specified property to be inlined. This is useful to split up properties that cover multiple separate projects.
        Parameters:
        currentProject - The current project we are operating on.
        propertyKey - The property which is within the dependencies (or managed dependencies) that we wish to inline.
        Throws:
        org.commonjava.maven.ext.common.ManipulationException - if an error occurs.
      • validateSession

        protected void validateSession()
                                throws org.commonjava.maven.ext.common.ManipulationException
        Throws:
        org.commonjava.maven.ext.common.ManipulationException
      • reinitialiseSessionStates

        protected void reinitialiseSessionStates()
                                          throws org.commonjava.maven.ext.common.ManipulationException
        This will re-initialise any state linked to this session. This is useful if the user properties have been updated.
        Throws:
        org.commonjava.maven.ext.common.ManipulationException - if an error occurs.
      • overrideProjectVersion

        public void overrideProjectVersion​(ProjectVersionRef gav)
                                    throws org.commonjava.maven.ext.common.ManipulationException
        This is useful for a series of builds with circular dependencies. It will allow a developer to use an original 'target' build to align the project version to. The engineer should pass in the unaligned GAV (i.e. without the rebuild suffix) of the first SCM root build. Then the subsequent builds, rather than using incremental suffix which can cause issues with circular dependencies, will use versionSuffix and lock to the root build version. This function will query DA to obtain the correct current suffix to use.
        Parameters:
        gav - the target build to obtain the suffix to align to.
        Throws:
        org.commonjava.maven.ext.common.ManipulationException - if an error occurs.
      • getLogger

        public Logger getLogger()