Package org.alfresco.maven.plugin
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.AbstractMojoAbstract 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 StringalfrescoClientWarprotected StringclearCacheShareUrlThe URL to send the POST to when you want to clear dependency caches for the Alfresco Share webapp.protected org.apache.maven.project.MavenProjectprojectprotected StringrefreshHostThe hostname for where the Alfresco Tomcat server is running.protected StringrefreshModeThe 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 scriptsprotected StringrefreshPasswordThe password for authenticating against Alfresco Repo.protected StringrefreshRepoUrlThe URL to send the POST to when you want to refresh Alfresco Repo Web Scripts container.protected StringrefreshShareUrlThe URL to send the POST to when you want to refresh Alfresco Share Spring Surf Web Scripts container.protected StringrefreshWebappNameThe name of the web application we are refreshing, just for logging purpose
-
Constructor Summary
Constructors Constructor Description AbstractRefreshWebappMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void_refreshRepo()protected void_refreshShare()protected voidclearDependencyCaches(String url)Perform a Clear Dependency Caches call on Share webapp.voidexecute()Mojo interface implementationprotected abstract voidexecuteRefresh()To be implemented by webapp "refresh" Mojosprotected voidrefreshWebScripts(String url)Perform a Refresh of Web Scripts container in webapp.
-
-
-
Field Detail
-
project
@Component protected org.apache.maven.project.MavenProject project
-
refreshMode
@Parameter(property="maven.alfresco.refresh.mode", defaultValue="auto") protected String refreshModeThe 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 refreshHostThe hostname for where the Alfresco Tomcat server is running.
-
refreshPassword
@Parameter(property="maven.alfresco.refresh.password", defaultValue="admin") protected String refreshPasswordThe password for authenticating against Alfresco Repo.
-
refreshRepoUrl
@Parameter(property="maven.alfresco.refresh.repoUrl", defaultValue="/alfresco/service/index") protected String refreshRepoUrlThe 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 refreshShareUrlThe 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 clearCacheShareUrlThe 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
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionMojo 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
-
-