wrapped in the Alfresco SDK with new name

This commit is contained in:
Brian Long 2021-01-17 23:35:04 -05:00
parent 2a7a0f10ad
commit daffe7f54a
34 changed files with 2269 additions and 13 deletions

39
.gitignore vendored
View File

@ -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

66
docker/docker-compose.yml Normal file
View File

@ -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

85
integration-tests/pom.xml Normal file
View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfmarkdown-integration-tests</artifactId>
<name>Integration Tests Module</name>
<description>Integration Tests module for in-container integration testing - part of AIO - SDK 4.0</description>
<packaging>jar</packaging> <!-- Note. this just runs Integration Tests, but it needs to be a JAR otherwise
nothing is compiled (i.e. you cannot set it to pom) -->
<parent>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
</properties>
<dependencies>
<!-- Bring in any custom module that should be tested, by default we bring in the Platform JAR module
that is generated for the AIO project -->
<dependency>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown-platform</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<!-- Make sure we attach the tests so we can include them when running -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests, any class that follows naming convention
"**/IT*.java", "**/*IT.java", and "**/*ITCase.java" will be considered an integration test -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<acs.endpoint.path>${test.acs.endpoint.path}</acs.endpoint.path>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jrebel-it</id>
<build>
<plugins>
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<configuration>
<rebelXmlDirectory>${project.build.testOutputDirectory}</rebelXmlDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

118
platform-docker/pom.xml Normal file
View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfmarkdown-platform-docker</artifactId>
<name>Alfresco Platform/Repository Docker Module</name>
<description>Platform/Repo Docker Module to generate the final Docker image</description>
<packaging>jar</packaging>
<parent>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown-platform</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown-integration-tests</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Copy the repository extension and the dependencies required for execute integration tests -->
<execution>
<id>collect-test-artifacts</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<excludeScope>compile</excludeScope>
</configuration>
</execution>
<!-- Collect extensions (JARs or AMPs) declared in this module do be deployed to docker -->
<execution>
<id>collect-extensions</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
<!-- IMPORTANT: if using amp dependencies only, add <includeTypes>amp</includeTypes> -->
</configuration>
</execution>
</executions>
</plugin>
<!-- Filter the Dockerfile and the other files added to the container to be able to replace maven properties -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-and-filter-docker-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.jar</exclude>
<exclude>**/*.so</exclude>
<exclude>**/*.gz</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-and-filter-docker-resources-non-filtered</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>false</filtering>
<includes>
<include>**/*.jar</include>
<include>**/*.so</include>
<include>**/*.gz</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,63 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
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.
-->
<beans>
<!--
To support hot reloading of server side Javascript files in Share, we have to turn on development mode.
This setting will tell the Rhinoscript Processor not to compile and cache the JS files.
Cool, we can now change server side JS files and have the changes picked up,
without having to restart or refresh web scripts.
But… Due to a known bug in the Surf framework (ALF-9970) this will break the admin consoles in Share.
Override this bean and disable javascript compilation so that webscripts can be hot reloaded.
We have changed the 'compile' property from true to false.
-->
<bean id="javaScriptProcessor" class="org.alfresco.repo.jscript.RhinoScriptProcessor" init-method="register">
<property name="name">
<value>javascript</value>
</property>
<property name="extension">
<value>js</value>
</property>
<!-- Do not "compile javascript and cache compiled scripts" -->
<property name="compile">
<value>false</value>
</property>
<!-- allow sharing of sealed scopes for performance -->
<!-- disable to give each script it's own new scope which can be extended -->
<property name="shareSealedScopes">
<value>true</value>
</property>
<property name="scriptService">
<ref bean="scriptService"/>
</property>
<!-- Creates ScriptNodes which require the ServiceRegistry -->
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<property name="storePath">
<value>${spaces.company_home.childname}</value>
</property>
</bean>
</beans>

View File

@ -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

View File

@ -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.

451
pom.xml Normal file
View File

@ -0,0 +1,451 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Markdown AIO</name>
<description>All-In-One (AIO) project for SDK 4.0</description>
<packaging>pom</packaging>
<prerequisites>
<maven>3.3.0</maven>
</prerequisites>
<properties>
<!-- Alfresco Maven Plugin version to use -->
<alfresco.sdk.version>4.1.0</alfresco.sdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Properties used in dependency declarations, you don't need to change
these -->
<alfresco.groupId>org.alfresco</alfresco.groupId>
<alfresco.bomDependencyArtifactId>acs-community-packaging</alfresco.bomDependencyArtifactId>
<alfresco.platform.version>6.2.0-ea</alfresco.platform.version>
<alfresco.share.version>6.2.0</alfresco.share.version>
<!-- Docker images -->
<docker.acs.image>alfresco/alfresco-content-repository-community</docker.acs.image>
<docker.share.image>alfresco/alfresco-share</docker.share.image>
<!-- JRebel Hot reloading of classpath stuff and web resource stuff -->
<jrebel.version>1.1.8</jrebel.version>
<!-- Environment configuration properties -->
<adw.port>8280</adw.port>
<share.port>8180</share.port>
<share.debug.port>9898</share.debug.port>
<acs.host>alfmarkdown-acs</acs.host>
<acs.port>8080</acs.port>
<acs.debug.port>8888</acs.debug.port>
<postgres.port>5555</postgres.port>
<!-- This parameter is only required for those cases in which ACS is not
exposed in http://localhost:8080/alfresco (i.e. Windows Docker) -->
<test.acs.endpoint.path />
</properties>
<!-- Libs used in Unit and Integration tests -->
<!-- IMPORTANT - Test dependencies need to be here in the top parent POM
as the Alfresco Maven IT Mojo runs as part of the parent project ... -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<scope>test</scope>
</dependency>
<!-- The main Alfresco Repo dependency for compiling Java code in src/main/java -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-remote-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Bring in Alfresco RAD so we get access to AlfrescoTestRunner classes -->
<dependency>
<groupId>org.alfresco.maven</groupId>
<artifactId>alfresco-rad</artifactId>
<version>${alfresco.sdk.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!-- This will import the dependencyManagement for all artifacts in the
selected Alfresco platform. NOTE: You still need to define dependencies in
your POM, but you can omit version as it's enforced by this dependencyManagement.
NOTE: It defaults to the latest version this SDK pom has been tested with,
but alfresco version can/should be overridden in your project's pom -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>${alfresco.bomDependencyArtifactId}</artifactId>
<version>${alfresco.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Redefine the following Share dependencies as they have different
version numbers than platform. They are defined in alfresco-platform-distribution... -->
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<version>${alfresco.share.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<version>${alfresco.share.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-web-framework-commons</artifactId>
<version>${alfresco.share.version}</version>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!-- Build an AMP if 3rd party libs are needed by the extensions JARs
are the default artifact produced in your modules, if you want to build an
amp for each module you have to enable this plugin and inspect the src/main/assembly.xml
file if you want to customize the layout of your AMP. The end result is that
Maven will produce both a JAR file and an AMP with your module. -->
<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>build-amp-file</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptor>src/main/assembly/amp.xml</descriptor>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>alfresco-maven-plugin</artifactId>
<version>${alfresco.sdk.version}</version>
</dependency>
</dependencies>
</plugin>
-->
<!-- Filter resources in any sub-project with this config -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<!-- jpg, jpeg, gif, bmp and png are added automatically -->
<nonFilteredFileExtension>ftl</nonFilteredFileExtension>
<nonFilteredFileExtension>acp</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
<nonFilteredFileExtension>pdf</nonFilteredFileExtension>
<nonFilteredFileExtension>doc</nonFilteredFileExtension>
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
<nonFilteredFileExtension>ppt</nonFilteredFileExtension>
<nonFilteredFileExtension>pptx</nonFilteredFileExtension>
<nonFilteredFileExtension>bin</nonFilteredFileExtension>
<nonFilteredFileExtension>lic</nonFilteredFileExtension>
<nonFilteredFileExtension>swf</nonFilteredFileExtension>
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
<nonFilteredFileExtension>msg</nonFilteredFileExtension>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
<nonFilteredFileExtension>css</nonFilteredFileExtension>
<nonFilteredFileExtension>ico</nonFilteredFileExtension>
<nonFilteredFileExtension>psd</nonFilteredFileExtension>
<nonFilteredFileExtension>js</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<version>${jrebel.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M1</version>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify-test</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
</plugin>
</plugins>
</pluginManagement>
<!-- Make sure resources in sub-projects are filtered -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<!-- Filter the test resource files in the AIO parent project, and do
property substitutions. We need this config so this is done before the Alfresco
Maven Plugin 'run' is executed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<inherited>false</inherited>
<!-- Run only for the AIO parent Project -->
<executions>
<execution>
<id>copy-and-filter-docker-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.outputDirectory}/docker</outputDirectory>
<resources>
<resource>
<directory>docker</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Compress JavaScript files and store as *-min.js -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<!-- Compress the JS files under the assembly folder -->
<execution>
<id>compress-assembly</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/assembly/web</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/assembly/web</outputDirectory>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/META-INF/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
<!-- Compress the JS files under the resources folder -->
<execution>
<id>compress-resources</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>[1.8,11.0)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>java11</id>
<activation>
<jdk>[11.0,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jrebel</id>
<build>
<plugins>
<!-- Hot reloading with JRebel -->
<plugin>
<groupId>org.zeroturnaround</groupId>
<artifactId>jrebel-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-rebel-xml</id>
<phase>process-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- For more information about how to configure JRebel plugin see:
http://manuals.zeroturnaround.com/jrebel/standalone/maven.html#maven-rebel-xml -->
<classpath>
<fallback>all</fallback>
<resources>
<resource>
<directory>${project.build.outputDirectory}</directory>
<directory>${project.build.testOutputDirectory}</directory>
</resource>
</resources>
</classpath>
<!-- alwaysGenerate - default is false If 'false' - rebel.xml is generated
if timestamps of pom.xml and the current rebel.xml file are not equal. If
'true' - rebel.xml will always be generated -->
<alwaysGenerate>true</alwaysGenerate>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>integration-tests</module>
<module>repo</module>
<module>platform-docker</module>
<module>share</module>
<module>share-docker</module>
</modules>
<distributionManagement>
<repository>
<id>inteligr8-releases</id>
<url>http://repos.yateslong.us/nexus/repository/inteligr8-private</url>
</repository>
<snapshotRepository>
<id>inteligr8-snapshots</id>
<url>http://repos.yateslong.us/nexus/repository/inteligr8-snapshots</url>
</snapshotRepository>
</distributionManagement>
<!-- Alfresco Maven Repositories -->
<repositories>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-plugin-public</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</project>

31
repo/pom.xml Normal file
View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfmarkdown-platform</artifactId>
<name>Alfresco Platform/Repository JAR Module</name>
<description>Platform/Repo JAR Module (to be included in the alfresco.war) - part of AIO - SDK 4.0
</description>
<packaging>jar</packaging>
<parent>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
</properties>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,66 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<!--
Note that the Module dependency specified in the configuration section for the Alfresco Maven Plugin
needs to be set to amp if any 3rd party libs should be applied by MMT:
`
<platformModules>
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-platform</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>
-->
<id>build-amp-file</id>
<formats>
<format>amp</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<files>
<!-- Filter module.properties and put at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/module.properties</source>
<filtered>true</filtered>
</file>
<!-- Include AMP -> WAR mapping file (needed for custom mappings) -->
<file>
<source>src/main/assembly/file-mapping.properties</source>
<filtered>false</filtered>
</file>
<!-- Add module-specific log4j.properties configuration at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/log4j.properties</source>
<filtered>false</filtered>
</file>
</files>
<fileSets>
<!-- Anything in the assembly/web directory will end up in the /web directory in the AMP -->
<fileSet>
<directory>src/main/assembly/web</directory>
<outputDirectory>web</outputDirectory>
<filtered>true</filtered> <!-- Will filter files and substitute POM props such as for example ${project.name} -->
<excludes>
<exclude>README.md</exclude>
</excludes>
</fileSet>
</fileSets>
<!-- Include the project artifact (JAR) in the /lib directory in the AMP, and any 3rd party libraries (JARs)
used by the customization.
-->
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>

View File

@ -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=/

View File

@ -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:
`
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-platform</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>
`
**Important**. New web resources should not be located here, but instead
in the usual place in the *src/main/resources/META-INF/resources* directory.

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.parashift.mdpreview" />
</beans>

View File

@ -0,0 +1,2 @@
log4j.logger.com.parashift.mdpreview=info
log4j.logger.com.inteligr8.alfresco.model.alfmarkdown=info

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="mta:dataModel"
xmlns="http://www.alfresco.org/model/dictionary/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0 https://raw.githubusercontent.com/Alfresco/alfresco-repository/master/src/main/resources/alfresco/model/modelSchema.xsd">
<description>MTA Data Model</description>
<author>Brian Long</author>
<version>1.0</version>
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<!-- Import Alfresco System Model Definitions -->
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<namespaces>
<namespace uri="http://www.mta.info/alfresco/model/1.0" prefix="mta"/>
</namespaces>
<constraints>
<constraint name="mta:ptcWg" type="LIST">
<parameter name="allowedValues">
<list>
<value></value>
<value>Communications</value>
<value>Onboard</value>
<value>Safety</value>
<value>System Engineering</value>
<value>Test and Commissioning - 1 SAT</value>
<value>Test and Commissioning - 2 FAT</value>
<value>Training</value>
</list>
</parameter>
</constraint>
</constraints>
<aspects>
<aspect name="mta:submittal">
<title>MTA Submittal</title>
<properties>
<property name="mta:submittalName">
<title>Name</title>
<type>d:text</type>
<mandatory>true</mandatory>
<index enabled="true">
<tokenised>false</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mta:submittalDocNum">
<title>Document #</title>
<type>d:int</type>
<mandatory>true</mandatory>
<index enabled="true">
<tokenised>false</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mta:submittalRevNum">
<title>Revision #</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>true</tokenised>
<facetable>true</facetable>
</index>
</property>
<property name="mta:submittalStatusSummary">
<title>Status Summary #</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>true</tokenised>
<facetable>true</facetable>
</index>
</property>
</properties>
</aspect>
<aspect name="mta:ptcDoc">
<title>MTA PTC Document</title>
<properties>
<property name="mta:ptcEquipCat">
<title>Equipment Category</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>true</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mta:ptcCdrlNum">
<title>CDRL #</title>
<type>d:text</type>
<mandatory>false</mandatory>
<index enabled="true">
<tokenised>false</tokenised>
<facetable>false</facetable>
</index>
</property>
<property name="mta:ptcWg">
<title>WG</title>
<type>d:text</type>
<mandatory>true</mandatory>
<index enabled="true">
<tokenised>false</tokenised>
<facetable>true</facetable>
</index>
<constraints>
<constraint ref="mta:ptcWg"/>
</constraints>
</property>
</properties>
<mandatory-aspects>
<aspect>mta:submittal</aspect>
</mandatory-aspects>
</aspect>
</aspects>
</model>

View File

@ -0,0 +1,11 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.parashift.mdpreview" />
</beans>

View File

@ -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}

127
run.bat Normal file
View File

@ -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

122
run.sh Normal file
View File

@ -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

73
share-docker/pom.xml Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfmarkdown-share-docker</artifactId>
<name>Alfresco Share Docker Module</name>
<description>Share Docker Module to generate the final Docker image</description>
<packaging>jar</packaging>
<parent>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown-share</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Collect extensions (JARs or AMPs) declared in this module do be deployed to docker -->
<execution>
<id>collect-extensions</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/extensions</outputDirectory>
<includeScope>runtime</includeScope>
<!-- IMPORTANT: if using amp dependencies only, add <includeTypes>amp</includeTypes> -->
</configuration>
</execution>
</executions>
</plugin>
<!-- Filter the Dockerfile and the other files added to the container to be able to replace maven properties -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-and-filter-docker-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,105 @@
<alfresco-config>
<config evaluator="string-compare" condition="WebFramework">
<web-framework>
<autowire>
<!-- Changing this to 'development' currently breaks the Admin Console.
Instead we make a POST to clear Share dependency caches, see 'clear-caches-refresh-ws' profile. -->
<mode>production</mode> <!-- not really need in the long run, used for YUI - deprecate -->
</autowire>
<!--
We don't need to do this when we have the new refresh mojos in the Alfresco plug-in.
If resource caching has been disabled then all the dependency caches will be cleared
before processing the Aikau jsonModel request...
(i.e. this.dojoDependencyHandler.clearCaches() )
For more information see the Aikau source code: https://github.com/Alfresco/Aikau
-->
<disable-resource-caching>false</disable-resource-caching>
</web-framework>
</config>
<!-- Global config section -->
<config replace="true">
<flags>
<!--
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
-->
<client-debug>true</client-debug>
<!--
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
-->
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>
<!--
Disable CSRF completely for now
It seems Share has issues on 4.2.x with the embedded tomcat and CSRFPolicy
-->
<config evaluator="string-compare" condition="CSRFPolicy" replace="true">
<filter/>
</config>
<!--
Change so it is picked up from property where the Alfresco Repo Webapp is running
(e.g. http://localhost:8080/alfresco)
-->
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>alfresco-noauth</id>
<name>Alfresco - unauthenticated access</name>
<description>Access to Alfresco Repository WebScripts that do not require authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://${acs.host}:8080/alfresco/s</endpoint-url>
<identity>none</identity>
</endpoint>
<endpoint>
<id>alfresco</id>
<name>Alfresco - user access</name>
<description>Access to Alfresco Repository WebScripts that require user authentication</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://${acs.host}:8080/alfresco/s</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-feed</id>
<name>Alfresco Feed</name>
<description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
<connector-id>http</connector-id>
<endpoint-url>http://${acs.host}:8080/alfresco/s</endpoint-url>
<basic-auth>true</basic-auth>
<identity>user</identity>
</endpoint>
<endpoint>
<id>activiti-admin</id>
<name>Activiti Admin UI - user access</name>
<description>Access to Activiti Admin UI, that requires user authentication</description>
<connector-id>activiti-admin-connector</connector-id>
<endpoint-url>http://${acs.host}:8080/alfresco/activiti-admin</endpoint-url>
<identity>user</identity>
</endpoint>
<endpoint>
<id>alfresco-api</id>
<parent-id>alfresco</parent-id>
<name>Alfresco Public API - user access</name>
<description>Access to Alfresco Repository Public API that require user authentication.
This makes use of the authentication that is provided by parent 'alfresco' endpoint.</description>
<connector-id>alfresco</connector-id>
<endpoint-url>http://${acs.host}:8080/alfresco/api</endpoint-url>
<identity>user</identity>
</endpoint>
</remote>
</config>
</alfresco-config>

67
share/pom.xml Normal file
View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfmarkdown-share</artifactId>
<name>Alfresco Share JAR Module</name>
<packaging>jar</packaging>
<description>Sample Share JAR Module (to be included in the share.war) - part of AIO - SDK 4.0</description>
<parent>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
</properties>
<!-- Following dependencies are needed for compiling Java code in src/main/java;
<scope>provided</scope> is inherited for each of the following;
for more info, please refer to alfresco-platform-distribution POM -->
<dependencies>
<dependency>
<groupId>${alfresco.groupId}</groupId>
<artifactId>share</artifactId>
<classifier>classes</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<!-- Override to not deal with already minified showdown -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.1</version>
<executions>
<execution>
<id>compress-resources</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<excludes>
<exclude>**/webscripts/**</exclude>
<exclude>**/site-webscripts/**</exclude>
<exclude>**/*.lib.js</exclude>
<exclude>**/*.css</exclude>
<exclude>**/*-min.js</exclude>
<exclude>**/*-min.css</exclude>
<exclude>**/showdown.js</exclude>
</excludes>
<force>true</force>
<jswarn>false</jswarn>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,66 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<!--
Note that the Module dependency specified in the configuration section for the Alfresco Maven Plugin
needs to be set to amp if any 3rd party libs should be applied by MMT:
`
<shareModules>
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-share</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>
-->
<id>build-amp-file</id>
<formats>
<format>amp</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<files>
<!-- Filter module.properties and put at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/module.properties</source>
<filtered>true</filtered>
</file>
<!-- Include AMP -> WAR mapping file (needed for custom mappings) -->
<file>
<source>src/main/assembly/file-mapping.properties</source>
<filtered>false</filtered>
</file>
<!-- Add module-specific log4j.properties configuration at top level in the AMP -->
<file>
<source>src/main/resources/alfresco/module/${project.artifactId}/log4j.properties</source>
<filtered>false</filtered>
</file>
</files>
<fileSets>
<!-- Anything in the assembly/web directory will end up in the /web directory in the AMP -->
<fileSet>
<directory>src/main/assembly/web</directory>
<outputDirectory>web</outputDirectory>
<filtered>true</filtered> <!-- Will filter files and substitute POM props such as for example ${project.name} -->
<excludes>
<exclude>README.md</exclude>
</excludes>
</fileSet>
</fileSets>
<!-- Include the project artifact (JAR) in the /lib directory in the AMP, and any 3rd party libraries (JARs)
used by the customization.
-->
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>

View File

@ -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=/

View File

@ -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:
`
<moduleDependency>
<groupId>${project.groupId}</groupId>
<artifactId>some-share</artifactId>
<version>${project.version}</version>
<type>amp</type>
</moduleDependency>
`
**Important**. New web resources should not be located here, but instead
in the usual place in the *src/main/resources/META-INF/resources/<module-id>/* directory.

View File

@ -0,0 +1,2 @@
log4j.logger.com.parashift.markdown=info
log4j.logger.com.inteligr8.alfresco.module.alfmarkdown=info

View File

@ -0,0 +1,4 @@
module.id=${project.artifactId}
module.title=${project.name}
module.description=${project.description}
module.version=${project.version}