Class AbstractRefreshWebappMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.alfresco.maven.plugin.AbstractRefreshWebappMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
RefreshMojo, RefreshRepoWebappMojo, RefreshShareWebappMojo

public abstract class AbstractRefreshWebappMojo extends org.apache.maven.plugin.AbstractMojo
Abstract Maven Mojo with generic functionality common to both the Refresh Repo and Refresh Share Mojos.
Since:
2.1.0
Author:
martin.bergljung@alfresco.com
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected String
    The URL to send the POST to when you want to clear dependency caches for the Alfresco Share webapp.
    protected org.apache.maven.project.MavenProject
     
    protected String
    The hostname for where the Alfresco Tomcat server is running.
    protected String
    The mode for the refresh goal, current supported values are: auto - Checks packaging and app.amp.client.war.artifactId to determine if it should refresh for repo or share both - Forces it to refresh both for Repo and Share share - Forces only to refresh share repo - Forces only to refresh repo none - Disables refreshing web scripts
    protected String
    The password for authenticating against Alfresco Repo.
    protected String
    The URL to send the POST to when you want to refresh Alfresco Repo Web Scripts container.
    protected String
    The URL to send the POST to when you want to refresh Alfresco Share Spring Surf Web Scripts container.
    protected String
    The name of the web application we are refreshing, just for logging purpose

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     
    protected void
    Perform a Clear Dependency Caches call on Share webapp.
    void
    Mojo interface implementation
    protected abstract void
    To be implemented by webapp "refresh" Mojos
    protected void
    Perform a Refresh of Web Scripts container in webapp.

    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 Details

    • project

      @Component protected org.apache.maven.project.MavenProject project
    • refreshMode

      @Parameter(property="maven.alfresco.refresh.mode", defaultValue="auto") protected String refreshMode
      The mode for the refresh goal, current supported values are: auto - Checks packaging and app.amp.client.war.artifactId to determine if it should refresh for repo or share both - Forces it to refresh both for Repo and Share share - Forces only to refresh share repo - Forces only to refresh repo none - Disables refreshing web scripts
    • refreshHost

      @Parameter(property="maven.alfresco.refresh.host", defaultValue="localhost") protected String refreshHost
      The hostname for where the Alfresco Tomcat server is running.
    • refreshPassword

      @Parameter(property="maven.alfresco.refresh.password", defaultValue="admin") protected String refreshPassword
      The password for authenticating against Alfresco Repo.
    • refreshRepoUrl

      @Parameter(property="maven.alfresco.refresh.repoUrl", defaultValue="/alfresco/service/index") protected String refreshRepoUrl
      The URL to send the POST to when you want to refresh Alfresco Repo Web Scripts container.
    • refreshShareUrl

      @Parameter(property="maven.alfresco.refresh.shareUrl", defaultValue="/share/page/index") protected String refreshShareUrl
      The URL to send the POST to when you want to refresh Alfresco Share Spring Surf Web Scripts container.
    • clearCacheShareUrl

      @Parameter(property="maven.alfresco.refresh.clearCacheShareUrl", defaultValue="/share/page/caches/dependency/clear") protected String clearCacheShareUrl
      The URL to send the POST to when you want to clear dependency caches for the Alfresco Share webapp.
    • refreshWebappName

      protected String refreshWebappName
      The name of the web application we are refreshing, just for logging purpose
    • alfrescoClientWar

      @Parameter(defaultValue="${app.amp.client.war.artifactId}") protected String alfrescoClientWar
  • Constructor Details

    • AbstractRefreshWebappMojo

      public AbstractRefreshWebappMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Mojo interface implementation
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • executeRefresh

      protected abstract void executeRefresh()
      To be implemented by webapp "refresh" Mojos
    • _refreshRepo

      protected void _refreshRepo()
    • _refreshShare

      protected void _refreshShare()
    • refreshWebScripts

      protected void refreshWebScripts(String url)
      Perform a Refresh of Web Scripts container in webapp. Called by specific refresh mojo implementation.
      Parameters:
      url - the relative path to refresh webscripts
    • clearDependencyCaches

      protected void clearDependencyCaches(String url)
      Perform a Clear Dependency Caches call on Share webapp. Called by specific refresh mojo implementation, currently only applicable to Share webapp.
      Parameters:
      url - the relative path to clear cache