188 lines
7.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <https://www.gnu.org/licenses/>.
*
-->
<project xmlns="http://tiles.bluetrainsoftware.com/maven/tiles/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tiles.bluetrainsoftware.com/maven/tiles/1.1.0 https://git.inteligr8.com/inteligr8/maven-tiles/raw/xsd/src/main/resources/maven-tiles.xsd">
<profiles>
<profile>
<id>rad-acs-share</id>
<activation>
<property>
<name>rad</name>
</property>
</activation>
<build>
<plugins>
<!-- This plugin downloads the Alfresco SDK configuration for Share -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.1</version>
<executions>
<execution>
<id>download-share-config</id>
<phase>generate-resources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://raw.githubusercontent.com/Alfresco/alfresco-sdk/alfresco-sdk-aggregator-${alfresco.sdk.version}/archetypes/alfresco-share-jar-archetype/src/main/resources/archetype-resources/src/main/docker/share-config-custom.xml</url>
<outputDirectory>${project.build.directory}/download</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- This plugin configures the Share configuration for the BeeDK -->
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${project.build.directory}/download</basedir>
<outputBasedir>${project.build.directory}/runtime-classes</outputBasedir>
<file>share-config-custom.xml</file>
<outputDir>alfresco/web-extension</outputDir>
<replacements>
<replacement>
<token>http://\$\{acs\.host\}:8080</token>
<value>${acs-platform.url}</value>
</replacement>
</replacements>
</configuration>
</plugin>
<!-- Using Docker to host the web application -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<executions>
<execution>
<id>run-acs-share</id>
<phase>process-test-classes</phase>
<goals><goal>start</goal></goals>
<configuration>
<images>
<image>
<name>docker.inteligr8.com/inteligr8/tomcat-rad:${tomcat-rad.version}</name>
<alias>acs-share</alias>
<run>
<env>
<ENABLE_JDWP>${acs-share.debugger.enabled}</ENABLE_JDWP>
<ENABLE_HOTSWAP>${acs-share.hotswap.enabled}</ENABLE_HOTSWAP>
<DISABLE_HOTSWAP_PLUGINS>${acs-share.hotswap.disablePlugins}</DISABLE_HOTSWAP_PLUGINS>
<CATALINA_OPTS>${acs-share.tomcat.opts}</CATALINA_OPTS>
</env>
<ports>
<port>${acs-share.port}:8080</port>
<port>${acs-share.debugger.port}:8000</port>
</ports>
<network>
<mode>custom</mode>
<name>${project.artifactId}</name>
</network>
<volumes>
<bind>
<volume>${beedk.deploy.share.warFile}:/var/lib/tomcat/webapps/share.war:ro</volume>
<volume>${beedk.deploy.share.classesDirectory}:/var/lib/tomcat/dev/classes:ro</volume>
<volume>${beedk.deploy.share.modClassesDirectory}:/var/lib/tomcat/dev/classes-extra1:ro</volume>
<volume>${beedk.deploy.share.extClassesDirectory}:/var/lib/tomcat/dev/classes-extra2:ro</volume>
<volume>${beedk.deploy.share.testClassesDirectory}:/var/lib/tomcat/dev/classes-extra3:ro</volume>
<volume>${project.build.directory}/runtime-classes:/var/lib/tomcat/dev/classes-extra4:ro</volume>
<volume>${beedk.deploy.share.extDirectory}:/var/lib/tomcat/dev/lib:ro</volume>
<volume>${beedk.deploy.share.webDirectory}:/var/lib/tomcat/dev/web:ro</volume>
</bind>
</volumes>
<wait>
<http>
<url>http://localhost:${acs-share.port}/share</url>
<method>GET</method>
<status>200..399</status>
</http>
<time>${acs-share.timeout}</time>
</wait>
</run>
</image>
</images>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- allow downstream tiles to default this before this tile does -->
<profile>
<id>tomcat-opts-unspecified</id>
<activation>
<property>
<name>!acs-share.tomcat.opts</name>
</property>
</activation>
<properties>
<acs-share.tomcat.opts></acs-share.tomcat.opts>
</properties>
</profile>
<profile>
<id>default-props</id>
<activation>
<property>
<name>!some-prop-that-never-exists</name>
</property>
</activation>
<properties>
<!-- configurable -->
<beedk.deploy.share.classesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.share.classesDirectory>
<beedk.deploy.share.modClassesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.share.modClassesDirectory>
<beedk.deploy.share.extClassesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.share.extClassesDirectory>
<beedk.deploy.share.testClassesDirectory>${project.build.directory}/doesnotexist</beedk.deploy.share.testClassesDirectory>
<beedk.deploy.share.extDirectory>${project.build.directory}/doesnotexist</beedk.deploy.share.extDirectory>
<beedk.deploy.share.webDirectory>${project.build.directory}/doesnotexist</beedk.deploy.share.webDirectory>
<beedk.deploy.share.warDirectory>${project.build.warDirectory}</beedk.deploy.share.warDirectory>
<acs-platform.url>http://${project.artifactId}-acs-platform:8080</acs-platform.url>
<acs-share.timeout>150000</acs-share.timeout>
<acs-share.debugger.enabled>true</acs-share.debugger.enabled>
<acs-share.hotswap.enabled>true</acs-share.hotswap.enabled>
<acs-share.hotswap.disablePlugins></acs-share.hotswap.disablePlugins>
<!-- ports -->
<acs-share.port>8180</acs-share.port>
<acs-share.debugger.port>8100</acs-share.debugger.port>
<!-- versions -->
<tomcat-rad.version>9-2.1</tomcat-rad.version>
<!-- configuring beedk-acs-webapp-artifact-tile -->
<alfresco.war.artifactId>share</alfresco.war.artifactId>
</properties>
</profile>
</profiles>
<tiles>
<!-- Documentation: https://git.inteligr8.com/inteligr8/ootbee-beedk/src/branch/stable/beedk-run-tile -->
<tile>@project.groupId@:beedk-run-tile:@project.version@</tile>
</tiles>
</project>