public abstract class AbstractRunMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVITI_APP_WAR_PREFIX_NAME |
protected String |
activitiAdminWarArtifactId |
protected String |
activitiAppWarArtifactId |
protected String |
activitiGroupId |
protected List<ModuleDependency> |
activitiModules
JARs that should be overlayed/applied to the Activiti App WAR (i.e.
|
protected String |
activitiVersion |
static String |
ALFRESCO_COMMUNITY_EDITION |
static String |
ALFRESCO_ENTERPRISE_EDITION |
protected String |
alfrescoApiExplorerArtifactId |
protected String |
alfrescoApiExplorerVersion |
protected String |
alfrescoEdition
Community Edition or Enterprise Edition? (i.e community or enterprise)
|
protected String |
alfrescoGroupId
Maven GAV properties for standard Alfresco web applications.
|
protected String |
alfrescoPlatformVersion |
protected String |
alfrescoPlatformWarArtifactId |
protected String |
alfrescoShareVersion |
protected String |
alfrescoShareWarArtifactId |
protected String |
alfrescoSolrArtifactId |
protected boolean |
copyHotswapAgentConfig
Enable or disable generation of Hotswap Agent configuration
|
protected boolean |
enableActivitiAdmin
Switch to enable/disable Alfresco Activiti Admin (activiti-admin.war) when running embedded Tomcat.
|
protected boolean |
enableActivitiApp
Switch to enable/disable Alfresco Activiti Workflow Engine (activiti-app.war) when running embedded Tomcat.
|
protected boolean |
enableApiExplorer
Switch to enable/disable the Alfresco REST API Explorer (api-explorer.war) when running embedded Tomcat.
|
protected boolean |
enableEnterpriseDb
Switch to enable/disable the Enterprise database (such as Oracle or MS SQL Server) when running embedded Tomcat.
|
protected boolean |
enableH2
Switch to enable/disable the H2 database when running embedded Tomcat.
|
protected boolean |
enableMySQL
Switch to enable/disable the MySQL database when running embedded Tomcat.
|
protected boolean |
enablePlatform
Switch to enable/disable the Platform/Repository (alfresco.war) when running embedded Tomcat.
|
protected boolean |
enablePostgreSQL
Switch to enable/disable the PostgreSQL database when running embedded Tomcat.
|
protected boolean |
enableShare
Switch to enable/disable the Share (share.war) when running embedded Tomcat.
|
protected boolean |
enableSolr
Switch to enable/disable the Apache Solr 4 web application when running embedded Tomcat.
|
protected boolean |
enableTestProperties
Switch to enable/disable test properties when running embedded Tomcat.
|
protected org.twdata.maven.mojoexecutor.MojoExecutor.ExecutionEnvironment |
execEnv
The Maven environment that this mojo is executed in
|
static String |
MAVEN_BUILD_HELPER_PLUGIN_VERSION |
static String |
MAVEN_DEPENDENCY_PLUGIN_VERSION |
static String |
MAVEN_INSTALL_PLUGIN_VERSION |
static String |
MAVEN_REPLACER_PLUGIN_VERSION |
static String |
MAVEN_RESOURCE_PLUGIN_VERSION |
static String |
MAVEN_TOMCAT7_PLUGIN_VERSION |
protected String |
mavenTomcatPort
Legacy to be compatible with maven.tomcat.port
|
static String |
PLATFORM_WAR_PREFIX_NAME |
protected List<ModuleDependency> |
platformModules
JARs and AMPs that should be overlayed/applied to the Platform/Repository WAR (i.e.
|
protected org.apache.maven.plugin.BuildPluginManager |
pluginManager |
protected org.apache.maven.project.MavenProject |
project |
protected List<org.apache.maven.project.MavenProject> |
reactorProjects |
protected org.apache.maven.execution.MavenSession |
session |
static String |
SHARE_WAR_PREFIX_NAME |
protected String |
shareContextPath
Enables the use of custom context path for the Share webapp.
|
protected List<ModuleDependency> |
shareModules
JARs and AMPs that should be overlayed/applied to the Share WAR (i.e.
|
protected String |
solrHome
Directory that contains the Alfresco Solr 4 configuration
|
protected boolean |
startTomcat
Control if Tomcat 7 Plugin should be kicked off and start Apache Tomcat
|
protected String |
testFolder
Directory containing test files that should be used when running embedded Tomcat
|
protected String |
testInclude
Test files in testFolder that should be included when running embedded Tomcat
|
protected List<TomcatWebapp> |
tomcatCustomWebapps
Custom webapps that should be deployed to the embedded Tomcat engine.
|
protected List<TomcatDependency> |
tomcatDependencies
Tomcat Dependencies that should be added to the Embedded Tomcat configuration before start.
|
protected String |
tomcatPort
Port to run Tomcat on
|
protected Map<String,String> |
tomcatSystemProperties
System Properties to feed the Tomcat plugin before start.
|
protected boolean |
useCustomShareLog4jConfig
Share Log4j.properties configuration cannot be customized via extension
put on the classpath, like on the platform side.
|
| Constructor and Description |
|---|
AbstractRunMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildActivitiAppWar()
Build the customized Activiti App webapp (i.e.
|
protected void |
buildCustomWarInDir(String warName,
List<ModuleDependency> modules,
String originalWarGroupId,
String originalWarArtifactId,
String originalWarVersion)
Build a customized webapp in a directory,
applying a number of AMPs and/or JARs from alfresco maven plugin configuration.
|
protected void |
buildPlatformWar()
Build the customized Platform webapp (i.e.
|
protected void |
buildShareWar()
Build the customized Share webapp (i.e.
|
protected void |
checkDatabaseConfig()
Check that a database configuration has been supplied correctly
|
protected void |
commentOutSecureCommsInPlatformWebXml()
Replaces web.xml where applicable in platform webapp (alfresco.war),
commenting out the security-constraints.
|
protected void |
copyActivitiLog4JDevConfig()
Copy the Activiti Log4J Dev config into the activitiApp-war/WEB-INF/classes dir.
|
protected void |
copyAlfrescoGlobalProperties()
Copy the different alfresco-global-*.properties files (there are one for each open source db and one for
enterprise db config) that will be used when running Alfresco.
|
protected void |
copyAlfrescoLicense()
Copy the Alfresco Enterprise license to its correct place in the Platform WAR, if it exists.
|
protected void |
copyHotswapAgentProperties(String warPrefix)
Copy and Build hotswap-agent.properties
|
protected void |
copyShareConfigCustom()
Copy Share Config Custom in order to have global overrides for development and dynamic port
|
protected void |
copyShareLog4jConfig()
Copy a custom Share Log4J config into the share-war/WEB-INF/classes dir.
|
protected void |
fixSolrHomePath()
For windows paths, convert single \ to / for the ${alfresco.solr.data.dir} path,
by default it will be c:\bla\, we need forward slash or double backslash.
|
protected String |
getPort()
Get the Tomcat port.
|
protected void |
installSolr10InLocalRepo()
If we are in Alfresco version 4.2 or younger the Solr 1.0 WAR is not available as Maven artifact, just
as part of a ZIP file, so install it locally so we can deploy from embedded tomcat
|
protected String |
packageAndInstallCustomWar(String warName)
Package customized war file and install it in local maven repo.
|
protected void |
renameAlfrescoGlobalProperties()
Rename the configured database specific alfresco-global-*.properties file to
alfresco-global.properties so it will be used during Tomcat run.
|
protected void |
replaceSolrConfigProperties()
Replace property placeholders in configuration files for the cores, so the
index files can be found for each core when Solr starts up.
|
protected void |
startTomcat(boolean fork)
Start up the embedded Tomcat server with the webapps that has been
configured in the SDK project.
|
protected boolean |
tomcatIsRunning() |
protected void |
unpackSolrConfig()
Download and unpack the Solr 4 configuration as we don't have it in the project.
|
getLog, getPluginContext, setLog, setPluginContextpublic static final String MAVEN_DEPENDENCY_PLUGIN_VERSION
public static final String MAVEN_INSTALL_PLUGIN_VERSION
public static final String MAVEN_REPLACER_PLUGIN_VERSION
public static final String MAVEN_RESOURCE_PLUGIN_VERSION
public static final String MAVEN_TOMCAT7_PLUGIN_VERSION
public static final String MAVEN_BUILD_HELPER_PLUGIN_VERSION
public static final String PLATFORM_WAR_PREFIX_NAME
public static final String SHARE_WAR_PREFIX_NAME
public static final String ACTIVITI_APP_WAR_PREFIX_NAME
public static final String ALFRESCO_ENTERPRISE_EDITION
public static final String ALFRESCO_COMMUNITY_EDITION
@Component protected org.apache.maven.project.MavenProject project
@Component protected org.apache.maven.execution.MavenSession session
@Component protected org.apache.maven.plugin.BuildPluginManager pluginManager
@Parameter(property="reactorProjects",
required=true,
readonly=true)
protected List<org.apache.maven.project.MavenProject> reactorProjects
@Parameter(property="maven.alfresco.enableSolr",
defaultValue="true")
protected boolean enableSolr
@Parameter(property="maven.alfresco.enableH2",
defaultValue="false")
protected boolean enableH2
@Parameter(property="maven.alfresco.enableMySQL",
defaultValue="false")
protected boolean enableMySQL
@Parameter(property="maven.alfresco.enablePostgreSQL",
defaultValue="false")
protected boolean enablePostgreSQL
@Parameter(property="maven.alfresco.enableEnterpriseDb",
defaultValue="false")
protected boolean enableEnterpriseDb
@Parameter(property="maven.alfresco.enablePlatform",
defaultValue="true")
protected boolean enablePlatform
@Parameter(property="maven.alfresco.copyHotswapAgentConfig",
defaultValue="true")
protected boolean copyHotswapAgentConfig
@Parameter(property="maven.alfresco.enableShare",
defaultValue="true")
protected boolean enableShare
@Parameter(property="maven.alfresco.shareContextPath",
defaultValue="/share")
protected String shareContextPath
@Parameter(property="maven.alfresco.useCustomShareLog4jConfig",
defaultValue="true")
protected boolean useCustomShareLog4jConfig
@Parameter(property="maven.alfresco.enableApiExplorer",
defaultValue="false")
protected boolean enableApiExplorer
@Parameter(property="maven.alfresco.enableActivitiApp",
defaultValue="false")
protected boolean enableActivitiApp
@Parameter(property="maven.alfresco.enableActivitiAdmin",
defaultValue="false")
protected boolean enableActivitiAdmin
@Parameter(property="maven.alfresco.enableTestProperties",
defaultValue="true")
protected boolean enableTestProperties
@Parameter(property="maven.alfresco.startTomcat",
defaultValue="true")
protected boolean startTomcat
@Parameter(property="maven.alfresco.testFolder",
defaultValue="src/test/properties/${env}")
protected String testFolder
@Parameter(property="maven.alfresco.testInclude",
defaultValue="**")
protected String testInclude
@Parameter(property="maven.alfresco.platform.modules",
defaultValue="")
protected List<ModuleDependency> platformModules
@Parameter(property="maven.alfresco.share.modules",
defaultValue="")
protected List<ModuleDependency> shareModules
@Parameter(property="maven.activiti.modules",
defaultValue="")
protected List<ModuleDependency> activitiModules
@Parameter(property="maven.alfresco.edition",
defaultValue="community")
protected String alfrescoEdition
@Parameter(property="maven.alfresco.tomcat.dependencies",
defaultValue="")
protected List<TomcatDependency> tomcatDependencies
@Parameter(property="maven.alfresco.tomcat.system.properties",
defaultValue="")
protected Map<String,String> tomcatSystemProperties
@Parameter(property="maven.alfresco.tomcat.custom.webapps",
defaultValue="")
protected List<TomcatWebapp> tomcatCustomWebapps
@Parameter(property="maven.alfresco.tomcat.port",
defaultValue="8080")
protected String tomcatPort
@Parameter(property="maven.tomcat.port",
defaultValue="")
protected String mavenTomcatPort
@Parameter(property="alfresco.groupId",
defaultValue="org.alfresco")
protected String alfrescoGroupId
@Parameter(property="activiti.groupId",
defaultValue="com.activiti")
protected String activitiGroupId
@Parameter(property="alfresco.platform.war.artifactId",
defaultValue="alfresco-platform")
protected String alfrescoPlatformWarArtifactId
@Parameter(property="alfresco.share.war.artifactId",
defaultValue="share")
protected String alfrescoShareWarArtifactId
@Parameter(property="alfresco.solr.artifactId",
defaultValue="alfresco-solr4")
protected String alfrescoSolrArtifactId
@Parameter(property="alfresco.api.explorer.artifactId",
defaultValue="api-explorer")
protected String alfrescoApiExplorerArtifactId
@Parameter(property="activiti.app.war.artifactId",
defaultValue="activiti-app")
protected String activitiAppWarArtifactId
@Parameter(property="activiti.admin.war.artifactId",
defaultValue="activiti-admin")
protected String activitiAdminWarArtifactId
@Parameter(property="alfresco.platform.version",
defaultValue="5.2.f")
protected String alfrescoPlatformVersion
@Parameter(property="alfresco.share.version",
defaultValue="5.2.e")
protected String alfrescoShareVersion
@Parameter(property="alfresco.api.explorer.version",
defaultValue="5.2.e")
protected String alfrescoApiExplorerVersion
@Parameter(property="activiti.version",
defaultValue="1.5.3")
protected String activitiVersion
@Parameter(property="solr.home",
defaultValue="${project.basedir}/${alfresco.data.location}/solr")
protected String solrHome
protected org.twdata.maven.mojoexecutor.MojoExecutor.ExecutionEnvironment execEnv
protected String getPort()
protected boolean tomcatIsRunning()
protected void unpackSolrConfig()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void fixSolrHomePath()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void replaceSolrConfigProperties()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void installSolr10InLocalRepo()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void commentOutSecureCommsInPlatformWebXml()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void copyAlfrescoGlobalProperties()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void renameAlfrescoGlobalProperties()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void copyAlfrescoLicense()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void copyActivitiLog4JDevConfig()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void copyShareConfigCustom()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void copyShareLog4jConfig()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void copyHotswapAgentProperties(String warPrefix) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void buildPlatformWar()
throws org.apache.maven.plugin.MojoExecutionException
<platformModules> configuration.org.apache.maven.plugin.MojoExecutionExceptionprotected void buildShareWar()
throws org.apache.maven.plugin.MojoExecutionException
<shareModules> configuration.org.apache.maven.plugin.MojoExecutionExceptionprotected void buildActivitiAppWar()
throws org.apache.maven.plugin.MojoExecutionException
<activitiModules> configuration.org.apache.maven.plugin.MojoExecutionExceptionprotected void buildCustomWarInDir(String warName, List<ModuleDependency> modules, String originalWarGroupId, String originalWarArtifactId, String originalWarVersion) throws org.apache.maven.plugin.MojoExecutionException
warName - the name of the custom warmodules - the modules that should be applied to the custom waroriginalWarGroupId - the Maven groupId for the original war file that should be customizedoriginalWarArtifactId - the Maven artifactId for the original war file that should be customizedoriginalWarVersion - the Maven version for the original war file that should be customizedorg.apache.maven.plugin.MojoExecutionExceptionprotected String packageAndInstallCustomWar(String warName) throws org.apache.maven.plugin.MojoExecutionException
warName - the name of the custom warorg.apache.maven.plugin.MojoExecutionExceptionprotected void checkDatabaseConfig()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void startTomcat(boolean fork)
throws org.apache.maven.plugin.MojoExecutionException
fork - true if tomcat process should be forkedorg.apache.maven.plugin.MojoExecutionExceptionCopyright © 2017. All rights reserved.