diff --git a/.gitignore b/.gitignore
index 4c53162..0c01a04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,38 @@
-*.amp
+**.log*
+
+# Maven
+target/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+.mvn/wrapper/maven-wrapper.jar
+
+# Eclipse
+.metadata
+.project
+.classpath
+bin/
+tmp/
+*.tmp
+.settings/
+.loadpath
+.recommenders
+
+# IntelliJ IDEA
+**.idea
+**.iml
+
+# Visual Studio Code
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+
+# macOS
+*.DS_Store
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
new file mode 100644
index 0000000..5980b74
--- /dev/null
+++ b/docker/docker-compose.yml
@@ -0,0 +1,66 @@
+version: '3.4'
+services:
+ alfmarkdown-share:
+ image: alfresco-share-alfmarkdown:development
+ build:
+ dockerfile: ./Dockerfile
+ context: ../../../share-docker/target
+ environment:
+ CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888"
+ REPO_HOST: alfmarkdown-acs
+ REPO_PORT: 8080
+ ports:
+ - "${share.port}:8080"
+ - "${share.debug.port}:8888"
+ alfmarkdown-acs:
+ image: alfresco-content-services-alfmarkdown:development
+ build:
+ dockerfile: ./Dockerfile
+ context: ../../../platform-docker/target
+ environment:
+ CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888"
+ ports:
+ - "${acs.port}:8080"
+ - "${acs.debug.port}:8888"
+ volumes:
+ - alfmarkdown-acs-volume:/usr/local/tomcat/alf_data
+ depends_on:
+ - alfmarkdown-postgres
+ alfmarkdown-postgres:
+ image: postgres:9.6
+ environment:
+ POSTGRES_DB: alfresco
+ POSTGRES_USER: alfresco
+ POSTGRES_PASSWORD: alfresco
+ command: postgres -c max_connections=300 -c log_min_messages=LOG
+ ports:
+ - "${postgres.port}:5432"
+ volumes:
+ - alfmarkdown-db-volume:/var/lib/postgresql/data
+ alfmarkdown-ass:
+ image: alfresco/alfresco-search-services:1.2.0
+ environment:
+ SOLR_ALFRESCO_HOST: alfmarkdown-acs
+ SOLR_ALFRESCO_PORT: 8080
+ SOLR_SOLR_HOST: alfmarkdown-ass
+ SOLR_SOLR_PORT: 8983
+ SOLR_CREATE_ALFRESCO_DEFAULTS: alfresco,archive
+ ports:
+ - "8983:8983"
+ volumes:
+ - alfmarkdown-ass-volume:/opt/alfresco-search-services/contentstore
+ - alfmarkdown-ass-volume:/opt/alfresco-search-services/data
+ alfmarkdown-adw:
+ image: quay.io/alfresco/alfresco-digital-workspace:2.0.0-adw
+ environment:
+ BASE_PATH: ./
+ APP_CONFIG_ECM_HOST: http://localhost:${acs.port}
+ ports:
+ - "${adw.port}:8080"
+volumes:
+ alfmarkdown-acs-volume:
+ external: true
+ alfmarkdown-db-volume:
+ external: true
+ alfmarkdown-ass-volume:
+ external: true
\ No newline at end of file
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
new file mode 100644
index 0000000..acd1e04
--- /dev/null
+++ b/integration-tests/pom.xml
@@ -0,0 +1,85 @@
+
+
+ 4.0.0
+ alfmarkdown-integration-tests
+ Integration Tests Module
+ Integration Tests module for in-container integration testing - part of AIO - SDK 4.0
+ jar
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown-platform
+ 1.0-SNAPSHOT
+ test
+
+
+
+
+
+
+
+ src/test/resources
+ true
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ test-jar
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+
+
+ ${test.acs.endpoint.path}
+
+
+
+
+
+
+
+
+ jrebel-it
+
+
+
+ org.zeroturnaround
+ jrebel-maven-plugin
+
+ ${project.build.testOutputDirectory}
+
+
+
+
+
+
+
diff --git a/platform-docker/pom.xml b/platform-docker/pom.xml
new file mode 100644
index 0000000..2acd260
--- /dev/null
+++ b/platform-docker/pom.xml
@@ -0,0 +1,118 @@
+
+
+ 4.0.0
+ alfmarkdown-platform-docker
+ Alfresco Platform/Repository Docker Module
+ Platform/Repo Docker Module to generate the final Docker image
+ jar
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown-platform
+ ${project.version}
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown-integration-tests
+ ${project.version}
+ test
+ tests
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+
+ collect-test-artifacts
+ pre-integration-test
+
+ copy-dependencies
+
+
+ ${project.build.directory}/extensions
+ compile
+
+
+
+
+ collect-extensions
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/extensions
+ runtime
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+
+
+ copy-and-filter-docker-resources
+ validate
+
+ copy-resources
+
+
+ ${project.build.directory}
+
+
+ src/main/docker
+ true
+
+ **/*.jar
+ **/*.so
+ **/*.gz
+
+
+
+
+
+
+ copy-and-filter-docker-resources-non-filtered
+ validate
+
+ copy-resources
+
+
+ ${project.build.directory}
+
+
+ src/main/docker
+ false
+
+ **/*.jar
+ **/*.so
+ **/*.gz
+
+
+
+
+
+
+
+
+
+
diff --git a/platform-docker/src/main/docker/Dockerfile b/platform-docker/src/main/docker/Dockerfile
new file mode 100644
index 0000000..385d77a
--- /dev/null
+++ b/platform-docker/src/main/docker/Dockerfile
@@ -0,0 +1,22 @@
+FROM ${docker.acs.image}:${alfresco.platform.version}
+
+ARG TOMCAT_DIR=/usr/local/tomcat
+
+USER root
+
+# Copy Dockerfile to avoid an error if no JARs exist
+COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/alfresco/WEB-INF/lib/
+
+# Copy Dockerfile to avoid an error if no AMPs exist
+COPY Dockerfile extensions/*.amp $TOMCAT_DIR/amps/
+RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
+ $TOMCAT_DIR/amps $TOMCAT_DIR/webapps/alfresco -directory -nobackup -force
+
+COPY alfresco-global.properties $TOMCAT_DIR/shared/classes/alfresco-global.properties
+COPY dev-log4j.properties $TOMCAT_DIR/shared/classes/alfresco/extension
+COPY disable-webscript-caching-context.xml $TOMCAT_DIR/shared/classes/alfresco/extension
+
+# Copy Dockerfile to avoid an error if no license file exists
+COPY Dockerfile license/*.* $TOMCAT_DIR/webapps/alfresco/WEB-INF/classes/alfresco/extension/license/
+
+USER ${USERNAME}
\ No newline at end of file
diff --git a/platform-docker/src/main/docker/alfresco-global.properties b/platform-docker/src/main/docker/alfresco-global.properties
new file mode 100644
index 0000000..1ff9760
--- /dev/null
+++ b/platform-docker/src/main/docker/alfresco-global.properties
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# RUN TIME PROPERTIES
+# -------------------
+
+#
+# Alfresco configuration for running locally with PostgreSQL Database
+#
+# Configuration when running Tomcat embedded from Maven.
+# Property values from the POM but it can also be edited here.
+#
+
+# Alfresco Repo Webapp (alfresco.war) context, ports etc
+alfresco.context=alfresco
+alfresco.host=localhost
+alfresco.port=8080
+alfresco.protocol=http
+
+# Alfresco Share Webapp (share.war) context, ports etc
+share.context=share
+share.host=localhost
+share.port=8180
+share.protocol=http
+
+# Don't try and recover any index
+index.recovery.mode=NONE
+
+# These jobs seem to require Lucene (Unsupported Operation with Solr) so we disable them / set to future date
+# See https://forums.alfresco.com/en/viewtopic.php?f=52&t=41597
+# If you want to enable them (and so full WQS functionality), please also set index.subsystem.name=lucene
+wcmqs.dynamicCollectionProcessor.schedule=0 30 2 * * ? 2060
+wcmqs.feedbackProcessor.schedule=0 40 2 * * ? 2060
+wcmqs.publishQueueProcessor.schedule=0 50 2 * * ? 2060
+
+# Fail or not when there are node integrity checker errors
+integrity.failOnError=true
+
+# Alfresco Repository PostgreSQL Database configuration.
+# The PostgreSQL Driver is brought in via the tomcat7-maven-plugin as a dependency.
+db.driver=org.postgresql.Driver
+
+# This Alfresco Platform Configuration file should be used for custom properties that are introduced by this module.
+# Define default values for all properties here.
+# System Administrators can override these values in environment specific configurations in
+# alfresco/tomcat/shared/classes/alfresco-global.properties.
+#
+index.subsystem.name=solr6
+solr.host=alfmarkdown-ass
+solr.port=8983
+solr.secureComms=none
+
+db.username=alfresco
+db.password=alfresco
+db.pool.initial=10
+db.pool.max=100
+
+db.url=jdbc:postgresql://alfmarkdown-postgres:5432/alfresco
+
+# File servers related properties
+# For local runs we disable CIFS and FTP
+cifs.enabled=false
+ftp.enabled=false
+
+csrf.filter.enabled=false
+
+# Embedded broker without persistence
+messaging.broker.url=vm://localhost?broker.persistent=false
+
+# Disable ATS
+transform.service.enabled=false
+local.transform.service.enabled=false
+legacy.transform.service.enabled=false
+jodconverter.enabled=false
diff --git a/platform-docker/src/main/docker/dev-log4j.properties b/platform-docker/src/main/docker/dev-log4j.properties
new file mode 100644
index 0000000..994f4c9
--- /dev/null
+++ b/platform-docker/src/main/docker/dev-log4j.properties
@@ -0,0 +1,266 @@
+# Set root logger level to error
+log4j.rootLogger=error, Console, File
+
+
+# All outputs currently set to be a ConsoleAppender.
+log4j.appender.Console=org.apache.log4j.ConsoleAppender
+log4j.appender.Console.layout=org.apache.log4j.PatternLayout
+
+# use log4j NDC to replace %x with tenant domain / username
+log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n
+#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
+
+log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.File.File=alfresco.log
+log4j.appender.File.Append=true
+log4j.appender.File.DatePattern='.'yyyy-MM-dd
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d{yyyy-MM-dd} %d{ABSOLUTE} %-5p [%c] [%t] %m%n
+
+#log4j.appender.file=org.apache.log4j.FileAppender
+#log4j.appender.file.File=hibernate.log
+#log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+
+# Commented-in loggers will be exposed as JMX MBeans (refer to org.alfresco.repo.admin.Log4JHierarchyInit)
+# Hence, generally useful loggers should be listed with at least ERROR level to allow simple runtime
+# control of the level via a suitable JMX Console. Also, any other loggers can be added transiently via
+# Log4j addLoggerMBean as long as the logger exists and has been loaded.
+
+# Hibernate
+log4j.logger.org.hibernate=error
+log4j.logger.org.hibernate.util.JDBCExceptionReporter=fatal
+log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=fatal
+log4j.logger.org.hibernate.type=warn
+log4j.logger.org.hibernate.cfg.SettingsFactory=warn
+
+# Spring
+log4j.logger.org.springframework=warn
+# Turn off Spring remoting warnings that should really be info or debug.
+log4j.logger.org.springframework.remoting.support=error
+log4j.logger.org.springframework.util=error
+
+# Axis/WSS4J
+log4j.logger.org.apache.axis=info
+log4j.logger.org.apache.ws=info
+
+# CXF
+log4j.logger.org.apache.cxf=error
+
+# MyFaces
+log4j.logger.org.apache.myfaces.util.DebugUtils=info
+log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
+log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
+log4j.logger.org.apache.myfaces.taglib=error
+
+# OpenOfficeConnection
+log4j.logger.net.sf.jooreports.openoffice.connection=fatal
+
+# log prepared statement cache activity log4j.logger.org.hibernate.ps.PreparedStatementCache=info
+
+# Alfresco
+log4j.logger.org.alfresco=error
+log4j.logger.org.alfresco.repo.admin=info
+log4j.logger.org.alfresco.repo.transaction=warn
+log4j.logger.org.alfresco.repo.cache.TransactionalCache=warn
+log4j.logger.org.alfresco.repo.model.filefolder=warn
+log4j.logger.org.alfresco.repo.tenant=info
+log4j.logger.org.alfresco.config=warn
+log4j.logger.org.alfresco.config.JndiObjectFactoryBean=warn
+log4j.logger.org.alfresco.config.JBossEnabledWebApplicationContext=warn
+log4j.logger.org.alfresco.repo.management.subsystems=warn
+log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory=info
+log4j.logger.org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ChildApplicationContext=warn
+log4j.logger.org.alfresco.repo.security.sync=info
+log4j.logger.org.alfresco.repo.security.person=info
+
+log4j.logger.org.alfresco.sample=info
+log4j.logger.org.alfresco.web=info
+#log4j.logger.org.alfresco.web.app.AlfrescoNavigationHandler=debug
+#log4j.logger.org.alfresco.web.ui.repo.component.UIActions=debug
+#log4j.logger.org.alfresco.web.ui.repo.tag.PageTag=debug
+#log4j.logger.org.alfresco.web.bean.clipboard=debug
+log4j.logger.org.alfresco.service.descriptor.DescriptorService=info
+#log4j.logger.org.alfresco.web.page=debug
+
+log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=error
+#log4j.logger.org.alfresco.repo.importer.ImporterBootstrap=info
+
+log4j.logger.org.alfresco.repo.admin.patch.PatchExecuter=info
+log4j.logger.org.alfresco.repo.domain.patch.ibatis.PatchDAOImpl=info
+
+# Specific patches
+log4j.logger.org.alfresco.repo.admin.patch.impl.DeploymentMigrationPatch=info
+log4j.logger.org.alfresco.repo.version.VersionMigrator=info
+
+log4j.logger.org.alfresco.repo.module.ModuleServiceImpl=info
+log4j.logger.org.alfresco.repo.domain.schema.SchemaBootstrap=info
+log4j.logger.org.alfresco.repo.admin.ConfigurationChecker=info
+log4j.logger.org.alfresco.repo.node.index.AbstractReindexComponent=warn
+log4j.logger.org.alfresco.repo.node.index.IndexTransactionTracker=warn
+log4j.logger.org.alfresco.repo.node.index.FullIndexRecoveryComponent=info
+log4j.logger.org.alfresco.util.OpenOfficeConnectionTester=info
+log4j.logger.org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl=warn
+log4j.logger.org.alfresco.repo.domain.hibernate.DirtySessionMethodInterceptor=warn
+log4j.logger.org.alfresco.repo.transaction.RetryingTransactionHelper=warn
+log4j.logger.org.alfresco.util.transaction.SpringAwareUserTransaction.trace=warn
+log4j.logger.org.alfresco.util.AbstractTriggerBean=warn
+log4j.logger.org.alfresco.enterprise.repo.cluster=info
+log4j.logger.org.alfresco.repo.version.Version2ServiceImpl=warn
+
+#log4j.logger.org.alfresco.web.app.DebugPhaseListener=debug
+log4j.logger.org.alfresco.repo.node.db.NodeStringLengthWorker=info
+
+log4j.logger.org.alfresco.repo.workflow=info
+
+# CIFS server debugging
+log4j.logger.org.alfresco.smb.protocol=error
+#log4j.logger.org.alfresco.smb.protocol.auth=debug
+#log4j.logger.org.alfresco.acegi=debug
+
+# FTP server debugging
+log4j.logger.org.alfresco.ftp.protocol=error
+#log4j.logger.org.alfresco.ftp.server=debug
+
+# WebDAV debugging
+#log4j.logger.org.alfresco.webdav.protocol=debug
+log4j.logger.org.alfresco.webdav.protocol=info
+
+# NTLM servlet filters
+#log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
+#log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
+
+# Kerberos servlet filters
+#log4j.logger.org.alfresco.web.app.servlet.KerberosAuthenticationFilter=debug
+#log4j.logger.org.alfresco.repo.webdav.auth.KerberosAuthenticationFilter=debug
+
+# File servers
+log4j.logger.org.alfresco.fileserver=warn
+
+# Repo filesystem debug logging
+#log4j.logger.org.alfresco.filesys.repo.ContentDiskDriver=debug
+
+# Integrity message threshold - if 'failOnViolation' is off, then WARNINGS are generated
+log4j.logger.org.alfresco.repo.node.integrity=ERROR
+
+# Indexer debugging
+log4j.logger.org.alfresco.repo.search.Indexer=error
+#log4j.logger.org.alfresco.repo.search.Indexer=debug
+
+log4j.logger.org.alfresco.repo.search.impl.lucene.index=error
+log4j.logger.org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl=warn
+#log4j.logger.org.alfresco.repo.search.impl.lucene.index=DEBUG
+
+# Audit debugging
+# log4j.logger.org.alfresco.repo.audit=DEBUG
+# log4j.logger.org.alfresco.repo.audit.model=DEBUG
+
+# Property sheet and modelling debugging
+# change to error to hide the warnings about missing properties and associations
+log4j.logger.alfresco.missingProperties=warn
+
+# Dictionary/Model debugging
+log4j.logger.org.alfresco.repo.dictionary=warn
+log4j.logger.org.alfresco.repo.dictionary.types.period=warn
+
+# Virtualization Server Registry
+log4j.logger.org.alfresco.mbeans.VirtServerRegistry=error
+
+# Spring context runtime property setter
+log4j.logger.org.alfresco.util.RuntimeSystemPropertiesSetter=info
+
+# Debugging options for clustering
+log4j.logger.org.alfresco.repo.content.ReplicatingContentStore=error
+log4j.logger.org.alfresco.repo.content.replication=error
+
+#log4j.logger.org.alfresco.repo.deploy.DeploymentServiceImpl=debug
+
+# Activity service
+log4j.logger.org.alfresco.repo.activities=warn
+
+# User usage tracking
+log4j.logger.org.alfresco.repo.usage=info
+
+# Sharepoint
+log4j.logger.org.alfresco.module.vti=info
+
+# Forms Engine
+log4j.logger.org.alfresco.web.config.forms=info
+log4j.logger.org.alfresco.web.scripts.forms=info
+
+# CMIS
+log4j.logger.org.alfresco.opencmis=error
+log4j.logger.org.alfresco.opencmis.AlfrescoCmisServiceInterceptor=error
+log4j.logger.org.alfresco.cmis=error
+log4j.logger.org.alfresco.cmis.dictionary=warn
+log4j.logger.org.apache.chemistry.opencmis=info
+log4j.logger.org.apache.chemistry.opencmis.server.impl.browser.CmisBrowserBindingServlet=OFF
+log4j.logger.org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet=OFF
+
+# IMAP
+log4j.logger.org.alfresco.repo.imap=info
+
+# JBPM
+# Note: non-fatal errors (eg. logged during job execution) should be handled by Alfresco's retrying transaction handler
+log4j.logger.org.jbpm.graph.def.GraphElement=fatal
+
+#log4j.logger.org.alfresco.repo.googledocs=debug
+
+
+# Web Framework
+log4j.logger.org.springframework.extensions.webscripts=info
+log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=warn
+log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=off
+
+# Repository
+log4j.logger.org.alfresco.repo.web.scripts=warn
+log4j.logger.org.alfresco.repo.web.scripts.BaseWebScriptTest=info
+log4j.logger.org.alfresco.repo.web.scripts.AlfrescoRhinoScriptDebugger=off
+log4j.logger.org.alfresco.repo.jscript=error
+log4j.logger.org.alfresco.repo.jscript.ScriptLogger=warn
+log4j.logger.org.alfresco.repo.cmis.rest.CMISTest=info
+
+log4j.logger.org.alfresco.repo.domain.schema.script.ScriptBundleExecutorImpl=off
+log4j.logger.org.alfresco.repo.domain.schema.script.ScriptExecutorImpl=info
+
+log4j.logger.org.alfresco.repo.search.impl.solr.facet.SolrFacetServiceImpl=info
+
+# Bulk Filesystem Import Tool
+log4j.logger.org.alfresco.repo.bulkimport=warn
+
+# Freemarker
+# Note the freemarker.runtime logger is used to log non-fatal errors that are handled by Alfresco's retrying transaction handler
+log4j.logger.freemarker.runtime=
+
+# Metadata extraction
+log4j.logger.org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter=warn
+
+# Reduces PDFont error level due to ALF-7105
+log4j.logger.org.apache.pdfbox.pdmodel.font.PDSimpleFont=fatal
+log4j.logger.org.apache.pdfbox.pdmodel.font.PDFont=fatal
+log4j.logger.org.apache.pdfbox.pdmodel.font.PDCIDFont=fatal
+
+# no index support
+log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexIndexer=fatal
+log4j.logger.org.alfresco.repo.search.impl.noindex.NoIndexSearchService=fatal
+
+# lucene index warnings
+log4j.logger.org.alfresco.repo.search.impl.lucene.index.IndexInfo=warn
+
+# Warn about RMI socket bind retries.
+log4j.logger.org.alfresco.util.remote.server.socket.HostConfigurableSocketFactory=warn
+
+log4j.logger.org.alfresco.repo.usage.RepoUsageMonitor=info
+
+# Authorization
+log4j.logger.org.alfresco.enterprise.repo.authorization.AuthorizationService=info
+log4j.logger.org.alfresco.enterprise.repo.authorization.AuthorizationsConsistencyMonitor=warn
+
+#-----------------------------------------------------------------------
+# Platform module logging
+#-----------------------------------------------------------------------
+log4j.logger.com.inteligr8.alfresco.module.alfmarkdown=debug
+
+
+
diff --git a/platform-docker/src/main/docker/disable-webscript-caching-context.xml b/platform-docker/src/main/docker/disable-webscript-caching-context.xml
new file mode 100644
index 0000000..07829ea
--- /dev/null
+++ b/platform-docker/src/main/docker/disable-webscript-caching-context.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+ javascript
+
+
+ js
+
+
+
+ false
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+ ${spaces.store}
+
+
+ ${spaces.company_home.childname}
+
+
+
+
+
diff --git a/platform-docker/src/main/docker/hotswap-agent.properties b/platform-docker/src/main/docker/hotswap-agent.properties
new file mode 100644
index 0000000..f5bb23a
--- /dev/null
+++ b/platform-docker/src/main/docker/hotswap-agent.properties
@@ -0,0 +1,48 @@
+# Enable hotswap so that changes in this module will be automatically reloaded
+# Watch for changed class files on watchResources path and reload class definition in the running application.
+autoHotswap=true
+#autoHotswap.port=8000
+
+# Add a directory prior to application classpath (load classes and resources).
+#
+# This may be useful for example in multi module maven project to load class changes from upstream project
+# classes. Set extraClasspath to upstream project compiler output and .class file will have precedence to
+# classes from built JAR file.
+# i.e. monitor /target/classes
+# should work with extraClasspath=${project.build.outputDirectory}
+# If not try
+extraClasspath=/usr/local/tomcat/hotswap-agent
+
+# Comma separated list of disabled plugins
+# Use plugin name - e.g.
+# Hotswapper, AnonymousClassPatch, WatchResources, Hibernate, Spring, Jersey2, Jetty, Tomcat,
+# ZK, Logback, JSF, Seam, ELResolver, OsgiEquinox, Proxy, WebObjects, Weld, JBossModules, Resteasy, Gae
+disabledPlugins=Hibernate,Spring
+
+# Add a directory prior to webapp path (load webapp resources).
+#
+# Load web application resources (such as HTML, JSP, CSS, ...) from this directory prior to default processing.
+# Use this setting to set to serve resources from source directory directly (e.g. src/main/webapp).
+extraWebappContext=/usr/local/tomcat/hotswap-agent/alfmarkdown-platform/target/classes/META-INF/resources;
+
+# Load static web resources from different directory.
+#
+# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...)
+webappDir=/usr/local/tomcat/hotswap-agent/alfmarkdown-platform/target/classes/META-INF/resources;
+
+# Watch for changes in a directory (resources only).
+#
+# Similar to extraClasspath this property adds classpath when searching for resources (not classes).
+# While extra classpath just modifies the classloader, this setting does nothing until the resource
+# is really changed.
+#
+# Sometimes it is not possible to point extraClasspath to your i.e. src/main/resources, because there are multiple
+# replacements of resources in a building step (maven filtering resource option).
+# This setting will leave i.e. src/target/classes as default source for resources, but after the resource is modified
+# in src/main/resources, the new changed resource is served instead.
+# watchResources=
+
+LOGGER.org.hotswap.agent=DEBUG
+#LOGGER.org.hotswap.agent.plugin=TRACE
+#LOGGER.org.hotswap.agent.watch=TRACE
+#LOGGER.org.hotswap.agent.command=TRACE
\ No newline at end of file
diff --git a/platform-docker/src/main/docker/license/README.md b/platform-docker/src/main/docker/license/README.md
new file mode 100644
index 0000000..996f1bd
--- /dev/null
+++ b/platform-docker/src/main/docker/license/README.md
@@ -0,0 +1,6 @@
+# Enterprise License location
+
+Put the Alfresco Enterprise license file in this directory.
+It will then be copied into the ACS container in the
+$TOMCAT_DIR/WEB-INF/classes/alfresco/extension/license directory.
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..56ee3b1
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,451 @@
+
+
+
+ 4.0.0
+ com.inteligr8.alfresco.module
+ alfmarkdown
+ 1.0-SNAPSHOT
+ Markdown AIO
+ All-In-One (AIO) project for SDK 4.0
+ pom
+
+
+ 3.3.0
+
+
+
+
+ 4.1.0
+ UTF-8
+
+
+ org.alfresco
+ acs-community-packaging
+ 6.2.0-ea
+ 6.2.0
+
+
+ alfresco/alfresco-content-repository-community
+ alfresco/alfresco-share
+
+
+ 1.1.8
+
+
+ 8280
+ 8180
+ 9898
+ alfmarkdown-acs
+ 8080
+ 8888
+ 5555
+
+
+
+
+
+
+
+
+
+
+ junit
+ junit
+ test
+
+
+ org.mockito
+ mockito-all
+ 1.9.5
+ test
+
+
+ org.apache.httpcomponents
+ httpclient
+ test
+
+
+
+
+ ${alfresco.groupId}
+ alfresco-remote-api
+ provided
+
+
+
+
+ org.alfresco.maven
+ alfresco-rad
+ ${alfresco.sdk.version}
+ test
+
+
+
+
+
+
+ ${alfresco.groupId}
+ ${alfresco.bomDependencyArtifactId}
+ ${alfresco.platform.version}
+ pom
+ import
+
+
+
+
+ ${alfresco.groupId}
+ share
+ ${alfresco.share.version}
+ war
+ provided
+
+
+ ${alfresco.groupId}
+ share
+ ${alfresco.share.version}
+ classes
+ provided
+
+
+ ${alfresco.groupId}
+ alfresco-web-framework-commons
+ ${alfresco.share.version}
+ classes
+ provided
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.1.0
+
+ UTF-8
+
+
+ ftl
+ acp
+ svg
+ pdf
+ doc
+ docx
+ xls
+ xlsx
+ ppt
+ pptx
+ bin
+ lic
+ swf
+ zip
+ msg
+ jar
+ ttf
+ eot
+ woff
+ woff2
+ css
+ ico
+ psd
+ js
+
+
+
+
+ org.zeroturnaround
+ jrebel-maven-plugin
+ ${jrebel.version}
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.1.0
+
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+ 3.0.0-M1
+
+
+ integration-test
+ integration-test
+
+ integration-test
+
+
+
+ verify-test
+ verify
+
+ verify
+
+
+
+
+
+ org.apache.maven.surefire
+ surefire-junit47
+ 3.0.0-M1
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.1.1
+
+
+
+
+
+
+
+ src/main/resources
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ false
+
+
+
+
+ copy-and-filter-docker-resources
+ validate
+
+ copy-resources
+
+
+ ${project.build.outputDirectory}/docker
+
+
+ docker
+ true
+
+
+
+
+
+
+
+
+
+ net.alchim31.maven
+ yuicompressor-maven-plugin
+ 1.5.1
+
+
+
+ compress-assembly
+
+ compress
+
+
+ ${project.basedir}/src/main/assembly/web
+ ${project.basedir}/src/main/assembly/web
+
+ **/webscripts/**
+ **/site-webscripts/**
+ **/META-INF/**
+ **/*.lib.js
+ **/*.css
+ **/*-min.js
+ **/*-min.css
+
+ true
+ false
+
+
+
+
+
+ compress-resources
+
+ compress
+
+
+
+ **/webscripts/**
+ **/site-webscripts/**
+ **/*.lib.js
+ **/*.css
+ **/*-min.js
+ **/*-min.css
+
+ true
+ false
+
+
+
+
+
+
+
+
+
+ java8
+
+ [1.8,11.0)
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.0
+
+ 1.8
+ 1.8
+
+
+
+
+
+
+ java11
+
+ [11.0,)
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.0
+
+ 11
+
+
+
+
+
+
+ jrebel
+
+
+
+
+ org.zeroturnaround
+ jrebel-maven-plugin
+
+
+ generate-rebel-xml
+ process-resources
+
+ generate
+
+
+
+
+
+
+ all
+
+
+ ${project.build.outputDirectory}
+ ${project.build.testOutputDirectory}
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+ integration-tests
+ repo
+ platform-docker
+ share
+ share-docker
+
+
+
+
+ inteligr8-releases
+ http://repos.yateslong.us/nexus/repository/inteligr8-private
+
+
+ inteligr8-snapshots
+ http://repos.yateslong.us/nexus/repository/inteligr8-snapshots
+
+
+
+
+
+
+ alfresco-public
+ https://artifacts.alfresco.com/nexus/content/groups/public
+
+
+
+
+
+ alfresco-plugin-public
+ https://artifacts.alfresco.com/nexus/content/groups/public
+
+
+
+
diff --git a/repo/pom.xml b/repo/pom.xml
new file mode 100644
index 0000000..b7eab5d
--- /dev/null
+++ b/repo/pom.xml
@@ -0,0 +1,31 @@
+
+
+ 4.0.0
+ alfmarkdown-platform
+ Alfresco Platform/Repository JAR Module
+ Platform/Repo JAR Module (to be included in the alfresco.war) - part of AIO - SDK 4.0
+
+ jar
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+
+
+
diff --git a/repo/src/main/assembly/amp.xml b/repo/src/main/assembly/amp.xml
new file mode 100644
index 0000000..097775f
--- /dev/null
+++ b/repo/src/main/assembly/amp.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ build-amp-file
+
+
+ amp
+
+
+ false
+
+
+
+
+ src/main/resources/alfresco/module/${project.artifactId}/module.properties
+ true
+
+
+
+ src/main/assembly/file-mapping.properties
+ false
+
+
+
+ src/main/resources/alfresco/module/${project.artifactId}/log4j.properties
+ false
+
+
+
+
+
+
+ src/main/assembly/web
+ web
+ true
+
+ README.md
+
+
+
+
+
+
+
+ lib
+
+
+
+
\ No newline at end of file
diff --git a/repo/src/main/assembly/file-mapping.properties b/repo/src/main/assembly/file-mapping.properties
new file mode 100644
index 0000000..501b3d6
--- /dev/null
+++ b/repo/src/main/assembly/file-mapping.properties
@@ -0,0 +1,27 @@
+# Custom AMP to WAR location mappings
+
+#
+# The following property can be used to include the standard set of mappings.
+# The contents of this file will override any defaults. The default is
+# 'true', i.e. the default mappings will be augmented or modified by values in
+# this file.
+#
+# Default mappings are:
+#
+# /config=/WEB-INF/classes
+# /lib=/WEB-INF/lib
+# /licenses=/WEB-INF/licenses
+# /web/jsp=/jsp
+# /web/css=/css
+# /web/images=/images
+# /web/scripts=/scripts
+# /web/php=/php
+#
+include.default=true
+
+#
+# Custom mappings. If 'include.default' is false, then this is the complete set.
+# Map /web to / in AMP so we can override things like favicon.ico
+#
+/web=/
+
diff --git a/repo/src/main/assembly/web/README.md b/repo/src/main/assembly/web/README.md
new file mode 100644
index 0000000..e3b1a7c
--- /dev/null
+++ b/repo/src/main/assembly/web/README.md
@@ -0,0 +1,22 @@
+# Web resources that should override out-of-the-box files
+
+Put here any web resources that should override out-of-the-box
+web resources, such as favicon.ico. They will then end up in the
+*/web* directory in the AMP, and applied to the WAR, and override
+any existing web resources in the Alfresco.WAR.
+
+**Note**. Module dependency needs to be set to amp for the web resources to be applied by MMT:
+
+`
+
+ ${project.groupId}
+ some-platform
+ ${project.version}
+ amp
+
+`
+
+**Important**. New web resources should not be located here, but instead
+ in the usual place in the *src/main/resources/META-INF/resources* directory.
+
+
diff --git a/repo/src/main/resources/alfresco/extension/mdpreview-context.xml b/repo/src/main/resources/alfresco/extension/mdpreview-context.xml
deleted file mode 100644
index c948467..0000000
--- a/repo/src/main/resources/alfresco/extension/mdpreview-context.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
diff --git a/repo/src/main/resources/alfresco/module/alfmarkdown-platform/alfresco-global.properties b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/alfresco-global.properties
new file mode 100644
index 0000000..e69de29
diff --git a/repo/src/main/resources/alfresco/module/alfmarkdown-platform/log4j.properties b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/log4j.properties
new file mode 100644
index 0000000..ea6da12
--- /dev/null
+++ b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/log4j.properties
@@ -0,0 +1,2 @@
+log4j.logger.com.parashift.mdpreview=info
+log4j.logger.com.inteligr8.alfresco.model.alfmarkdown=info
diff --git a/repo/src/main/resources/alfresco/module/alfmarkdown-platform/model/mta-model.xml b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/model/mta-model.xml
new file mode 100644
index 0000000..550d502
--- /dev/null
+++ b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/model/mta-model.xml
@@ -0,0 +1,123 @@
+
+
+
+ MTA Data Model
+ Brian Long
+ 1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Communications
+ Onboard
+ Safety
+ System Engineering
+ Test and Commissioning - 1 SAT
+ Test and Commissioning - 2 FAT
+ Training
+
+
+
+
+
+
+
+ MTA Submittal
+
+
+ Name
+ d:text
+ true
+
+ false
+ false
+
+
+
+ Document #
+ d:int
+ true
+
+ false
+ false
+
+
+
+ Revision #
+ d:text
+ false
+
+ true
+ true
+
+
+
+ Status Summary #
+ d:text
+ false
+
+ true
+ true
+
+
+
+
+
+ MTA PTC Document
+
+
+ Equipment Category
+ d:text
+ false
+
+ true
+ false
+
+
+
+ CDRL #
+ d:text
+ false
+
+ false
+ false
+
+
+
+ WG
+ d:text
+ true
+
+ false
+ true
+
+
+
+
+
+
+
+ mta:submittal
+
+
+
+
+
\ No newline at end of file
diff --git a/repo/src/main/resources/alfresco/module/alfmarkdown-platform/module-context.xml b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/module-context.xml
new file mode 100644
index 0000000..8828556
--- /dev/null
+++ b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/module-context.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/repo/src/main/resources/alfresco/module/alfmarkdown-platform/module.properties b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/module.properties
new file mode 100644
index 0000000..37d3a5c
--- /dev/null
+++ b/repo/src/main/resources/alfresco/module/alfmarkdown-platform/module.properties
@@ -0,0 +1,5 @@
+module.id=${project.artifactId}
+#module.aliases=myModule-123, my-module
+module.title=${project.name}
+module.description=${project.description}
+module.version=${project.version}
diff --git a/run.bat b/run.bat
new file mode 100644
index 0000000..c52da13
--- /dev/null
+++ b/run.bat
@@ -0,0 +1,127 @@
+@ECHO OFF
+
+SET COMPOSE_FILE_PATH=%CD%\target\classes\docker\docker-compose.yml
+
+IF [%M2_HOME%]==[] (
+ SET MVN_EXEC=mvn
+)
+
+IF NOT [%M2_HOME%]==[] (
+ SET MVN_EXEC=%M2_HOME%\bin\mvn
+)
+
+IF [%1]==[] (
+ echo "Usage: %0 {build_start|build_start_it_supported|start|stop|purge|tail|reload_share|reload_acs|build_test|test}"
+ GOTO END
+)
+
+IF %1==build_start (
+ CALL :down
+ CALL :build
+ CALL :start
+ CALL :tail
+ GOTO END
+)
+IF %1==build_start_it_supported (
+ CALL :down
+ CALL :build
+ CALL :prepare-test
+ CALL :start
+ CALL :tail
+ GOTO END
+)
+IF %1==start (
+ CALL :start
+ CALL :tail
+ GOTO END
+)
+IF %1==stop (
+ CALL :down
+ GOTO END
+)
+IF %1==purge (
+ CALL:down
+ CALL:purge
+ GOTO END
+)
+IF %1==tail (
+ CALL :tail
+ GOTO END
+)
+IF %1==reload_share (
+ CALL :build_share
+ CALL :start_share
+ CALL :tail
+ GOTO END
+)
+IF %1==reload_acs (
+ CALL :build_acs
+ CALL :start_acs
+ CALL :tail
+ GOTO END
+)
+IF %1==build_test (
+ CALL :down
+ CALL :build
+ CALL :prepare-test
+ CALL :start
+ CALL :test
+ CALL :tail_all
+ CALL :down
+ GOTO END
+)
+IF %1==test (
+ CALL :test
+ GOTO END
+)
+echo "Usage: %0 {build_start|start|stop|purge|tail|reload_share|reload_acs|build_test|test}"
+:END
+EXIT /B %ERRORLEVEL%
+
+:start
+ docker volume create alfmarkdown-acs-volume
+ docker volume create alfmarkdown-db-volume
+ docker volume create alfmarkdown-ass-volume
+ docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d
+EXIT /B 0
+:start_share
+ docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d alfmarkdown-share
+EXIT /B 0
+:start_acs
+ docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d alfmarkdown-acs
+EXIT /B 0
+:down
+ if exist "%COMPOSE_FILE_PATH%" (
+ docker-compose -f "%COMPOSE_FILE_PATH%" down
+ )
+EXIT /B 0
+:build
+ call %MVN_EXEC% clean package
+EXIT /B 0
+:build_share
+ docker-compose -f "%COMPOSE_FILE_PATH%" kill alfmarkdown-share
+ docker-compose -f "%COMPOSE_FILE_PATH%" rm -f alfmarkdown-share
+ call %MVN_EXEC% clean package -pl alfmarkdown-share,alfmarkdown-share-docker
+EXIT /B 0
+:build_acs
+ docker-compose -f "%COMPOSE_FILE_PATH%" kill alfmarkdown-acs
+ docker-compose -f "%COMPOSE_FILE_PATH%" rm -f alfmarkdown-acs
+ call %MVN_EXEC% clean package -pl alfmarkdown-integration-tests,alfmarkdown-platform,alfmarkdown-platform-docker
+EXIT /B 0
+:tail
+ docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
+EXIT /B 0
+:tail_all
+ docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
+EXIT /B 0
+:prepare-test
+ call %MVN_EXEC% verify -DskipTests=true -pl alfmarkdown-platform,alfmarkdown-integration-tests,alfmarkdown-platform-docker
+EXIT /B 0
+:test
+ call %MVN_EXEC% verify -pl alfmarkdown-platform,alfmarkdown-integration-tests
+EXIT /B 0
+:purge
+ docker volume rm -f alfmarkdown-acs-volume
+ docker volume rm -f alfmarkdown-db-volume
+ docker volume rm -f alfmarkdown-ass-volume
+EXIT /B 0
\ No newline at end of file
diff --git a/run.sh b/run.sh
new file mode 100644
index 0000000..d893e33
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+export COMPOSE_FILE_PATH="${PWD}/target/classes/docker/docker-compose.yml"
+
+if [ -z "${M2_HOME}" ]; then
+ export MVN_EXEC="mvn"
+else
+ export MVN_EXEC="${M2_HOME}/bin/mvn"
+fi
+
+start() {
+ docker volume create alfmarkdown-acs-volume
+ docker volume create alfmarkdown-db-volume
+ docker volume create alfmarkdown-ass-volume
+ docker-compose -f "$COMPOSE_FILE_PATH" up --build -d
+}
+
+start_share() {
+ docker-compose -f "$COMPOSE_FILE_PATH" up --build -d alfmarkdown-share
+}
+
+start_acs() {
+ docker-compose -f "$COMPOSE_FILE_PATH" up --build -d alfmarkdown-acs
+}
+
+down() {
+ if [ -f "$COMPOSE_FILE_PATH" ]; then
+ docker-compose -f "$COMPOSE_FILE_PATH" down
+ fi
+}
+
+purge() {
+ docker volume rm -f alfmarkdown-acs-volume
+ docker volume rm -f alfmarkdown-db-volume
+ docker volume rm -f alfmarkdown-ass-volume
+}
+
+build() {
+ $MVN_EXEC clean package
+}
+
+build_share() {
+ docker-compose -f "$COMPOSE_FILE_PATH" kill alfmarkdown-share
+ yes | docker-compose -f "$COMPOSE_FILE_PATH" rm -f alfmarkdown-share
+ $MVN_EXEC clean package -pl alfmarkdown-share,alfmarkdown-share-docker
+}
+
+build_acs() {
+ docker-compose -f "$COMPOSE_FILE_PATH" kill alfmarkdown-acs
+ yes | docker-compose -f "$COMPOSE_FILE_PATH" rm -f alfmarkdown-acs
+ $MVN_EXEC clean package -pl alfmarkdown-integration-tests,alfmarkdown-platform,alfmarkdown-platform-docker
+}
+
+tail() {
+ docker-compose -f "$COMPOSE_FILE_PATH" logs -f
+}
+
+tail_all() {
+ docker-compose -f "$COMPOSE_FILE_PATH" logs --tail="all"
+}
+
+prepare_test() {
+ $MVN_EXEC verify -DskipTests=true -pl alfmarkdown-platform,alfmarkdown-integration-tests,alfmarkdown-platform-docker
+}
+
+test() {
+ $MVN_EXEC verify -pl alfmarkdown-platform,alfmarkdown-integration-tests
+}
+
+case "$1" in
+ build_start)
+ down
+ build
+ start
+ tail
+ ;;
+ build_start_it_supported)
+ down
+ build
+ prepare_test
+ start
+ tail
+ ;;
+ start)
+ start
+ tail
+ ;;
+ stop)
+ down
+ ;;
+ purge)
+ down
+ purge
+ ;;
+ tail)
+ tail
+ ;;
+ reload_share)
+ build_share
+ start_share
+ tail
+ ;;
+ reload_acs)
+ build_acs
+ start_acs
+ tail
+ ;;
+ build_test)
+ down
+ build
+ prepare_test
+ start
+ test
+ tail_all
+ down
+ ;;
+ test)
+ test
+ ;;
+ *)
+ echo "Usage: $0 {build_start|build_start_it_supported|start|stop|purge|tail|reload_share|reload_acs|build_test|test}"
+esac
\ No newline at end of file
diff --git a/share-docker/pom.xml b/share-docker/pom.xml
new file mode 100644
index 0000000..cfb7a62
--- /dev/null
+++ b/share-docker/pom.xml
@@ -0,0 +1,73 @@
+
+
+ 4.0.0
+ alfmarkdown-share-docker
+ Alfresco Share Docker Module
+ Share Docker Module to generate the final Docker image
+ jar
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown-share
+ ${project.version}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+
+ collect-extensions
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/extensions
+ runtime
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+
+
+ copy-and-filter-docker-resources
+ validate
+
+ copy-resources
+
+
+ ${project.build.directory}
+
+
+ src/main/docker
+ true
+
+
+
+
+
+
+
+
+
diff --git a/share-docker/src/main/docker/Dockerfile b/share-docker/src/main/docker/Dockerfile
new file mode 100644
index 0000000..6b43fb2
--- /dev/null
+++ b/share-docker/src/main/docker/Dockerfile
@@ -0,0 +1,16 @@
+FROM ${docker.share.image}:${alfresco.share.version}
+
+ARG TOMCAT_DIR=/usr/local/tomcat
+
+# Copy Dockerfile to avoid an error if no JARs exist
+COPY Dockerfile extensions/*.jar $TOMCAT_DIR/webapps/share/WEB-INF/lib/
+
+# Copy Dockerfile to avoid an error if no AMPs exist
+COPY Dockerfile extensions/*.amp $TOMCAT_DIR/amps_share/
+RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
+ $TOMCAT_DIR/amps_share $TOMCAT_DIR/webapps/share -directory -nobackup -force
+
+COPY share-config-custom.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension
+
+COPY log4j.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
+COPY hotswap-agent.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
\ No newline at end of file
diff --git a/share-docker/src/main/docker/hotswap-agent.properties b/share-docker/src/main/docker/hotswap-agent.properties
new file mode 100644
index 0000000..fbb03ad
--- /dev/null
+++ b/share-docker/src/main/docker/hotswap-agent.properties
@@ -0,0 +1,49 @@
+# Enable hotswap so that changes in this module will be automatically reloaded
+# Watch for changed class files on watchResources path and reload class definition in the running application.
+autoHotswap=true
+#autoHotswap.port=8000
+
+# Add a directory prior to application classpath (load classes and resources).
+#
+# This may be useful for example in multi module maven project to load class changes from upstream project
+# classes. Set extraClasspath to upstream project compiler output and .class file will have precedence to
+# classes from built JAR file.
+# i.e. monitor /target/classes
+# should work with extraClasspath=${project.build.outputDirectory}
+# If not try
+extraClasspath=/usr/local/tomcat/hotswap-agent
+
+
+# Comma separated list of disabled plugins
+# Use plugin name - e.g.
+# Hotswapper, AnonymousClassPatch, WatchResources, Hibernate, Spring, Jersey2, Jetty, Tomcat,
+# ZK, Logback, JSF, Seam, ELResolver, OsgiEquinox, Proxy, WebObjects, Weld, JBossModules, Resteasy, Gae
+disabledPlugins=Hibernate,Spring
+
+# Add a directory prior to webapp path (load webapp resources).
+#
+# Load web application resources (such as HTML, JSP, CSS, ...) from this directory prior to default processing.
+# Use this setting to set to serve resources from source directory directly (e.g. src/main/webapp).
+extraWebappContext=/usr/local/tomcat/hotswap-agent/alfmarkdown-share/target/classes/META-INF/resources;
+
+# Load static web resources from different directory.
+#
+# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...)
+webappDir=/usr/local/tomcat/hotswap-agent/alfmarkdown-share/target/classes/META-INF/resources;
+
+# Watch for changes in a directory (resources only).
+#
+# Similar to extraClasspath this property adds classpath when searching for resources (not classes).
+# While extra classpath just modifies the classloader, this setting does nothing until the resource
+# is really changed.
+#
+# Sometimes it is not possible to point extraClasspath to your i.e. src/main/resources, because there are multiple
+# replacements of resources in a building step (maven filtering resource option).
+# This setting will leave i.e. src/target/classes as default source for resources, but after the resource is modified
+# in src/main/resources, the new changed resource is served instead.
+# watchResources=
+
+LOGGER.org.hotswap.agent=DEBUG
+#LOGGER.org.hotswap.agent.plugin=TRACE
+#LOGGER.org.hotswap.agent.watch=TRACE
+#LOGGER.org.hotswap.agent.command=TRACE
\ No newline at end of file
diff --git a/share-docker/src/main/docker/log4j.properties b/share-docker/src/main/docker/log4j.properties
new file mode 100644
index 0000000..cfeca68
--- /dev/null
+++ b/share-docker/src/main/docker/log4j.properties
@@ -0,0 +1,54 @@
+# Set root logger level to error
+log4j.rootLogger=error, Console, File
+
+# Console appender definition #
+
+# All outputs currently set to be a ConsoleAppender.
+log4j.appender.Console=org.apache.log4j.ConsoleAppender
+log4j.appender.Console.layout=org.apache.log4j.PatternLayout
+
+# use log4j NDC to replace %x with tenant domain / username
+log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n
+#log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n
+
+# File appender definition #
+log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.File.File=share.log
+log4j.appender.File.Append=true
+log4j.appender.File.DatePattern='.'yyyy-MM-dd
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d{yyyy-MM-dd} %d{ABSOLUTE} %-5p [%c] [%t] %m%n
+
+# Spring
+log4j.logger.org.springframework=warn
+# Turn off Spring remoting warnings that should really be info or debug.
+log4j.logger.org.springframework.remoting.support=error
+log4j.logger.org.springframework.util=error
+
+# MyFaces
+log4j.logger.org.apache.myfaces.util.DebugUtils=info
+log4j.logger.org.apache.myfaces.el.VariableResolverImpl=error
+log4j.logger.org.apache.myfaces.application.jsp.JspViewHandlerImpl=error
+log4j.logger.org.apache.myfaces.taglib=error
+
+# Alfresco
+log4j.logger.org.alfresco=error
+log4j.logger.org.alfresco.config=warn
+log4j.logger.org.alfresco.config.JndiObjectFactoryBean=warn
+log4j.logger.org.alfresco.web=info
+
+# Web Framework
+log4j.logger.org.springframework.extensions.webscripts=info
+log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=warn
+log4j.logger.org.springframework.extensions.webscripts.ScriptDebugger=off
+
+# Freemarker
+# Note the freemarker.runtime logger is used to log non-fatal errors that are handled by Alfresco's retrying transaction handler
+log4j.logger.freemarker.runtime=
+
+#-----------------------------------------------------------------------
+# Custom Share module logging goes here...
+#-----------------------------------------------------------------------
+log4j.logger.com.inteligr8.alfresco.module.alfmarkdown=debug
+
+
diff --git a/share-docker/src/main/docker/share-config-custom.xml b/share-docker/src/main/docker/share-config-custom.xml
new file mode 100644
index 0000000..b926f2c
--- /dev/null
+++ b/share-docker/src/main/docker/share-config-custom.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+ production
+
+
+
+ false
+
+
+
+
+
+
+
+
+ true
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+ alfresco-noauth
+ Alfresco - unauthenticated access
+ Access to Alfresco Repository WebScripts that do not require authentication
+ alfresco
+ http://${acs.host}:8080/alfresco/s
+ none
+
+
+
+ alfresco
+ Alfresco - user access
+ Access to Alfresco Repository WebScripts that require user authentication
+ alfresco
+ http://${acs.host}:8080/alfresco/s
+ user
+
+
+
+ alfresco-feed
+ Alfresco Feed
+ Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet
+ http
+ http://${acs.host}:8080/alfresco/s
+ true
+ user
+
+
+
+ activiti-admin
+ Activiti Admin UI - user access
+ Access to Activiti Admin UI, that requires user authentication
+ activiti-admin-connector
+ http://${acs.host}:8080/alfresco/activiti-admin
+ user
+
+
+
+ alfresco-api
+ alfresco
+ Alfresco Public API - user access
+ Access to Alfresco Repository Public API that require user authentication.
+ This makes use of the authentication that is provided by parent 'alfresco' endpoint.
+ alfresco
+ http://${acs.host}:8080/alfresco/api
+ user
+
+
+
+
+
diff --git a/share/pom.xml b/share/pom.xml
new file mode 100644
index 0000000..3b88970
--- /dev/null
+++ b/share/pom.xml
@@ -0,0 +1,67 @@
+
+
+ 4.0.0
+ alfmarkdown-share
+ Alfresco Share JAR Module
+ jar
+ Sample Share JAR Module (to be included in the share.war) - part of AIO - SDK 4.0
+
+
+ com.inteligr8.alfresco.module
+ alfmarkdown
+ 1.0-SNAPSHOT
+
+
+
+
+
+
+
+
+ ${alfresco.groupId}
+ share
+ classes
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+
+
+ net.alchim31.maven
+ yuicompressor-maven-plugin
+ 1.5.1
+
+
+ compress-resources
+
+ compress
+
+
+
+ **/webscripts/**
+ **/site-webscripts/**
+ **/*.lib.js
+ **/*.css
+ **/*-min.js
+ **/*-min.css
+ **/showdown.js
+
+ true
+ false
+
+
+
+
+
+
+
+
diff --git a/share/src/main/assembly/amp.xml b/share/src/main/assembly/amp.xml
new file mode 100644
index 0000000..9917d7b
--- /dev/null
+++ b/share/src/main/assembly/amp.xml
@@ -0,0 +1,66 @@
+
+
+
+
+ build-amp-file
+
+
+ amp
+
+
+ false
+
+
+
+
+ src/main/resources/alfresco/module/${project.artifactId}/module.properties
+ true
+
+
+
+ src/main/assembly/file-mapping.properties
+ false
+
+
+
+ src/main/resources/alfresco/module/${project.artifactId}/log4j.properties
+ false
+
+
+
+
+
+
+ src/main/assembly/web
+ web
+ true
+
+ README.md
+
+
+
+
+
+
+
+ lib
+
+
+
+
\ No newline at end of file
diff --git a/share/src/main/assembly/file-mapping.properties b/share/src/main/assembly/file-mapping.properties
new file mode 100644
index 0000000..501b3d6
--- /dev/null
+++ b/share/src/main/assembly/file-mapping.properties
@@ -0,0 +1,27 @@
+# Custom AMP to WAR location mappings
+
+#
+# The following property can be used to include the standard set of mappings.
+# The contents of this file will override any defaults. The default is
+# 'true', i.e. the default mappings will be augmented or modified by values in
+# this file.
+#
+# Default mappings are:
+#
+# /config=/WEB-INF/classes
+# /lib=/WEB-INF/lib
+# /licenses=/WEB-INF/licenses
+# /web/jsp=/jsp
+# /web/css=/css
+# /web/images=/images
+# /web/scripts=/scripts
+# /web/php=/php
+#
+include.default=true
+
+#
+# Custom mappings. If 'include.default' is false, then this is the complete set.
+# Map /web to / in AMP so we can override things like favicon.ico
+#
+/web=/
+
diff --git a/share/src/main/assembly/web/README.md b/share/src/main/assembly/web/README.md
new file mode 100644
index 0000000..0901911
--- /dev/null
+++ b/share/src/main/assembly/web/README.md
@@ -0,0 +1,22 @@
+# Web resources that should override out-of-the-box files
+
+Put here any web resources that should override out-of-the-box
+web resources, such as favicon.ico. They will then end up in the
+*/web* directory in the AMP, and applied to the WAR, and override
+any existing web resources in the Share.WAR.
+
+**Note**. Module dependency needs to be set to amp for the web resources to be applied by MMT:
+
+`
+
+ ${project.groupId}
+ some-share
+ ${project.version}
+ amp
+
+`
+
+**Important**. New web resources should not be located here, but instead
+ in the usual place in the *src/main/resources/META-INF/resources//* directory.
+
+
diff --git a/share/src/main/resources/alfresco/module/alfmarkdown-share/log4j.properties b/share/src/main/resources/alfresco/module/alfmarkdown-share/log4j.properties
new file mode 100644
index 0000000..52cc525
--- /dev/null
+++ b/share/src/main/resources/alfresco/module/alfmarkdown-share/log4j.properties
@@ -0,0 +1,2 @@
+log4j.logger.com.parashift.markdown=info
+log4j.logger.com.inteligr8.alfresco.module.alfmarkdown=info
diff --git a/share/src/main/resources/alfresco/module/alfmarkdown-share/module.properties b/share/src/main/resources/alfresco/module/alfmarkdown-share/module.properties
new file mode 100644
index 0000000..1cb0c23
--- /dev/null
+++ b/share/src/main/resources/alfresco/module/alfmarkdown-share/module.properties
@@ -0,0 +1,4 @@
+module.id=${project.artifactId}
+module.title=${project.name}
+module.description=${project.description}
+module.version=${project.version}