major project structure refactoring; using BeeDK
This commit is contained in:
parent
a0384107fb
commit
d020061450
@ -1,74 +0,0 @@
|
|||||||
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"
|
|
||||||
depends_on:
|
|
||||||
- alfmarkdown-acs
|
|
||||||
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"
|
|
||||||
depends_on:
|
|
||||||
- alfmarkdown-acs
|
|
||||||
alfmarkdown-tengine:
|
|
||||||
image: inteligr8/alfmarkdown-tengine:1.0-SNAPSHOT
|
|
||||||
ports:
|
|
||||||
- "${ate.port}:8090"
|
|
||||||
volumes:
|
|
||||||
alfmarkdown-acs-volume:
|
|
||||||
external: true
|
|
||||||
alfmarkdown-db-volume:
|
|
||||||
external: true
|
|
||||||
alfmarkdown-ass-volume:
|
|
||||||
external: true
|
|
@ -1,85 +0,0 @@
|
|||||||
<?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>
|
|
@ -1,118 +0,0 @@
|
|||||||
<?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>
|
|
62
platform-webapp/pom.xml
Normal file
62
platform-webapp/pom.xml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?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-webapp</artifactId>
|
||||||
|
<name>Alfmarkdown Platform/Repository 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>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>de.fmaul</groupId>
|
||||||
|
<artifactId>javascript-console-repo</artifactId>
|
||||||
|
<version>0.6.0</version>
|
||||||
|
<type>amp</type>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.groupId}</groupId>
|
||||||
|
<artifactId>alfmarkdown-platform</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-lts-it-tile:1.0-SNAPSHOT</tile>
|
||||||
|
<tile>com.inteligr8.alfresco:beedk-acs-platform-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>
|
428
pom.xml
428
pom.xml
@ -7,435 +7,27 @@
|
|||||||
<groupId>com.inteligr8.alfresco.module</groupId>
|
<groupId>com.inteligr8.alfresco.module</groupId>
|
||||||
<artifactId>alfmarkdown</artifactId>
|
<artifactId>alfmarkdown</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<name>Markdown AIO</name>
|
<name>AlfMarkdown</name>
|
||||||
<description>All-In-One (AIO) project for SDK 4.0</description>
|
<description>A Markdown suite of extensions for Alfresco</description>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<prerequisites>
|
|
||||||
<maven>3.3.0</maven>
|
|
||||||
</prerequisites>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Alfresco Maven Plugin version to use -->
|
|
||||||
<alfresco.sdk.version>4.1.0</alfresco.sdk.version>
|
<alfresco.sdk.version>4.1.0</alfresco.sdk.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<edition>community</edition>
|
||||||
|
<alfresco.platform.version>6.2.0-ga</alfresco.platform.version>
|
||||||
<!-- Properties used in dependency declarations, you don't need to change
|
<alfresco.share.version>6.2.2</alfresco.share.version>
|
||||||
these -->
|
|
||||||
<alfresco.groupId>org.alfresco</alfresco.groupId>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<alfresco.bomDependencyArtifactId>acs-community-packaging</alfresco.bomDependencyArtifactId>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
<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 -->
|
|
||||||
<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>
|
|
||||||
<adw.port>8280</adw.port>
|
|
||||||
<ate.port>8190</ate.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>
|
</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>
|
|
||||||
<exclude>**/*.min.js</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>
|
|
||||||
<exclude>**/*.min.js</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>
|
<modules>
|
||||||
<module>integration-tests</module>
|
|
||||||
<module>repo</module>
|
<module>repo</module>
|
||||||
<module>platform-docker</module>
|
<module>platform-webapp</module>
|
||||||
<module>share</module>
|
<module>share</module>
|
||||||
<module>share-docker</module>
|
<module>share-webapp</module>
|
||||||
<module>tengine</module>
|
<module>tengine</module>
|
||||||
</modules>
|
</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 -->
|
<!-- Alfresco Maven Repositories -->
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
mavenLocal()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
classpath group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.3.6'
|
|
||||||
classpath group: 'com.parashift.amp', name: 'amp-plugin', version: '1.0-SNAPSHOT'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'alfresco-amp'
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
gradle.projectsEvaluated {
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
version = "1.1.1"
|
|
||||||
|
|
||||||
ext {
|
|
||||||
alfresco = [:]
|
|
||||||
alfresco.version = "5.0.1"
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
maven { url "https://maven.alfresco.com/nexus/content/groups/public/" }
|
|
||||||
|
|
||||||
maven {
|
|
||||||
credentials {
|
|
||||||
username project['alfresco.repo.private.username']
|
|
||||||
password project['alfresco.repo.private.password']
|
|
||||||
}
|
|
||||||
|
|
||||||
url "https://maven.alfresco.com/nexus/content/groups/private/"
|
|
||||||
}
|
|
||||||
mavenLocal()
|
|
||||||
flatDir name: 'localRepository', dirs: 'lib'
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
all*.exclude group: 'maven-plugins'
|
|
||||||
all*.exclude group: 'org.jvnet.staxex'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile (group: "org.alfresco", name: "alfresco", version: "${alfresco.version}", classifier: "classes")
|
|
||||||
compile 'org.slf4j:slf4j-api:1.7.5'
|
|
||||||
}
|
|
||||||
|
|
||||||
amp {
|
|
||||||
id = "com.parashift." + project.name
|
|
||||||
baseName = project.name
|
|
||||||
alias = project.name
|
|
||||||
version = project.version
|
|
||||||
title = project.title
|
|
||||||
description = project.description
|
|
||||||
addLibDir("ampLib")
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
title=Markdown Preview Repo
|
|
||||||
description=Allows Markdown files to be Previewed in Share
|
|
46
repo/pom.xml
46
repo/pom.xml
@ -1,10 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfmarkdown-platform</artifactId>
|
<artifactId>alfmarkdown-platform</artifactId>
|
||||||
<name>Alfresco Platform/Repository JAR Module</name>
|
<name>Alfmarkdown Platform 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>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
@ -12,20 +13,31 @@
|
|||||||
<artifactId>alfmarkdown</artifactId>
|
<artifactId>alfmarkdown</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.alfresco</groupId>
|
||||||
|
<artifactId>alfresco-repository</artifactId>
|
||||||
|
<version>8.98</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>io.repaint.maven</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>tiles-maven-plugin</artifactId>
|
||||||
</plugin>
|
<version>2.19</version>
|
||||||
</plugins>
|
<extensions>true</extensions>
|
||||||
</build>
|
<configuration>
|
||||||
|
<tiles>
|
||||||
|
<tile>com.inteligr8.alfresco:beedk-acs-platform-module-tile:1.0-SNAPSHOT</tile>
|
||||||
|
<tile>com.inteligr8:maven-private-deploy-tile:[1.0.0,2.0.0)</tile>
|
||||||
|
</tiles>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
rootProject.name = "parashift-mdpreview-repo"
|
|
@ -1,66 +0,0 @@
|
|||||||
<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>
|
|
@ -1,27 +0,0 @@
|
|||||||
# 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=/
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
|
|
@ -19,7 +19,6 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* Created by cetra on 30/08/2016.
|
* Created by cetra on 30/08/2016.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Component(value = "webscript.mdpreview.path.get")
|
@Component(value = "webscript.mdpreview.path.get")
|
||||||
public class ContentGet extends AbstractWebScript {
|
public class ContentGet extends AbstractWebScript {
|
||||||
|
|
||||||
|
141
run.bat
141
run.bat
@ -1,141 +0,0 @@
|
|||||||
@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_tengine|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==reload_tengine (
|
|
||||||
CALL :build_tengine
|
|
||||||
CALL :start_tengine
|
|
||||||
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_tengine|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
|
|
||||||
:start_tengine
|
|
||||||
docker-compose -f "%COMPOSE_FILE_PATH%" up -d alfmarkdown-tengine
|
|
||||||
EXIT /B 0
|
|
||||||
:down
|
|
||||||
if exist "%COMPOSE_FILE_PATH%" (
|
|
||||||
docker-compose -f "%COMPOSE_FILE_PATH%" down
|
|
||||||
)
|
|
||||||
EXIT /B 0
|
|
||||||
:build
|
|
||||||
call %MVN_EXEC% -Pdocker 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 share,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 integration-tests,repo,platform-docker
|
|
||||||
EXIT /B 0
|
|
||||||
:build_tengine
|
|
||||||
docker-compose -f "%COMPOSE_FILE_PATH%" kill alfmarkdown-tengine
|
|
||||||
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f alfmarkdown-tengine
|
|
||||||
call %MVN_EXEC% clean package -Pdocker -pl tengine
|
|
||||||
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 repo,tengine,integration-tests,platform-docker
|
|
||||||
EXIT /B 0
|
|
||||||
:test
|
|
||||||
call %MVN_EXEC% verify -pl repo,tengine,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
|
|
141
run.sh
141
run.sh
@ -1,141 +0,0 @@
|
|||||||
#!/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
|
|
||||||
}
|
|
||||||
|
|
||||||
start_tengine() {
|
|
||||||
docker-compose -f "$COMPOSE_FILE_PATH" up -d alfmarkdown-tengine
|
|
||||||
}
|
|
||||||
|
|
||||||
start_adw() {
|
|
||||||
docker-compose -f "$COMPOSE_FILE_PATH" up -d alfmarkdown-adw
|
|
||||||
}
|
|
||||||
|
|
||||||
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 -Pdocker 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 share,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 integration-tests,repo,platform-docker
|
|
||||||
}
|
|
||||||
|
|
||||||
build_tengine() {
|
|
||||||
docker-compose -f "$COMPOSE_FILE_PATH" kill alfmarkdown-tengine
|
|
||||||
yes | docker-compose -f "$COMPOSE_FILE_PATH" rm -f alfmarkdown-tengine
|
|
||||||
$MVN_EXEC clean package -Pdocker -pl tengine
|
|
||||||
}
|
|
||||||
|
|
||||||
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 repo,tengine,integration-tests,platform-docker
|
|
||||||
}
|
|
||||||
|
|
||||||
test() {
|
|
||||||
$MVN_EXEC verify -pl repo,tengine,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
|
|
||||||
;;
|
|
||||||
reload_tengine)
|
|
||||||
build_tengine
|
|
||||||
start_tengine
|
|
||||||
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_tengine|reload_share|reload_acs|build_test|test}"
|
|
||||||
esac
|
|
@ -1,73 +0,0 @@
|
|||||||
<?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>
|
|
70
share-webapp/pom.xml
Normal file
70
share-webapp/pom.xml
Normal 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>
|
@ -12,5 +12,5 @@ RUN java -jar $TOMCAT_DIR/alfresco-mmt/alfresco-mmt*.jar install \
|
|||||||
|
|
||||||
COPY share-config-custom.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension
|
COPY share-config-custom.xml $TOMCAT_DIR/shared/classes/alfresco/web-extension
|
||||||
|
|
||||||
COPY log4j.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
|
COPY log4j.properties $TOMCAT_DIR/shared/classes
|
||||||
COPY hotswap-agent.properties $TOMCAT_DIR/webapps/share/WEB-INF/classes
|
COPY hotswap-agent.properties $TOMCAT_DIR/shared/classes
|
@ -11,7 +11,7 @@ autoHotswap=true
|
|||||||
# i.e. monitor /target/classes
|
# i.e. monitor /target/classes
|
||||||
# should work with extraClasspath=${project.build.outputDirectory}
|
# should work with extraClasspath=${project.build.outputDirectory}
|
||||||
# If not try
|
# If not try
|
||||||
extraClasspath=/usr/local/tomcat/hotswap-agent
|
extraClasspath=/usr/local/tomcat/hotswap-agent/target/classes
|
||||||
|
|
||||||
|
|
||||||
# Comma separated list of disabled plugins
|
# Comma separated list of disabled plugins
|
||||||
@ -24,12 +24,12 @@ disabledPlugins=Hibernate,Spring
|
|||||||
#
|
#
|
||||||
# Load web application resources (such as HTML, JSP, CSS, ...) from this directory prior to default processing.
|
# 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).
|
# 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;
|
extraWebappContext=/usr/local/tomcat/hotswap-agent/target/classes/META-INF;
|
||||||
|
|
||||||
# Load static web resources from different directory.
|
# Load static web resources from different directory.
|
||||||
#
|
#
|
||||||
# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...)
|
# This setting is dependent on application server plugin(Jetty, Tomcat, JBoss, ...)
|
||||||
webappDir=/usr/local/tomcat/hotswap-agent/alfmarkdown-share/target/classes/META-INF/resources;
|
webappDir=/usr/local/tomcat/hotswap-agent/target/classes/META-INF;
|
||||||
|
|
||||||
# Watch for changes in a directory (resources only).
|
# Watch for changes in a directory (resources only).
|
||||||
#
|
#
|
@ -1,39 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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"
|
<project 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">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfmarkdown-share</artifactId>
|
<artifactId>alfmarkdown-share</artifactId>
|
||||||
<name>Alfresco Share JAR Module</name>
|
<name>Alfmarkdown Share JAR Module</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>Sample Share JAR Module (to be included in the share.war) - part of AIO - SDK 4.0</description>
|
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.inteligr8.alfresco.module</groupId>
|
<groupId>com.inteligr8.alfresco.module</groupId>
|
||||||
<artifactId>alfmarkdown</artifactId>
|
<artifactId>alfmarkdown</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<project.sibling.build.directory>${basedir}/../repo/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>
|
</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>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${alfresco.groupId}</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>share</artifactId>
|
<artifactId>share</artifactId>
|
||||||
|
<version>${alfresco.share.version}</version>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>io.repaint.maven</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>tiles-maven-plugin</artifactId>
|
||||||
</plugin>
|
<version>2.19</version>
|
||||||
</plugins>
|
<extensions>true</extensions>
|
||||||
</build>
|
<configuration>
|
||||||
|
<tiles>
|
||||||
|
<tile>com.inteligr8.alfresco:beedk-acs-platform-sibling-it-tile:1.0-SNAPSHOT</tile>
|
||||||
|
<tile>com.inteligr8.alfresco:beedk-acs-share-module-tile:1.0-SNAPSHOT</tile>
|
||||||
|
<tile>com.inteligr8:maven-private-deploy-tile:[1.0.0,2.0.0)</tile>
|
||||||
|
</tiles>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
<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>
|
|
@ -1,27 +0,0 @@
|
|||||||
# 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=/
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
|||||||
<property name="configService" ref="web.config" />
|
<property name="configService" ref="web.config" />
|
||||||
<property name="configs">
|
<property name="configs">
|
||||||
<list>
|
<list>
|
||||||
<value>classpath:alfresco/mdpreview-config.xml</value>
|
<value>classpath:${alfresco.ext.path}/mdpreview-config.xml</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<bean id="mdpreview.custom.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
|
<bean id="mdpreview.custom.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
|
||||||
<property name="resourceBundles">
|
<property name="resourceBundles">
|
||||||
<list>
|
<list>
|
||||||
<value>alfresco.messages.mdpreview</value>
|
<value>${alfresco.ext.package}.messages.mdpreview</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
@ -1,7 +1,7 @@
|
|||||||
<extension>
|
<extension>
|
||||||
<modules>
|
<modules>
|
||||||
<module>
|
<module>
|
||||||
<id>Parashift Markdown Preview</id>
|
<id>${project.artifactId} Markdown Preview</id>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<auto-deploy>true</auto-deploy>
|
<auto-deploy>true</auto-deploy>
|
||||||
<customizations>
|
<customizations>
|
||||||
@ -9,7 +9,10 @@
|
|||||||
<targetPackageRoot>org.alfresco.components.preview</targetPackageRoot>
|
<targetPackageRoot>org.alfresco.components.preview</targetPackageRoot>
|
||||||
<sourcePackageRoot>com.parashift.markdown.preview-config</sourcePackageRoot>
|
<sourcePackageRoot>com.parashift.markdown.preview-config</sourcePackageRoot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<js>/res/lib/highlightjs/hightlight.pack.js</js>
|
||||||
<js>/res/components/preview/MarkDown.js</js>
|
<js>/res/components/preview/MarkDown.js</js>
|
||||||
|
<js>/res/lib/highlightjs/hightlight-init.js</js>
|
||||||
|
<css>/res/lib/highlightjs/default.css</css>
|
||||||
<css>/res/components/preview/MarkDown.css</css>
|
<css>/res/components/preview/MarkDown.css</css>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</customization>
|
</customization>
|
||||||
@ -17,24 +20,31 @@
|
|||||||
<targetPackageRoot>org.alfresco.components.documentlibrary</targetPackageRoot>
|
<targetPackageRoot>org.alfresco.components.documentlibrary</targetPackageRoot>
|
||||||
<sourcePackageRoot>com.parashift.markdown.preview-config</sourcePackageRoot>
|
<sourcePackageRoot>com.parashift.markdown.preview-config</sourcePackageRoot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<js>/res/lib/highlightjs/hightlight.pack.js</js>
|
||||||
<js>/res/components/preview/MarkDown.js</js>
|
<js>/res/components/preview/MarkDown.js</js>
|
||||||
|
<js>/res/lib/highlightjs/hightlight-init.js</js>
|
||||||
|
<css>/res/highlightjs/default.css</css>
|
||||||
<css>/res/components/preview/MarkDown.css</css>
|
<css>/res/components/preview/MarkDown.css</css>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</customization>
|
</customization>
|
||||||
</customizations>
|
</customizations>
|
||||||
</module>
|
</module>
|
||||||
<module>
|
<module>
|
||||||
<id>Showdown Library Override</id>
|
<id>Markdown-It Library</id>
|
||||||
<version>${project.version}</version>
|
<version>12.0.4</version>
|
||||||
<auto-deploy>true</auto-deploy>
|
<auto-deploy>true</auto-deploy>
|
||||||
<configurations>
|
<configurations>
|
||||||
<config evaluator="string-compare" condition="WebFramework" replace="false">
|
<config evaluator="string-compare" condition="WebFramework" replace="false">
|
||||||
<web-framework>
|
<web-framework>
|
||||||
<dojo-pages>
|
<dojo-pages>
|
||||||
<packages>
|
<packages>
|
||||||
<package name="showdown" location="." main="showdown-min" />
|
<package name="markdown-it" location="lib/markdown-it" main="markdown-it.min" />
|
||||||
<package name="showdown-github" location="." main="showdown-github-min" />
|
<package name="markdown-it-deflist" location="lib/markdown-it" main="markdown-it-deflist.min" />
|
||||||
<package name="showdown-table" location="." main="showdown-table-min" />
|
<package name="markdown-it-emoji" location="lib/markdown-it" main="markdown-it-emoji.min" />
|
||||||
|
<package name="markdown-it-footnote" location="lib/markdown-it" main="markdown-it-footnote.min" />
|
||||||
|
<package name="markdown-it-ins" location="lib/markdown-it" main="markdown-it-ins.min" />
|
||||||
|
<package name="markdown-it-sub" location="lib/markdown-it" main="markdown-it-sub.min" />
|
||||||
|
<package name="markdown-it-sup" location="lib/markdown-it" main="markdown-it-sup.min" />
|
||||||
</packages>
|
</packages>
|
||||||
</dojo-pages>
|
</dojo-pages>
|
||||||
</web-framework>
|
</web-framework>
|
@ -2,11 +2,14 @@
|
|||||||
<#-- CSS Dependencies -->
|
<#-- CSS Dependencies -->
|
||||||
<@link href="${url.context}/res/components/preview/MarkDown.css" group="markdown"/>
|
<@link href="${url.context}/res/components/preview/MarkDown.css" group="markdown"/>
|
||||||
<@link href="${url.context}/res/components/markdown-edit.css" group="markdown"/>
|
<@link href="${url.context}/res/components/markdown-edit.css" group="markdown"/>
|
||||||
|
<@link href="${url.context}/res/lib/highlightjs/default.css" group="markdown"/>
|
||||||
</@>
|
</@>
|
||||||
|
|
||||||
<@markup id="js">
|
<@markup id="js">
|
||||||
<#-- JavaScript Dependencies -->
|
<#-- JavaScript Dependencies -->
|
||||||
|
<@script src="${url.context}/res/lib/highlightjs/highlight.pack.js" group="markdown"/>
|
||||||
<@script src="${url.context}/res/components/markdown-edit.js" group="markdown"/>
|
<@script src="${url.context}/res/components/markdown-edit.js" group="markdown"/>
|
||||||
|
<@script src="${url.context}/res/lib/highlightjs/highlight-init.js" group="markdown"/>
|
||||||
</@>
|
</@>
|
||||||
|
|
||||||
|
|
||||||
@ -20,8 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="markdown-preview" id="md-preview">
|
<div class="markdown-preview" id="md-preview">
|
||||||
<h1>Preview:</h1>
|
<h1>Preview:</h1>
|
||||||
<div class="markdown-body" id="md-body">
|
<div class="markdown-body" id="md-body"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@ -1,4 +1,5 @@
|
|||||||
require(["dojo/dom", "dojo/query", "dojo/on", "dojo/request", "showdown", "showdown-github", "showdown-table", "dojo/domReady!"], function(dom, query, on, request, showdown, showdownGithub, showdownTable){
|
require(["dojo/dom", "dojo/query", "dojo/on", "dojo/request", "markdown-it", "markdown-it-deflist", "markdown-it-emoji", "markdown-it-footnote", "markdown-it-ins", "markdown-it-sub", "markdown-it-sup", "dojo/domReady!"],
|
||||||
|
function(dom, query, on, request, MarkdownIt, MarkdownItDefList, MarkdownItEmoji, MarkdownItFootnote, MarkdownItIns, MarkdownItSub, MarkdownItSup){
|
||||||
|
|
||||||
function resizeFrame(elem) {
|
function resizeFrame(elem) {
|
||||||
elem.style.height = (window.innerHeight - 280) + "px";
|
elem.style.height = (window.innerHeight - 280) + "px";
|
||||||
@ -14,14 +15,30 @@ require(["dojo/dom", "dojo/query", "dojo/on", "dojo/request", "showdown", "showd
|
|||||||
|
|
||||||
|
|
||||||
var locationPath = Alfresco.constants.PROXY_URI_RELATIVE + "markdown" + nodeData.item.location.repoPath + "/";
|
var locationPath = Alfresco.constants.PROXY_URI_RELATIVE + "markdown" + nodeData.item.location.repoPath + "/";
|
||||||
|
|
||||||
|
var mdOpts = {
|
||||||
|
html: true,
|
||||||
|
typographer: true,
|
||||||
|
highlight: function (str, lang) {
|
||||||
|
if (lang && hljs.getLanguage(lang)) {
|
||||||
|
try {
|
||||||
|
return hljs.highlight(lang, str).value;
|
||||||
|
} catch (__) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ''; // use external default escaping
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var md = new MarkdownIt(mdOpts)
|
||||||
|
.use(new MarkdownItIns())
|
||||||
|
.use(new MarkdownItSub())
|
||||||
|
.use(new MarkdownItSuper())
|
||||||
|
.use(new MarkdownItEmoji())
|
||||||
|
.use(new MarkdownItFootnote())
|
||||||
|
.use(new MarkdownItDefList());
|
||||||
|
|
||||||
//Once we have the content, let's create a converter and add the html to the div element
|
var translateImageSrc = function(source) {
|
||||||
var converter = new showdown.Converter({
|
|
||||||
extensions: [
|
|
||||||
function() {
|
|
||||||
return [{
|
|
||||||
type: 'output',
|
|
||||||
filter: function(source) {
|
|
||||||
return source.replace(/<img src="([^"]*)"/g, function(match, src) {
|
return source.replace(/<img src="([^"]*)"/g, function(match, src) {
|
||||||
|
|
||||||
if(src.startsWith("http")) {
|
if(src.startsWith("http")) {
|
||||||
@ -32,12 +49,7 @@ require(["dojo/dom", "dojo/query", "dojo/on", "dojo/request", "showdown", "showd
|
|||||||
return "<img src=\"" + locationPath + src + "\"";
|
return "<img src=\"" + locationPath + src + "\"";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
}]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
var editorFrame = dom.byId("md-text");
|
var editorFrame = dom.byId("md-text");
|
||||||
var previewFrame = dom.byId("md-body");
|
var previewFrame = dom.byId("md-body");
|
||||||
@ -53,8 +65,7 @@ require(["dojo/dom", "dojo/query", "dojo/on", "dojo/request", "showdown", "showd
|
|||||||
});
|
});
|
||||||
|
|
||||||
function updateMarkdown() {
|
function updateMarkdown() {
|
||||||
|
previewFrame.innerHTML = md.render(editorFrame.value);
|
||||||
previewFrame.innerHTML = converter.makeHtml(editorFrame.value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
on(editorFrame, "change", updateMarkdown);
|
on(editorFrame, "change", updateMarkdown);
|
@ -25,18 +25,33 @@
|
|||||||
//get the Div Element we'll be putting the Markdown
|
//get the Div Element we'll be putting the Markdown
|
||||||
var divElem = document.getElementById(this.wp.id + "-body")
|
var divElem = document.getElementById(this.wp.id + "-body")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Execute Ajax request for content
|
//Execute Ajax request for content
|
||||||
require(["dojo/request", "showdown", "showdown-github", "showdown-table"], function(request, showdown, showdownGithub, showdownTable){
|
require(["dojo/request", "markdown-it", "markdown-it-ins", "markdown-it-sub", "markdown-it-sup", "markdown-it-emoji", "markdown-it-footnote", "markdown-it-deflist"],
|
||||||
|
function(request, MarkdownIt, MarkdownItIns, MarkdownItSub, MarkdownItSuper, MarkdownItEmoji, MarkdownItFootnote, MarkdownItDefList){
|
||||||
|
|
||||||
|
var mdOpts = {
|
||||||
|
html: true,
|
||||||
|
typographer: true,
|
||||||
|
highlight: function (str, lang) {
|
||||||
|
if (lang && hljs.getLanguage(lang)) {
|
||||||
|
try {
|
||||||
|
return hljs.highlight(lang, str).value;
|
||||||
|
} catch (__) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ''; // use external default escaping
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var md = new MarkdownIt(mdOpts)
|
||||||
|
.use(new MarkdownItIns())
|
||||||
|
.use(new MarkdownItSub())
|
||||||
|
.use(new MarkdownItSuper())
|
||||||
|
.use(new MarkdownItEmoji())
|
||||||
|
.use(new MarkdownItFootnote())
|
||||||
|
.use(new MarkdownItDefList());
|
||||||
|
|
||||||
//Once we have the content, let's create a converter and add the html to the div element
|
var translateImageSrc = function(source) {
|
||||||
converter = new showdown.Converter({
|
|
||||||
extensions: [
|
|
||||||
function() {
|
|
||||||
return [{
|
|
||||||
type: 'output',
|
|
||||||
filter: function(source) {
|
|
||||||
return source.replace(/<img src="([^"]*)"/g, function(match, src) {
|
return source.replace(/<img src="([^"]*)"/g, function(match, src) {
|
||||||
|
|
||||||
if(src.startsWith("http")) {
|
if(src.startsWith("http")) {
|
||||||
@ -47,21 +62,16 @@
|
|||||||
return "<img src=\"" + locationPath + src + "\"";
|
return "<img src=\"" + locationPath + src + "\"";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
}]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
request.get(Alfresco.constants.PROXY_URI_RELATIVE + node.contentURL).then(function(mdData) {
|
request.get(Alfresco.constants.PROXY_URI_RELATIVE + node.contentURL).then(function(mdData) {
|
||||||
|
|
||||||
|
|
||||||
newHtml = converter.makeHtml(mdData);
|
newHtml = md.render(mdData);
|
||||||
|
|
||||||
divElem.className = "markdown-body";
|
divElem.className = "markdown-body";
|
||||||
divElem.innerHTML = converter.makeHtml(mdData);
|
divElem.innerHTML = newHtml;
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
99
share/src/main/web/lib/highlightjs/default.css
Normal file
99
share/src/main/web/lib/highlightjs/default.css
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
.hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: #F0F0F0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Base color: saturation 0; */
|
||||||
|
|
||||||
|
.hljs,
|
||||||
|
.hljs-subst {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-comment {
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-keyword,
|
||||||
|
.hljs-attribute,
|
||||||
|
.hljs-selector-tag,
|
||||||
|
.hljs-meta-keyword,
|
||||||
|
.hljs-doctag,
|
||||||
|
.hljs-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* User color: hue: 0 */
|
||||||
|
|
||||||
|
.hljs-type,
|
||||||
|
.hljs-string,
|
||||||
|
.hljs-number,
|
||||||
|
.hljs-selector-id,
|
||||||
|
.hljs-selector-class,
|
||||||
|
.hljs-quote,
|
||||||
|
.hljs-template-tag,
|
||||||
|
.hljs-deletion {
|
||||||
|
color: #880000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-title,
|
||||||
|
.hljs-section {
|
||||||
|
color: #880000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-regexp,
|
||||||
|
.hljs-symbol,
|
||||||
|
.hljs-variable,
|
||||||
|
.hljs-template-variable,
|
||||||
|
.hljs-link,
|
||||||
|
.hljs-selector-attr,
|
||||||
|
.hljs-selector-pseudo {
|
||||||
|
color: #BC6060;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Language color: hue: 90; */
|
||||||
|
|
||||||
|
.hljs-literal {
|
||||||
|
color: #78A960;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-built_in,
|
||||||
|
.hljs-bullet,
|
||||||
|
.hljs-code,
|
||||||
|
.hljs-addition {
|
||||||
|
color: #397300;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Meta color: hue: 200 */
|
||||||
|
|
||||||
|
.hljs-meta {
|
||||||
|
color: #1f7199;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-meta-string {
|
||||||
|
color: #4d99bf;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Misc effects */
|
||||||
|
|
||||||
|
.hljs-emphasis {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
99
share/src/main/web/lib/highlightjs/github.css
Normal file
99
share/src/main/web/lib/highlightjs/github.css
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
.hljs {
|
||||||
|
display: block;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding: 0.5em;
|
||||||
|
color: #333;
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-comment,
|
||||||
|
.hljs-quote {
|
||||||
|
color: #998;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-keyword,
|
||||||
|
.hljs-selector-tag,
|
||||||
|
.hljs-subst {
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-number,
|
||||||
|
.hljs-literal,
|
||||||
|
.hljs-variable,
|
||||||
|
.hljs-template-variable,
|
||||||
|
.hljs-tag .hljs-attr {
|
||||||
|
color: #008080;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-string,
|
||||||
|
.hljs-doctag {
|
||||||
|
color: #d14;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-title,
|
||||||
|
.hljs-section,
|
||||||
|
.hljs-selector-id {
|
||||||
|
color: #900;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-subst {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-type,
|
||||||
|
.hljs-class .hljs-title {
|
||||||
|
color: #458;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-tag,
|
||||||
|
.hljs-name,
|
||||||
|
.hljs-attribute {
|
||||||
|
color: #000080;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-regexp,
|
||||||
|
.hljs-link {
|
||||||
|
color: #009926;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-symbol,
|
||||||
|
.hljs-bullet {
|
||||||
|
color: #990073;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-built_in,
|
||||||
|
.hljs-builtin-name {
|
||||||
|
color: #0086b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-meta {
|
||||||
|
color: #999;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-deletion {
|
||||||
|
background: #fdd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-addition {
|
||||||
|
background: #dfd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-emphasis {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hljs-strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
1
share/src/main/web/lib/highlightjs/highlight-init.js
Normal file
1
share/src/main/web/lib/highlightjs/highlight-init.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
hljs.initHighlightingOnLoad();
|
1372
share/src/main/web/lib/highlightjs/highlight.pack.js
Normal file
1372
share/src/main/web/lib/highlightjs/highlight.pack.js
Normal file
File diff suppressed because one or more lines are too long
7
share/src/main/web/lib/markdown-it/markdown-it-deflist.min.js
vendored
Normal file
7
share/src/main/web/lib/markdown-it/markdown-it-deflist.min.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
|
||||||
|
markdown-it-deflist
|
||||||
|
https://github.com/markdown-it/markdown-it-deflist
|
||||||
|
|
||||||
|
*/
|
||||||
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitDeflist=e()}}((function(){return function e(t,n,r){function i(f,d){if(!n[f]){if(!t[f]){var s="function"==typeof require&&require;if(!d&&s)return s(f,!0);if(o)return o(f,!0);var u=new Error("Cannot find module '"+f+"'");throw u.code="MODULE_NOT_FOUND",u}var a=n[f]={exports:{}};t[f][0].call(a.exports,(function(e){return i(t[f][1][e]||e)}),a,a.exports,e,t,n,r)}return n[f].exports}for(var o="function"==typeof require&&require,f=0;f<r.length;f++)i(r[f]);return i}({"/":[function(e,t,n){"use strict";t.exports=function(e){var t=e.utils.isSpace;function n(e,t){var n,r,i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];return i>=o||126!==(r=e.src.charCodeAt(i++))&&58!==r||i===(n=e.skipSpaces(i))||n>=o?-1:i}e.block.ruler.before("paragraph","deflist",(function(e,r,i,o){var f,d,s,u,a,l,p,k,c,h,b,y,m,g,C,I,v,_,w,x;if(o)return!(e.ddIndent<0)&&n(e,r)>=0;if((c=r+1)>=i)return!1;if(e.isEmpty(c)&&++c>=i)return!1;if(e.sCount[c]<e.blkIndent)return!1;if((d=n(e,c))<0)return!1;p=e.tokens.length,w=!0,(x=e.push("dl_open","dl",1)).map=l=[r,0],u=r,s=c;e:for(;;){for(_=!1,(x=e.push("dt_open","dt",1)).map=[u,u],(x=e.push("inline","",0)).map=[u,u],x.content=e.getLines(u,u+1,e.blkIndent,!1).trim(),x.children=[],x=e.push("dt_close","dt",-1);;){for((x=e.push("dd_open","dd",1)).map=a=[c,0],v=d,k=e.eMarks[s],h=e.sCount[s]+d-(e.bMarks[s]+e.tShift[s]);v<k&&(f=e.src.charCodeAt(v),t(f));)9===f?h+=4-h%4:h++,v++;if(d=v,I=e.tight,b=e.ddIndent,y=e.blkIndent,C=e.tShift[s],g=e.sCount[s],m=e.parentType,e.blkIndent=e.ddIndent=e.sCount[s]+2,e.tShift[s]=d-e.bMarks[s],e.sCount[s]=h,e.tight=!0,e.parentType="deflist",e.md.block.tokenize(e,s,i,!0),e.tight&&!_||(w=!1),_=e.line-s>1&&e.isEmpty(e.line-1),e.tShift[s]=C,e.sCount[s]=g,e.tight=I,e.parentType=m,e.blkIndent=y,e.ddIndent=b,x=e.push("dd_close","dd",-1),a[1]=c=e.line,c>=i)break e;if(e.sCount[c]<e.blkIndent)break e;if((d=n(e,c))<0)break;s=c}if(c>=i)break;if(u=c,e.isEmpty(u))break;if(e.sCount[u]<e.blkIndent)break;if((s=u+1)>=i)break;if(e.isEmpty(s)&&s++,s>=i)break;if(e.sCount[s]<e.blkIndent)break;if((d=n(e,s))<0)break}return x=e.push("dl_close","dl",-1),l[1]=c,e.line=c,w&&function(e,t){var n,r,i=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===i&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,p),!0}),{alt:["paragraph","reference","blockquote"]})}},{}]},{},[])("/")}));
|
2
share/src/main/web/lib/markdown-it/markdown-it-emoji.min.js
vendored
Normal file
2
share/src/main/web/lib/markdown-it/markdown-it-emoji.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
share/src/main/web/lib/markdown-it/markdown-it-footnote.min.js
vendored
Normal file
1
share/src/main/web/lib/markdown-it/markdown-it-footnote.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
share/src/main/web/lib/markdown-it/markdown-it-ins.min.js
vendored
Normal file
2
share/src/main/web/lib/markdown-it/markdown-it-ins.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/*! markdown-it-ins 3.0.1 https://github.com/markdown-it/markdown-it-mark @license MIT */
|
||||||
|
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).markdownitIns=n()}(this,(function(){"use strict";return function(e){function n(e,n){var t,o,s,i,r,l=[],f=n.length;for(t=0;t<f;t++)43===(s=n[t]).marker&&-1!==s.end&&(i=n[s.end],(r=e.tokens[s.token]).type="ins_open",r.tag="ins",r.nesting=1,r.markup="++",r.content="",(r=e.tokens[i.token]).type="ins_close",r.tag="ins",r.nesting=-1,r.markup="++",r.content="","text"===e.tokens[i.token-1].type&&"+"===e.tokens[i.token-1].content&&l.push(i.token-1));for(;l.length;){for(o=(t=l.pop())+1;o<e.tokens.length&&"ins_close"===e.tokens[o].type;)o++;t!==--o&&(r=e.tokens[o],e.tokens[o]=e.tokens[t],e.tokens[t]=r)}}e.inline.ruler.before("emphasis","ins",(function(e,n){var t,o,s,i,r=e.pos,l=e.src.charCodeAt(r);if(n)return!1;if(43!==l)return!1;if(s=(o=e.scanDelims(e.pos,!0)).length,i=String.fromCharCode(l),s<2)return!1;for(s%2&&(e.push("text","",0).content=i,s--),t=0;t<s;t+=2)e.push("text","",0).content=i+i,(o.can_open||o.can_close)&&e.delimiters.push({marker:l,length:0,jump:t/2,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0})),e.inline.ruler2.before("emphasis","ins",(function(e){var t,o=e.tokens_meta,s=(e.tokens_meta||[]).length;for(n(e,e.delimiters),t=0;t<s;t++)o[t]&&o[t].delimiters&&n(e,o[t].delimiters)}))}}));
|
2
share/src/main/web/lib/markdown-it/markdown-it-sub.min.js
vendored
Normal file
2
share/src/main/web/lib/markdown-it/markdown-it-sub.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/*! markdown-it-sub 1.0.0 https://github.com//markdown-it/markdown-it-sub @license MIT */
|
||||||
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.markdownitSub=e()}}(function(){return function e(r,o,n){function t(i,u){if(!o[i]){if(!r[i]){var f="function"==typeof require&&require;if(!u&&f)return f(i,!0);if(s)return s(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var a=o[i]={exports:{}};r[i][0].call(a.exports,function(e){var o=r[i][1][e];return t(o?o:e)},a,a.exports,e,r,o,n)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)t(n[i]);return t}({1:[function(e,r){"use strict";function o(e,r){var o,t,s,i=e.posMax,u=e.pos;if(126!==e.src.charCodeAt(u))return!1;if(r)return!1;if(u+2>=i)return!1;for(e.pos=u+1;e.pos<i;){if(126===e.src.charCodeAt(e.pos)){o=!0;break}e.md.inline.skipToken(e)}return o&&u+1!==e.pos?(t=e.src.slice(u+1,e.pos),t.match(/(^|[^\\])(\\\\)*\s/)?(e.pos=u,!1):(e.posMax=e.pos,e.pos=u+1,s=e.push("sub_open","sub",1),s.markup="~",s=e.push("text","",0),s.content=t.replace(n,"$1"),s=e.push("sub_close","sub",-1),s.markup="~",e.pos=e.posMax+1,e.posMax=i,!0)):(e.pos=u,!1)}var n=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;r.exports=function(e){e.inline.ruler.after("emphasis","sub",o)}},{}]},{},[1])(1)});
|
2
share/src/main/web/lib/markdown-it/markdown-it-sup.min.js
vendored
Normal file
2
share/src/main/web/lib/markdown-it/markdown-it-sup.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/*! markdown-it-sup 1.0.0 https://github.com//markdown-it/markdown-it-sup @license MIT */
|
||||||
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.markdownitSup=e()}}(function(){return function e(r,o,n){function t(i,p){if(!o[i]){if(!r[i]){var u="function"==typeof require&&require;if(!p&&u)return u(i,!0);if(s)return s(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var a=o[i]={exports:{}};r[i][0].call(a.exports,function(e){var o=r[i][1][e];return t(o?o:e)},a,a.exports,e,r,o,n)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<n.length;i++)t(n[i]);return t}({1:[function(e,r){"use strict";function o(e,r){var o,t,s,i=e.posMax,p=e.pos;if(94!==e.src.charCodeAt(p))return!1;if(r)return!1;if(p+2>=i)return!1;for(e.pos=p+1;e.pos<i;){if(94===e.src.charCodeAt(e.pos)){o=!0;break}e.md.inline.skipToken(e)}return o&&p+1!==e.pos?(t=e.src.slice(p+1,e.pos),t.match(/(^|[^\\])(\\\\)*\s/)?(e.pos=p,!1):(e.posMax=e.pos,e.pos=p+1,s=e.push("sup_open","sup",1),s.markup="^",s=e.push("text","",0),s.content=t.replace(n,"$1"),s=e.push("sup_close","sup",-1),s.markup="^",e.pos=e.posMax+1,e.posMax=i,!0)):(e.pos=p,!1)}var n=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;r.exports=function(e){e.inline.ruler.after("emphasis","sup",o)}},{}]},{},[1])(1)});
|
3
share/src/main/web/lib/markdown-it/markdown-it.min.js
vendored
Normal file
3
share/src/main/web/lib/markdown-it/markdown-it.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
251
tengine/pom.xml
251
tengine/pom.xml
@ -2,11 +2,16 @@
|
|||||||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.inteligr8.alfresco.module</groupId>
|
|
||||||
<artifactId>alfmarkdown-tengine</artifactId>
|
<artifactId>alfmarkdown-tengine</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.inteligr8.alfresco.module</groupId>
|
||||||
|
<artifactId>alfmarkdown</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>..</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
<name>alfmarkdown Alfresco T-Engine</name>
|
<name>alfmarkdown Alfresco T-Engine</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@ -14,18 +19,22 @@
|
|||||||
<maven.compiler.source>8</maven.compiler.source>
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
|
||||||
<ats.version>2.3.6</ats.version>
|
<alfresco.transform-base.version>2.3.6</alfresco.transform-base.version>
|
||||||
<spring-boot.version>2.3.5.RELEASE</spring-boot.version>
|
<spring-boot.version>2.3.5.RELEASE</spring-boot.version>
|
||||||
<activemq.version>5.15.8</activemq.version>
|
|
||||||
<commonmark.version>0.17.0</commonmark.version>
|
<commonmark.version>0.17.0</commonmark.version>
|
||||||
<flexmark.version>0.62.2</flexmark.version>
|
<flexmark.version>0.62.2</flexmark.version>
|
||||||
|
|
||||||
<image.registry>docker.yateslong.us</image.registry>
|
<docker.image.registry>docker.yateslong.us</docker.image.registry>
|
||||||
<image.name>inteligr8/${project.artifactId}</image.name>
|
<docker.image.name>inteligr8/${project.artifactId}</docker.image.name>
|
||||||
<image.tag>${project.version}</image.tag>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
|
<artifactId>beedk-ate-springboot</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.atlassian.commonmark</groupId>
|
<groupId>com.atlassian.commonmark</groupId>
|
||||||
<artifactId>commonmark</artifactId>
|
<artifactId>commonmark</artifactId>
|
||||||
@ -56,36 +65,13 @@
|
|||||||
<artifactId>flexmark-all</artifactId>
|
<artifactId>flexmark-all</artifactId>
|
||||||
<version>${flexmark.version}</version>
|
<version>${flexmark.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>alfresco-transformer-base</artifactId>
|
<artifactId>beedk-ate-springboot-test</artifactId>
|
||||||
<version>${ats.version}</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
<type>pom</type>
|
||||||
<dependency>
|
<scope>test</scope>
|
||||||
<groupId>org.alfresco</groupId>
|
</dependency>
|
||||||
<artifactId>alfresco-transformer-base</artifactId>
|
|
||||||
<version>${ats.version}</version>
|
|
||||||
<classifier>tests</classifier>
|
|
||||||
<type>test-jar</type>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<version>${spring-boot.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>com.vaadin.external.google</groupId>
|
|
||||||
<artifactId>android-json</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.inteligr8</groupId>
|
<groupId>com.inteligr8</groupId>
|
||||||
<artifactId>junit4-ext</artifactId>
|
<artifactId>junit4-ext</artifactId>
|
||||||
@ -101,189 +87,28 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<resources>
|
|
||||||
<resource>
|
|
||||||
<directory>src/main/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
<testResources>
|
|
||||||
<testResource>
|
|
||||||
<directory>src/test/resources</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</testResource>
|
|
||||||
</testResources>
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>io.repaint.maven</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>tiles-maven-plugin</artifactId>
|
||||||
<version>${spring-boot.version}</version>
|
<version>2.19</version>
|
||||||
<executions>
|
<extensions>true</extensions>
|
||||||
<execution>
|
<configuration>
|
||||||
<goals>
|
<tiles>
|
||||||
<goal>repackage</goal>
|
<tile>com.inteligr8.alfresco:beedk-ate-springboot-tile:1.0-SNAPSHOT</tile>
|
||||||
</goals>
|
<tile>com.inteligr8.alfresco:beedk-ate-docker-tile:1.0-SNAPSHOT</tile>
|
||||||
</execution>
|
<tile>com.inteligr8:maven-private-deploy-tile:[1.0.0,2.0.0)</tile>
|
||||||
</executions>
|
</tiles>
|
||||||
</plugin>
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.22.2</version>
|
<version>2.22.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-failsafe-plugin</artifactId>
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
<version>2.22.2</version>
|
<version>2.22.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>docker</id>
|
|
||||||
<properties>
|
|
||||||
<!-- with docker enabled, only deploy docker image, not standalone spring-boot app -->
|
|
||||||
<maven.deploy.skip>true</maven.deploy.skip>
|
|
||||||
</properties>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<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>${basedir}/src/main/docker</directory>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>com.spotify</groupId>
|
|
||||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
|
||||||
<version>1.4.13</version>
|
|
||||||
<configuration>
|
|
||||||
<contextDirectory>${project.build.directory}</contextDirectory>
|
|
||||||
<repository>${image.registry}/${image.name}</repository>
|
|
||||||
<tag>${image.tag}</tag>
|
|
||||||
<buildArgs>
|
|
||||||
<JAR_FILE>${project.artifactId}-${project.version}.jar</JAR_FILE>
|
|
||||||
</buildArgs>
|
|
||||||
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>docker-build</id>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals><goal>build</goal></goals>
|
|
||||||
<configuration>
|
|
||||||
<repository>${image.name}</repository>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>docker-tag-registry</id>
|
|
||||||
<phase>install</phase>
|
|
||||||
<goals><goal>tag</goal></goals>
|
|
||||||
</execution>
|
|
||||||
<execution>
|
|
||||||
<id>docker-push</id>
|
|
||||||
<phase>deploy</phase>
|
|
||||||
<goals><goal>push</goal></goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
|
|
||||||
<profile>
|
|
||||||
<id>docker-test</id>
|
|
||||||
<!-- raises an ActiveMq container for the Integration Tests -->
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>docker-maven-plugin</artifactId>
|
|
||||||
<configuration>
|
|
||||||
<images>
|
|
||||||
<image>
|
|
||||||
<alias>activemq</alias>
|
|
||||||
<name>alfresco/alfresco-activemq:${activemq.version}</name>
|
|
||||||
<run>
|
|
||||||
<hostname>activemq</hostname>
|
|
||||||
<ports>
|
|
||||||
<port>8161:8161</port>
|
|
||||||
<port>5672:5672</port>
|
|
||||||
<port>61616:61616</port>
|
|
||||||
</ports>
|
|
||||||
<wait>
|
|
||||||
<log>Apache ActiveMQ ${activemq.version} .* started</log>
|
|
||||||
<time>20000</time>
|
|
||||||
<kill>500</kill>
|
|
||||||
<shutdown>100</shutdown>
|
|
||||||
<exec>
|
|
||||||
<preStop>kill 1</preStop>
|
|
||||||
<preStop>kill -9 1</preStop>
|
|
||||||
</exec>
|
|
||||||
</wait>
|
|
||||||
</run>
|
|
||||||
</image>
|
|
||||||
<image>
|
|
||||||
<alias>${project.artifactId}</alias>
|
|
||||||
<name>${image.name}:${image.tag}</name>
|
|
||||||
<!-- this will use the built image; not the local Dockerfile -->
|
|
||||||
<run>
|
|
||||||
<ports>
|
|
||||||
<port>8090:8090</port>
|
|
||||||
</ports>
|
|
||||||
<wait>
|
|
||||||
<http>
|
|
||||||
<url>http://localhost:8090/transform/config</url>
|
|
||||||
<method>GET</method>
|
|
||||||
<status>200...299</status>
|
|
||||||
</http>
|
|
||||||
<time>300000</time>
|
|
||||||
<kill>500</kill>
|
|
||||||
<shutdown>100</shutdown>
|
|
||||||
<exec>
|
|
||||||
<preStop>kill 1</preStop>
|
|
||||||
<preStop>kill -9 1</preStop>
|
|
||||||
</exec>
|
|
||||||
</wait>
|
|
||||||
</run>
|
|
||||||
</image>
|
|
||||||
</images>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>inteligr8-releases</id>
|
|
||||||
<url>http://repos.yateslong.us/nexus/repository/inteligr8-private</url>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>inteligr8-snapshots</id>
|
|
||||||
<url>http://repos.yateslong.us/nexus/repository/inteligr8-snapshots</url>
|
|
||||||
<snapshots>
|
|
||||||
<updatePolicy>daily</updatePolicy>
|
|
||||||
</snapshots>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>alfresco-public</id>
|
|
||||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user