Skip to content

Commit

Permalink
chore(distro/run): integrate into platform structure
Browse files Browse the repository at this point in the history
* add Run to platform profile `distro` so its modules and assembly are built
  on ASSEMBLY job
* add Run to platform profile `distro-ce` so its run in DISTRO job
* run `distro` module of Run only in `distro-ce` so that no distro ZIP is built
  on ASSEMBLY run
* remove EE parts from Run
* add new Spring Boot banner
* add license headers
* adjust final ZIP's structure (clear separation of internal and configuration)
* add Spring Boot Starter artifacts to BOM
* extract Spring Boot version to camunda-root so Starter and Run can use it

related to CAM-11292
  • Loading branch information
tmetzke committed Feb 19, 2020
1 parent b10c4f1 commit 7cfb7d0
Show file tree
Hide file tree
Showing 25 changed files with 300 additions and 317 deletions.
25 changes: 25 additions & 0 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,31 @@
<artifactId>camunda-webapp-webjar-ee</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<version>${project.version}</version>
</dependency>

<!-- dmn engine dependencies
-->
Expand Down
10 changes: 5 additions & 5 deletions distro/run/assembly/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@
<files>
<file>
<source>resources/application.yml</source>
<outputDirectory>config/</outputDirectory>
<outputDirectory>configuration/</outputDirectory>
</file>
<file>
<source>resources/keystore.p12</source>
<outputDirectory>keystore/</outputDirectory>
<outputDirectory>configuration/keystore/</outputDirectory>
</file>
<file>
<source>resources/start.sh</source>
<filtered>true</filtered>
<outputDirectory>bin/</outputDirectory>
<outputDirectory />
<fileMode>0755</fileMode>
</file>
<file>
<source>resources/start.bat</source>
<filtered>true</filtered>
<outputDirectory>bin/</outputDirectory>
<outputDirectory />
<fileMode>0755</fileMode>
</file>
</files>

<fileSets>
<fileSet>
<directory>../modules/rest/target/dependency/</directory>
<outputDirectory>lib/rest/</outputDirectory>
<outputDirectory>internal/rest/</outputDirectory>
</fileSet>
</fileSets>

Expand Down
2 changes: 1 addition & 1 deletion distro/run/assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</parent>

<artifactId>camunda-bpm-run-assembly</artifactId>
<name>Camunda BPM Run - Assembly</name>
<name>Camunda BPM - Run - Assembly</name>
<packaging>pom</packaging>

<dependencies>
Expand Down
8 changes: 4 additions & 4 deletions distro/run/assembly/resources/start.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ IF "x%JAVA_HOME%" == "x" (


REM set environment parameters
SET webappsPath=%BASEDIR%/../lib/webapps/
SET restPath=%BASEDIR%/../lib/rest/
SET classPath=%BASEDIR%/../lib/db/,%BASEDIR%/../keystore/
SET webappsPath=%BASEDIR%internal\webapps
SET restPath=%BASEDIR%internal\rest
SET classPath=%BASEDIR%configuration\database,%BASEDIR%configuration\keystore
SET optionalComponentChosen=false


Expand Down Expand Up @@ -60,4 +60,4 @@ ECHO classpath: %classPath%


REM start the application
call %JAVA% -Dloader.path="%classPath%" -jar "%BASEDIR%/../lib/camunda-bpm-run.jar" --spring.config.location=file:"%BASEDIR%"/../config/application.yml
call %JAVA% -Dloader.path="%classPath%" -jar "%BASEDIR%internal\camunda-bpm-run.jar" --spring.config.location=file:"%BASEDIR%configuration\application.yml"
8 changes: 4 additions & 4 deletions distro/run/assembly/resources/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ fi


# set environment parameters
webappsPath=$BASEDIR/../lib/webapps/
restPath=$BASEDIR/../lib/rest/
classPath=$BASEDIR/../lib/db/,$BASEDIR/../keystore
webappsPath=$BASEDIR/internal/webapps/
restPath=$BASEDIR/internal/rest/
classPath=$BASEDIR/configuration/database/,$BASEDIR/configuration/keystore/
optionalComponentChosen=false


Expand Down Expand Up @@ -48,4 +48,4 @@ fi
echo classpath: $classPath

# start the application
"$JAVA" -Dloader.path="$classPath" -jar "$BASEDIR/../lib/camunda-bpm-run.jar" --spring.config.location=file:"$BASEDIR"/../config/application.yml
"$JAVA" -Dloader.path="$classPath" -jar "$BASEDIR/internal/camunda-bpm-run.jar" --spring.config.location=file:"$BASEDIR"/configuration/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">

<id>ce</id>
<id>assembly</id>

<formats>
<format>zip</format>
Expand All @@ -23,7 +23,7 @@
</dependencySet>

<dependencySet>
<outputDirectory>lib/db</outputDirectory>
<outputDirectory>configuration/database</outputDirectory>
<includes>
<include>com.h2database:h2</include>
</includes>
Expand All @@ -33,17 +33,17 @@

<files>
<file>
<source>target/camunda-bpm-run-distro-${project.version}.jar
<source>target/camunda-bpm-run-${project.version}.jar
</source>
<outputDirectory>lib/</outputDirectory>
<outputDirectory>internal/</outputDirectory>
<destName>camunda-bpm-run.jar</destName>
</file>
</files>

<fileSets>
<fileSet>
<directory>../modules/webapps/community/target/dependency/</directory>
<outputDirectory>lib/webapps/</outputDirectory>
<directory>../modules/webapps/target/dependency/</directory>
<outputDirectory>internal/webapps/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
49 changes: 0 additions & 49 deletions distro/run/distro/assembly/assembly-ee.xml

This file was deleted.

165 changes: 52 additions & 113 deletions distro/run/distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@
<relativePath>..</relativePath>
</parent>

<artifactId>camunda-bpm-run-distro</artifactId>
<name>Camunda BPM Run - Distribution</name>
<artifactId>camunda-bpm-run</artifactId>
<name>Camunda BPM - Run - Distribution</name>
<packaging>jar</packaging>

<properties>
<skip.assembly.ce>true</skip.assembly.ce>
<skip.assembly.ee>true</skip.assembly.ee>
</properties>

<dependencies>

<dependency>
Expand Down Expand Up @@ -82,112 +77,56 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layout>ZIP</layout>
<excludes>
<exclude>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</exclude>
<exclude>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<attach>true</attach>
<outputDirectory>target/</outputDirectory>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
<executions>
<execution>
<id>assemble-ce</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly/assembly-ce.xml</descriptor>
</descriptors>
<workDirectory>target/assembly/work/ce</workDirectory>
<skipAssembly>${skip.assembly.ce}</skipAssembly>
</configuration>
</execution>
<execution>
<id>assemble-ee</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly/assembly-ee.xml</descriptor>
</descriptors>
<workDirectory>target/assembly/work/ee</workDirectory>
<skipAssembly>${skip.assembly.ee}</skipAssembly>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layout>ZIP</layout>
<excludes>
<exclude>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</exclude>
<exclude>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>target/</outputDirectory>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<workDirectory>target/assembly/work</workDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>ce</id>
<properties>
<skip.assembly.ce>false</skip.assembly.ce>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>ee</id>
<properties>
<skip.assembly.ee>false</skip.assembly.ee>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit 7cfb7d0

Please sign in to comment.