Skip to content

Commit

Permalink
Added support for APS 24.3.0 (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenPj committed Aug 27, 2024
1 parent ee7d0ed commit b331c48
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 37 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Alfresco Process Services SDK Project 3.0.2
# Alfresco Process Services SDK Project 3.0.3

The project consists of the following Maven submodules:

Expand Down Expand Up @@ -203,15 +203,16 @@ Put your Java test classes in the following package:

In order to build the project, you can declare a Maven profile related to a specific APS version:

* `aps24.2.1` (APS 24.2.1 - default)
* `aps24.3.0` (APS 24.3.0 - default)
* `aps24.2.1` (APS 24.2.1)
* `aps24.2.0` (APS 24.2.0)
* `aps24.1.0` (APS 24.1.0)


Build and test with unit tests execution for APS 24.2.1 with:
Build and test with unit tests execution for APS 24.3.0 with:
`mvn clean test`

Build and test with unit tests execution for APS 2.3.1 with:
Build and test with unit tests execution for APS 24.1.0 with:
`mvn clean test -Paps24.1.0`

Build your Docker container with:
Expand Down
2 changes: 1 addition & 1 deletion activiti-app-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco.activiti</groupId>
<artifactId>aps-project</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class FourEyesAppIT {
protected static final String BASE_PATH_HOSTNAME = "localhost";
protected static final int BASE_PATH_PORT = 8080;

protected static final String appZipFile = "aps-extensions-jar-3.0.2-App.zip";
protected static final String appZipFile = "aps-extensions-jar-3.0.3-App.zip";

protected static final String ACTIVITI_APP_BASE_PATH = BASE_PATH_PROTOCOL + "://" + BASE_PATH_HOSTNAME + ":"
+ BASE_PATH_PORT;
Expand Down
2 changes: 1 addition & 1 deletion activiti-app-overlay-docker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco.activiti</groupId>
<artifactId>aps-project</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>

<properties>
Expand Down
37 changes: 37 additions & 0 deletions activiti-app-overlay-docker/src/main/docker/Dockerfile-24.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM alfresco/process-services:${aps.docker.version}

ENV ACTIVITI_DATASOURCE_USERNAME ${docker.aps.database.username}
ENV ACTIVITI_DATASOURCE_PASSWORD ${docker.aps.database.password}
ENV ACTIVITI_DATASOURCE_DRIVER ${docker.aps.database.driver}
ENV ACTIVITI_HIBERNATE_DIALECT ${docker.aps.database.dialect}
ENV ACTIVITI_DATASOURCE_URL ${docker.aps.database.url}
ENV ACTIVITI_CSRF_DISABLED ${docker.aps.database.csrf.disabled}
ENV ACTIVITI_CORS_ENABLED ${docker.aps.database.cors.enabled}
ENV ACTIVITI_ES_SERVER_TYPE ${docker.aps.es.server.type}
ENV ACTIVITI_ES_DISCOVERY_HOSTS ${docker.aps.es.discovery.host}
ENV ACTIVITI_ES_CLUSTER_NAME ${docker.aps.es.cluster.name}

ENV LC_ALL C

ARG TOMCAT_DIR=/usr/local/tomcat
ARG USERNAME=alfresco
ARG CONTENT_STORAGE_DIR=/act_data

USER root

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} properties/activiti-app.properties $TOMCAT_DIR/lib

COPY --chown=${USERNAME} extensions/activiti-app.war $TOMCAT_DIR/webapps

COPY --chown=${USERNAME} license/*.* $TOMCAT_DIR/lib/

RUN chown ${USERNAME}:${USERNAME} -R /usr/local/tomcat

RUN mkdir -p ${CONTENT_STORAGE_DIR}
RUN chown ${USERNAME}:${USERNAME} ${CONTENT_STORAGE_DIR}

USER ${USERNAME}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM tomcat:10-jdk17-openjdk

ENV ACTIVITI_DATASOURCE_USERNAME: ${docker.aps.database.username}
ENV ACTIVITI_DATASOURCE_PASSWORD: ${docker.aps.database.password}
ENV ACTIVITI_DATASOURCE_DRIVER: ${docker.aps.database.driver}
ENV ACTIVITI_HIBERNATE_DIALECT: ${docker.aps.database.dialect}
ENV ACTIVITI_DATASOURCE_URL: ${docker.aps.database.url}
ENV ACTIVITI_CSRF_DISABLED: ${docker.aps.database.csrf.disabled}
ENV ACTIVITI_CORS_ENABLED: ${docker.aps.database.cors.enabled}
ENV ACTIVITI_ES_SERVER_TYPE: ${docker.aps.es.server.type}
ENV ACTIVITI_ES_DISCOVERY_HOSTS: ${docker.aps.es.discovery.host}
ENV ACTIVITI_ES_CLUSTER_NAME: ${docker.aps.es.cluster.name}

ENV LC_ALL=C

ARG TOMCAT_DIR=/usr/local/tomcat
ARG USERNAME=alfresco
ARG USERID=33007
ARG CONTENT_STORAGE_DIR=/act_data

USER root

RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

RUN rm -rf $TOMCAT_DIR/webapps/activiti-app

#COPY --chown=${USERNAME} extensions/aps-extensions-jar-${project.version}.jar $TOMCAT_DIR/lib

COPY --chown=${USERNAME} properties/activiti-app.properties $TOMCAT_DIR/lib

COPY --chown=${USERNAME} extensions/activiti-app.war $TOMCAT_DIR/webapps

COPY --chown=${USERNAME} license/activiti.lic $TOMCAT_DIR/lib

COPY --chown=${USERNAME} license/transform.lic $TOMCAT_DIR/lib

RUN chown ${USERNAME}:${USERNAME} -R /usr/local/tomcat

RUN mkdir -p ${CONTENT_STORAGE_DIR}
RUN chown ${USERNAME}:${USERNAME} ${CONTENT_STORAGE_DIR}

USER ${USERNAME}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM alfresco/process-services-admin:${aps.docker.version}

ARG TOMCAT_DIR=/usr/local/tomcat
ARG USERNAME=alfresco

USER root

ADD --chown=${USERNAME} jdbc $TOMCAT_DIR/lib
COPY --chown=${USERNAME} properties/activiti-admin.properties $TOMCAT_DIR/lib
COPY --chown=${USERNAME} tomcat/conf/server.xml $TOMCAT_DIR/conf

RUN chown ${USERNAME}:${USERNAME} -R /usr/local/tomcat

USER ${USERNAME}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM tomcat:10-jdk17-openjdk-slim

ARG TOMCAT_DIR=/usr/local/tomcat
ARG USERNAME=alfresco
ARG USERID=33007

USER root

RUN useradd -c "Alfresco APS" -M -s "/bin/bash" -u "${USERID}" -o "${USERNAME}"

ADD --chown=${USERNAME} jdbc $TOMCAT_DIR/lib
COPY --chown=${USERNAME} extensions/activiti-admin.war $TOMCAT_DIR/webapps
COPY --chown=${USERNAME} properties/activiti-admin.properties $TOMCAT_DIR/lib
COPY --chown=${USERNAME} tomcat/conf/server.xml $TOMCAT_DIR/conf

RUN chown ${USERNAME}:${USERNAME} -R /usr/local/tomcat

USER ${USERNAME}
2 changes: 1 addition & 1 deletion activiti-app-overlay-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco.activiti</groupId>
<artifactId>aps-project</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>

<dependencies>
Expand Down
8 changes: 7 additions & 1 deletion aps-extensions-jar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco.activiti</groupId>
<artifactId>aps-project</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
</parent>

<dependencyManagement>
Expand Down Expand Up @@ -106,6 +106,12 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<version>${micrometer-registry-prometheus.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type=bpmSuite
version.major=24
version.minor=3
version.revision=0
version.edition=Alfresco Process Services (powered by Activiti)
45 changes: 43 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco.activiti</groupId>
<artifactId>aps-project</artifactId>
<version>3.0.2</version>
<version>3.0.3</version>
<packaging>pom</packaging>
<name>APS - SDK Project - 3.x</name>

Expand Down Expand Up @@ -115,6 +115,7 @@
<h2.version>2.2.224</h2.version>
<postgresql.version>13.12</postgresql.version>
<slf4j.version>2.0.12</slf4j.version>
<micrometer-registry-prometheus.version>1.12.5</micrometer-registry-prometheus.version>
<skipITs>false</skipITs>
<skip.integration.test>false</skip.integration.test>
<skip.swagger.client.generation>false</skip.swagger.client.generation>
Expand All @@ -126,7 +127,7 @@
<profile>
<id>aps24.2.1</id>
<activation>
<activeByDefault>true</activeByDefault>
<activeByDefault>false</activeByDefault>
</activation>

<properties>
Expand All @@ -153,6 +154,46 @@
<h2.version>2.2.224</h2.version>
<postgresql.version>13.12</postgresql.version>
<slf4j.version>2.0.12</slf4j.version>
<micrometer-registry-prometheus.version>1.12.5</micrometer-registry-prometheus.version>
<skipITs>false</skipITs>
<skip.integration.test>false</skip.integration.test>
<skip.swagger.client.generation>false</skip.swagger.client.generation>
<docker-maven-plugin.skip.save>false</docker-maven-plugin.skip.save>
<docker-maven-plugin.build.save>false</docker-maven-plugin.build.save>
</properties>
</profile>

<profile>
<id>aps24.3.0</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>

<properties>
<!-- APS 24.3.0 -->
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<aps.version>24.3.0</aps.version>
<aps.docker.version>24.3.0</aps.docker.version>
<aps.version.major>24</aps.version.major>
<aps.version.minor>3</aps.version.minor>
<aps.version.revision>0</aps.version.revision>
<aps.2x.client.version>v2.3.7</aps.2x.client.version>
<opencsv.version>5.9</opencsv.version>
<jackson.version>2.17.1</jackson.version>
<bcprov.version>1.78</bcprov.version>
<activiti.version>8.1.2</activiti.version>
<spring.version>6.1.10.RELEASE</spring.version>
<spring-boot.version>3.3.1</spring-boot.version>
<spring-security.version>6.3.2</spring-security.version>
<elasticsearch.version>8.14.1</elasticsearch.version>
<elasticsearch-rest-client.artifactId>elasticsearch-rest-client</elasticsearch-rest-client.artifactId>
<elasticsearch-rest-client.version>8.13.4</elasticsearch-rest-client.version>
<hibernate.version>6.5.2.Final</hibernate.version>
<h2.version>2.2.224</h2.version>
<postgresql.version>13.12</postgresql.version>
<slf4j.version>2.0.12</slf4j.version>
<micrometer-registry-prometheus.version>1.12.5</micrometer-registry-prometheus.version>
<skipITs>false</skipITs>
<skip.integration.test>false</skip.integration.test>
<skip.swagger.client.generation>false</skip.swagger.client.generation>
Expand Down
26 changes: 13 additions & 13 deletions run.bat
Original file line number Diff line number Diff line change
Expand Up @@ -134,34 +134,34 @@ EXIT /B %ERRORLEVEL%
docker volume create aps-db-volume
docker volume create aps-contentstore-volume
docker volume create aps-es-volume
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d --remove-orphans
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d --remove-orphans
EXIT /B 0
:start_admin
docker volume create aps-db-volume
docker volume create aps-contentstore-volume
docker volume create aps-es-volume
docker-compose -f "%COMPOSE_ADMIN_FILE_PATH%" up --build -d --remove-orphans
docker compose -f "%COMPOSE_ADMIN_FILE_PATH%" up --build -d --remove-orphans
EXIT /B 0
:start_activiti_app
docker volume create aps-db-volume
docker volume create aps-contentstore-volume
docker volume create aps-es-volume
docker-compose -f "%COMPOSE_FILE_PATH%" up --build -d aps-current-project --remove-orphans
docker compose -f "%COMPOSE_FILE_PATH%" up --build -d aps-current-project --remove-orphans
EXIT /B 0
:start_activiti_app_admin
docker volume create aps-db-volume
docker volume create aps-contentstore-volume
docker volume create aps-es-volume
docker-compose -f "%COMPOSE_ADMIN_FILE_PATH%" up --build -d aps-current-project --remove-orphans
docker compose -f "%COMPOSE_ADMIN_FILE_PATH%" up --build -d aps-current-project --remove-orphans
EXIT /B 0
:down
if exist "%COMPOSE_FILE_PATH%" (
docker-compose -f "%COMPOSE_FILE_PATH%" down
docker compose -f "%COMPOSE_FILE_PATH%" down
)
EXIT /B 0
:down_admin
if exist "%COMPOSE_ADMIN_FILE_PATH%" (
docker-compose -f "%COMPOSE_ADMIN_FILE_PATH%" down
docker compose -f "%COMPOSE_ADMIN_FILE_PATH%" down
)
EXIT /B 0
:build
Expand All @@ -171,26 +171,26 @@ EXIT /B 0
call %MVN_EXEC% clean pre-integration-test -Paps%APS_VERSION%,activiti-admin
EXIT /B 0
:build_activiti_app
docker-compose -f "%COMPOSE_FILE_PATH%" kill aps-current-project
docker-compose -f "%COMPOSE_FILE_PATH%" rm -f aps-current-project
docker compose -f "%COMPOSE_FILE_PATH%" kill aps-current-project
docker compose -f "%COMPOSE_FILE_PATH%" rm -f aps-current-project
call %MVN_EXEC% clean pre-integration-test -pl aps-extensions-jar,activiti-app-overlay-war,activiti-app-overlay-docker -Paps%APS_VERSION%
EXIT /B 0
:build_activiti_app_admin
docker-compose -f "%COMPOSE_ADMIN_FILE_PATH%" kill aps-current-project
docker-compose -f "%COMPOSE_ADMIN_FILE_PATH%" rm -f aps-current-project
docker compose -f "%COMPOSE_ADMIN_FILE_PATH%" kill aps-current-project
docker compose -f "%COMPOSE_ADMIN_FILE_PATH%" rm -f aps-current-project
call %MVN_EXEC% clean pre-integration-test -pl aps-extensions-jar,activiti-app-overlay-war,activiti-app-overlay-docker -Paps%APS_VERSION%,activiti-admin
EXIT /B 0
:tail
docker-compose -f "%COMPOSE_FILE_PATH%" logs -f
docker compose -f "%COMPOSE_FILE_PATH%" logs -f
EXIT /B 0
:tail_admin
docker-compose -f "%COMPOSE_ADMIN_FILE_PATH%" logs -f
docker compose -f "%COMPOSE_ADMIN_FILE_PATH%" logs -f
EXIT /B 0
:tail_all
docker-compose -f "%COMPOSE_FILE_PATH%" logs --tail="all"
EXIT /B 0
:tail_all_admin
docker-compose -f "%COMPOSE_ADMIN_FILE_PATH%" logs --tail="all"
docker compose -f "%COMPOSE_ADMIN_FILE_PATH%" logs --tail="all"
EXIT /B 0
:prepare-test
call %MVN_EXEC% verify -DskipTests=true -pl aps-extensions-jar,activiti-app-overlay-war,activiti-app-overlay-docker -Paps%APS_VERSION%
Expand Down
Loading

0 comments on commit b331c48

Please sign in to comment.