major project structure refactoring; using BeeDK

This commit is contained in:
2021-02-03 15:41:01 -05:00
parent a0384107fb
commit d020061450
72 changed files with 1912 additions and 1646 deletions

70
share-webapp/pom.xml Normal file
View File

@@ -0,0 +1,70 @@
<?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-webapp</artifactId>
<name>Alfmarkdown Share Web Application</name>
<packaging>pom</packaging>
<parent>
<groupId>com.inteligr8.alfresco.module</groupId>
<artifactId>alfmarkdown</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<developers>
<developer>
<id>brian.long</id>
<name>Brian Long</name>
<email>brian@inteligr8.com</email>
</developer>
</developers>
<properties>
<alfresco.share.version>6.2.2</alfresco.share.version>
<project.sibling.build.directory>${basedir}/../platform-webapp/target</project.sibling.build.directory>
<project.sibling.build.warDirectory>${project.sibling.build.directory}/war</project.sibling.build.warDirectory>
<project.sibling.build.warFile>${project.sibling.build.warDirectory}/content-services-community-${alfresco.platform.version}.war</project.sibling.build.warFile>
</properties>
<dependencies>
<dependency>
<groupId>de.fmaul</groupId>
<artifactId>javascript-console-share</artifactId>
<version>0.6.0</version>
<type>amp</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>alfmarkdown-share</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>2.19</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>com.inteligr8.alfresco:beedk-acs-platform-sibling-it-tile:1.0-SNAPSHOT</tile>
<tile>com.inteligr8.alfresco:beedk-acs-share-webapp-tile:1.0-SNAPSHOT</tile>
</tiles>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>inteligr8-releases</id>
<url>http://repos.yateslong.us/nexus/repository/inteligr8-public</url>
</repository>
</repositories>
</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/shared/classes
COPY hotswap-agent.properties $TOMCAT_DIR/shared/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/target/classes
# 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/target/classes/META-INF;
# Load static web resources from different directory.
#
# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...)
webappDir=/usr/local/tomcat/hotswap-agent/target/classes/META-INF;
# 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>