Commit 585b2cf7 authored by Brian Long's avatar Brian Long
Browse files

refactored acs-share RAD

parent c6df9000
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -60,11 +60,10 @@ The following properties are intended to be exposed by inheriting Public API Mav

| 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-aritfact-rad-tile)* |
| `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.platform.version`        | *Maybe*  |                    | The Alfresco Platform version to use for RAD.  See below for more details. |
| `edition`                          |          | `community`        | The Alfresco Platform edition used for RAD.  `community` or `enterprise`.  See below for more details. |
| `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.extDirectory`       |  | `${project.build.directory}/ext/platform` | An additional directory of JARs to add to the ACS Platform at runtime. |
| `acs-platform.port`                |          | 8080               | The port to expose on `localhost` for the developer; not for other applications or users.<br/>*Inherited from [`beedk-acs-platform-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-platform-rad-tile)* |
| `acs-platform.debugger.port`       |          | 8000               | The port to expose on `localhost` for the developer; not for other applications or users.<br/>*Inherited from [`beedk-acs-platform-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-platform-rad-tile)* |
| `acs-postgres.port`                |          | 5432               | The port to expose on `localhost` for the developer; not for other applications or users.<br/>*Inherited from [`beedk-acs-platform-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-platform-rad-tile)* |
+9 −0
Original line number Diff line number Diff line
# Eclipse
.project
.classpath
.settings

# Maven
pom.xml.versionsBackup
target
+82 −0
Original line number Diff line number Diff line
# BeeDK ACS Share RAD Maven Tile for non-Share-accessible 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 any Maven project against the ACS Platform.

## 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-artifact-rad-tile -->
						<tile>com.inteligr8.ootbee:beedk-acs-share-artifact-rad-tile:[1.0.0,2.0.0)</tile>
					</tiles>
				</configuration>
			</plugin>
			...
		</plugins>
		...
	</build>
	...
</project>
```

There are 2 other alternative tiles that serve a similar purpose, but are for other use cases.  Make sure you are using the right one.  Follow the logic below.

Is your Maven project an ACS Share module or ACS Share web application?
: You will be declaring the `beedk-acs-share-module-tile` or `beedk-acs-share-webapp-tile` Maven Tile.  You will need to explicitly declare and configure the [`beedk-acs-share-self-rad-tile` Maven Tile](../beedk-acs-share-self-rad-tile).

Is your Maven project just one within a set of other Maven projects AND one of those other Maven projects is an ACS Share web application (not a module)?
: You will need to explicitly declare and configure the [`beedk-acs-share-sibling-rad-tile` Maven Tile](../beedk-acs-share-sibling-rad-tile).

Otherwise
: You will need to explicitly declare and configure the `beedk-acs-share-artifact-rad-tile` Maven Tile.

See the [BeeDK documentation](/inteligr8/ootbee-beedk) on instructions for how to start and stop RAD capabilities.

## 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.share.version`           | Maybe    |                    | The Alfresco Share version to use for RAD.  See below for more details. |
| `alfresco.share.war.groupId`       |          | `org.alfresco`     | The Maven `groupId` of a Maven `war` Type Project defined in a Maven Repository. |
| `alfresco.share.war.artifactId`    |          | `share`            | The Maven `artifactId` of a Maven `war` Type Project defined in a Maven Repository. |
| `alfresco.share.war.version`       | Maybe    | *See Below*        | The Maven `version` of a Maven `war` Type Project defined in a Maven Repository. |
| `acs-share.port`                   |          | 8180               | The port to expose on `localhost` for the developer; not for other applications or users.<br/>*Inherited from [`beedk-acs-share-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-share-rad-tile)* |
| `acs-share.debugger.port`          |          | 8100               | The port to expose on `localhost` for the developer; not for other applications or users.<br/>*Inherited from [`beedk-acs-share-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-share-rad-tile)* |
| `acs-share.tomcat.opts`            |          |                    | Additional `CATALINA_OPTS` to add to the Apache Tomcat startup.<br/>*May be overridden by any POM parent or Maven Tile.*<br/>*Inherited from [`beedk-acs-share-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-share-rad-tile)* |

*   The `alfresco.share.version` is used to default the `alfresco.share.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.


### Other APIs

Additional less important configurations are inherited from the following Maven Tiles.

*   [`beedk-acs-share-rad-tile`](/inteligr8/ootbee-beedk/src/stable/beedk-acs-share-rad-tile)

## Results

The ACS Share component will be started during the `process-classes` Maven phase.
+48 −0
Original line number Diff line number Diff line
<?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-artifact-rad-tile</artifactId>
	<version>1.0-SNAPSHOT</version>
	<packaging>tile</packaging>

	<name>Order of the Bee Development Kit: RAD for ACS Share by Maven Artifact</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>
					<filtering>true</filtering>
					<tiles>
						<tile>com.inteligr8:maven-public-deploy-tile:[1.0.0,2.0.0)</tile>
					</tiles>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
+69 −0
Original line number Diff line number Diff line
<?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-artifact</id>
			<activation>
				<property>
					<name>rad</name>
				</property>
			</activation>
			<build>
				<plugins>
					<!-- This plugin downloads the Share WAR -->
					<plugin>
						<artifactId>maven-dependency-plugin</artifactId>
						<version>3.1.2</version>
						<executions>
							<!-- This execution downloads the Share WAR -->
							<execution>
								<id>download-platform-webapp</id>
								<phase>generate-resources</phase>
								<goals><goal>copy</goal></goals>
								<configuration>
									<artifactItems>
										<artifactItem>
											<groupId>${alfresco.share.war.groupId}</groupId>
											<artifactId>${alfresco.share.war.artifactId}</artifactId>
											<version>${alfresco.share.war.version}</version>
											<type>war</type>
										</artifactItem>
									</artifactItems>
									<outputDirectory>${beedk.deploy.share.warDirectory}</outputDirectory>
								</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 -->
				<project.build.warDirectory>${project.build.directory}/war</project.build.warDirectory>
				<alfresco.share.war.groupId>org.alfresco</alfresco.share.war.groupId>
				<alfresco.share.war.artifactId>share</alfresco.share.war.artifactId>
				<alfresco.share.war.version>${alfresco.share.version}</alfresco.share.war.version>

				<!-- configuring beedk-acs-share-rad-tile -->
				<beedk.deploy.share.warFile>${project.build.warDirectory}/${alfresco.share.war.artifactId}-${alfresco.share.war.version}.war</beedk.deploy.share.warFile>
				<beedk.deploy.share.extDirectory>${project.build.directory}/ext/share</beedk.deploy.share.extDirectory>
			</properties>
		</profile>
	</profiles>
	
	<tiles>
		<!-- Documentation: https://bitbucket.org/inteligr8/ootbee-beedk/src/stable/beedk-acs-share-rad-tile -->
		<tile>@project.groupId@:beedk-acs-share-rad-tile:@project.version@</tile>
	</tiles>

</project>
Loading