initial checkin
This commit is contained in:
9
beedk-acs-share-self-rad-tile/.gitignore
vendored
Normal file
9
beedk-acs-share-self-rad-tile/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Eclipse
|
||||
.project
|
||||
.classpath
|
||||
.settings
|
||||
|
||||
# Maven
|
||||
pom.xml.versionsBackup
|
||||
target
|
||||
|
73
beedk-acs-share-self-rad-tile/README.md
Normal file
73
beedk-acs-share-self-rad-tile/README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# BeeDK ACS Share RAD Maven Tile for Share Projects
|
||||
|
||||
This is a component within the proposed [BeeDK](/inteligr8/ootbee-beedk). It is considered to be part of the **Public API** of the BeeDK.
|
||||
|
||||
## Purpose
|
||||
|
||||
This project creates a [Maven Tile](https://github.com/repaint-io/maven-tiles) that provides the basis for rapid application development of any ACS Share module, extension, service, or web application.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this plugin, just reference it with the Maven Tiles plugin as shown in the following snippet. Do not forget the `extensions` element in the *plugin* configuration.
|
||||
|
||||
```xml
|
||||
<project ...>
|
||||
...
|
||||
<build>
|
||||
...
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>[2.0,3.0)</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
...
|
||||
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-acs-share-self-rad-tile -->
|
||||
<tile>com.inteligr8.ootbee:beedk-acs-share-self-rad-tile:[1.0.0,2.0.0)</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
...
|
||||
</plugins>
|
||||
...
|
||||
</build>
|
||||
...
|
||||
</project>
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
In your Maven project, set the following properties to define the behavior of this Maven Tile. Unless otherwise stated, they can only be overridden in the project POM or other Maven Tiles loaded earlier than this Maven Tile.
|
||||
|
||||
### Public API
|
||||
|
||||
The following properties are intended to be exposed by inheriting Public API Maven Tiles.
|
||||
|
||||
| Maven Property | Required | Default | Description |
|
||||
| ---------------------------------- |:--------:| ------------------ | ----------- |
|
||||
| `alfresco.sdk.version` | **YES** | | For a list of versions and more details, see the [Alfresco SDK](https://github.com/Alfresco/alfresco-sdk).<br/>*Inherited from [`beedk-acs-webapp-artifact-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-webapp-artifact-rad-tile)* |
|
||||
| `alfresco.share.version` | *Maybe* | | The Alfresco Share version to use for RAD. See below for more details. |
|
||||
| `alfresco.war.artifactId` | | `share` | The Maven `artifactId` of a Maven `war` Type Project defined in a Maven Repository.<br/>*Inherited from [`beedk-acs-webapp-artifact-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-webapp-artifact-tile)* |
|
||||
| `alfresco.war.version` | *Maybe* | *See Below* | The Maven `version` of a Maven `war` Type Project defined in a Maven Repository.<br/>*Inherited from [`beedk-acs-webapp-artifact-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-webapp-artifact-tile)* |
|
||||
| `project.build.shareExtDirectory` | | `${project.build.directory}/ext/share` | An additional directory of JARs to add to the ACS Share at runtime. |
|
||||
| `acs-platform.url` | | *See Below* | The URL of the backend ACS Platform to be used. |
|
||||
| `acs-share.port` | | 8180 | The port to expose on `localhost` for the developer; not for other applications or users. |
|
||||
| `acs-share.debugger.port` | | 8100 | The port to expose on `localhost` for the developer; not for other applications or users. |
|
||||
| `acs-share.timeout` | | 45000 | The time to wait for the startup to complete, in milliseconds. |
|
||||
| `tomcat-rad.version` | | *not important* | The version of the [Apache Tomcat Rapid Application Development Docker container](/inteligr8/tomcat-rad-docker). |
|
||||
|
||||
* The `alfresco.share.version` is used to default the `alfresco.war.version`. It is expected to be used by other Maven Tiles, so it is here for convenience. You must specify either property for this tile to function.
|
||||
* The `acs-platform.url` will default to the appropriate value when using the `beedk-acs-platform-*-rad-tile` tiles. This should be overridden if you are not using those tiles and are instead using some other ACS Platform instance.
|
||||
|
||||
### Other APIs
|
||||
|
||||
Additional less important configurations are inherited from the following Maven Tiles.
|
||||
|
||||
* [`beedk-run-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-run-tile)
|
||||
* [`beedk-acs-webapp-artifact-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-webapp-artifact-rad-tile)
|
||||
|
||||
## Results
|
||||
|
||||
ACS Share will be started during the `process-classes` Maven phase.
|
47
beedk-acs-share-self-rad-tile/pom.xml
Normal file
47
beedk-acs-share-self-rad-tile/pom.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.inteligr8.ootbee</groupId>
|
||||
<artifactId>beedk-acs-share-self-rad-tile</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>tile</packaging>
|
||||
|
||||
<name>Order of the Bee Development Kit: RAD for ACS Share</name>
|
||||
<scm>
|
||||
<url>https://bitbucket.org/inteligr8/ootbee-beedk</url>
|
||||
</scm>
|
||||
<organization>
|
||||
<name>Order of the Bee</name>
|
||||
<url>https://orderofthebee.net</url>
|
||||
</organization>
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Brian Long</name>
|
||||
<email>brian@inteligr8.com</email>
|
||||
<organization>Inteligr8</organization>
|
||||
<organizationUrl>https://www.inteligr8.com</organizationUrl>
|
||||
<url>https://twitter.com/brianmlong</url>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.20</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>com.inteligr8:maven-public-deploy-tile:[1.0.0,2.0.0)</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
167
beedk-acs-share-self-rad-tile/tile.xml
Normal file
167
beedk-acs-share-self-rad-tile/tile.xml
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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://bitbucket.org/inteligr8/maven-tiles/raw/xsd/src/main/resources/maven-tiles.xsd">
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>rad-acs-share-self</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>rad</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- This plugin downloads the Share JAR-based extension modules and runtime/test dependencies -->
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>3.1.2</version>
|
||||
<executions>
|
||||
<!-- This execution downloads the dependency JARs, including JAR modules -->
|
||||
<execution>
|
||||
<id>download-share-jars</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals><goal>copy-dependencies</goal></goals>
|
||||
<configuration>
|
||||
<excludeScope>provided</excludeScope>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<outputDirectory>${project.build.shareExtDirectory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 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>${basedir}/target/download</basedir>
|
||||
<outputBasedir>${basedir}/target/test-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>
|
||||
<version>${beedk.plugins.fabric8.docker.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>run-acs-share</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals><goal>start</goal></goals>
|
||||
<configuration>
|
||||
<tiles-keep-id>true</tiles-keep-id>
|
||||
<images>
|
||||
<image>
|
||||
<name>docker.inteligr8.com/inteligr8/tomcat-rad:${tomcat-rad.version}</name>
|
||||
<alias>acs-share</alias>
|
||||
<run>
|
||||
<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>${project.build.warFile}:/var/lib/tomcat/webapps/share.war:ro</volume>
|
||||
<volume>${project.build.outputDirectory}:/var/lib/tomcat/dev/classes:ro</volume>
|
||||
<volume>${project.build.directory}/module-classes:/var/lib/tomcat/dev/classes-extra1:ro</volume>
|
||||
<volume>${project.build.directory}/extension-classes:/var/lib/tomcat/dev/classes-extra2:ro</volume>
|
||||
<volume>${project.build.testOutputDirectory}:/var/lib/tomcat/dev/classes-extra3:ro</volume>
|
||||
<volume>${project.build.shareExtDirectory}:/var/lib/tomcat/dev/lib:ro</volume>
|
||||
<volume>${project.build.directory}/web-resources:/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>
|
||||
<profile>
|
||||
<id>default-props</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>!some-prop-that-never-exists</name>
|
||||
</property>
|
||||
</activation>
|
||||
<properties>
|
||||
<!-- configurable -->
|
||||
<acs-platform.url>http://${project.artifactId}-acs-platform:8080</acs-platform.url>
|
||||
<acs-share.debugger.port>8100</acs-share.debugger.port>
|
||||
<acs-share.timeout>45000</acs-share.timeout>
|
||||
<project.build.shareExtDirectory>${project.build.directory}/ext/share</project.build.shareExtDirectory>
|
||||
|
||||
<!-- ports -->
|
||||
<acs-share.port>8180</acs-share.port>
|
||||
|
||||
<!-- versions -->
|
||||
<tomcat-rad.version>9-1.3</tomcat-rad.version>
|
||||
|
||||
<!-- configuring beedk-acs-webapp-artifact-tile -->
|
||||
<alfresco.war.artifactId>share</alfresco.war.artifactId>
|
||||
<alfresco.war.version>${alfresco.share.version}</alfresco.war.version>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<tiles>
|
||||
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-run-tile -->
|
||||
<tile>com.inteligr8.ootbee:beedk-run-tile:1.0-SNAPSHOT</tile>
|
||||
<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-acs-webapp-artifact-rad-tile -->
|
||||
<tile>com.inteligr8.ootbee:beedk-acs-webapp-artifact-rad-tile:1.0-SNAPSHOT</tile>
|
||||
</tiles>
|
||||
|
||||
</project>
|
Reference in New Issue
Block a user