Class BaseTrigger

    • Constructor Detail

      • BaseTrigger

        public BaseTrigger()
    • Method Detail

      • getTriggers

        public List<String> getTriggers()
        Gets the packages/versions to trigger on.

        This is syntactically equivalent to a "Requires" specification (version numbers may be used). If multiple items are given, the trigger is run when *any* of those conditions becomes true.

        Returns:
        Returns the triggers.
      • setTriggers

        public void setTriggers​(List<String> triggers)
        Sets the packages/versions to trigger on.
        Parameters:
        triggers - The triggers to set.
        See Also:
        getTriggers()
      • buildScriptletLine

        protected String buildScriptletLine​(String directive)
        Builds the scriptlet line including any optional args.
        Overrides:
        buildScriptletLine in class Scriptlet
        Parameters:
        directive - The directive for the scriptlet.
        Returns:
        The scriptlet line - this does not include the script.
      • writeTrigger

        protected void writeTrigger​(PrintWriter writer,
                                    List<org.apache.maven.shared.filtering.FilterWrapper> filterWrappers)
                             throws IOException
        Writes the complete trigger directive. Use instead of Scriptlet.write(PrintWriter, String, List).
        Parameters:
        writer - PrintWriter to write the trigger directive to.
        filterWrappers - The filter wrappers to be applied when writing the content.
        Throws:
        IOException - if an I/IO error occurs
      • getDirective

        protected abstract String getDirective()
        Provides the trigger specific directive.
        Returns:
        The implementation specific directive.