Class AbstractAddResourceMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    AddResourceMojo, AddTestResourceMojo

    public abstract class AbstractAddResourceMojo
    extends org.apache.maven.plugin.AbstractMojo
    Abstract Mojo for adding Resources
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.maven.project.MavenProject project
      The maven project
      private org.apache.maven.model.Resource[] resources
      Additional resource directories.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void addResource​(org.apache.maven.model.Resource resource)
      Add the resource to the project.
      void execute()
      Main plugin execution
      org.apache.maven.project.MavenProject getProject()
      Get the current project instance.
      protected abstract boolean isSkip()  
      protected abstract boolean isSkipIfMissing()  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • resources

        @Parameter(required=true)
        private org.apache.maven.model.Resource[] resources
        Additional resource directories.
      • project

        @Parameter(readonly=true,
                   defaultValue="${project}")
        private org.apache.maven.project.MavenProject project
        The maven project
    • Constructor Detail

      • AbstractAddResourceMojo

        public AbstractAddResourceMojo()
    • Method Detail

      • execute

        public void execute()
        Main plugin execution
      • isSkipIfMissing

        protected abstract boolean isSkipIfMissing()
      • isSkip

        protected abstract boolean isSkip()
      • addResource

        public abstract void addResource​(org.apache.maven.model.Resource resource)
        Add the resource to the project.
        Parameters:
        resource - the resource to add
      • getProject

        public org.apache.maven.project.MavenProject getProject()
        Get the current project instance.
        Returns:
        the project