From 04bc1ed6e353267be6b037b05778f2903e12ff62 Mon Sep 17 00:00:00 2001 From: Tobias Metzke Date: Tue, 25 Feb 2020 12:15:58 +0100 Subject: [PATCH] chore(run): extract core module for distros related to CAM-11292 --- distro/run/assembly/assembly.xml | 10 ++ distro/run/assembly/pom.xml | 7 ++ distro/run/assembly/resources/start.bat | 2 +- distro/run/assembly/resources/start.sh | 2 +- distro/run/core/pom.xml | 115 ++++++++++++++++++ .../org/camunda/bpm/run/CamundaBpmRun.java | 0 .../CamundaBpmRunSecurityConfiguration.java | 0 ...CamundaBpmRunAuthenticationProperties.java | 0 .../property/CamundaBpmRunCorsProperty.java | 0 .../property/CamundaBpmRunLdapProperties.java | 0 .../run/property/CamundaBpmRunProperties.java | 0 .../src/main/resources/banner.txt | 0 .../bpm/run/test/AbstractRestTest.java | 0 .../cors/CorsConfigurationDisabledTest.java | 0 ...ionEnabledAllowedOriginConfiguredTest.java | 0 .../CorsConfigurationEnabledWildcardTest.java | 0 .../https/HttpsConfigurationEnabledTest.java | 0 .../identity/DemoUserConfigurationTest.java | 0 .../identity/LdapConfigurationTest.java | 0 .../bpm/run/test/util/LoggingInterceptor.java | 0 .../camunda/bpm/run/test/util/TestUtils.java | 0 .../application-test-auth-disabled.yml | 0 .../application-test-cors-enabled.yml | 0 .../resources/application-test-demo-user.yml | 0 .../application-test-https-enabled.yml | 0 .../application-test-ldap-enabled.yml | 0 .../src/test/resources/keystore.p12 | Bin distro/run/distro/assembly.xml | 11 +- distro/run/distro/pom.xml | 90 +------------- distro/run/pom.xml | 1 + 30 files changed, 137 insertions(+), 101 deletions(-) create mode 100644 distro/run/core/pom.xml rename distro/run/{distro => core}/src/main/java/org/camunda/bpm/run/CamundaBpmRun.java (100%) rename distro/run/{distro => core}/src/main/java/org/camunda/bpm/run/CamundaBpmRunSecurityConfiguration.java (100%) rename distro/run/{distro => core}/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunAuthenticationProperties.java (100%) rename distro/run/{distro => core}/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunCorsProperty.java (100%) rename distro/run/{distro => core}/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunLdapProperties.java (100%) rename distro/run/{distro => core}/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunProperties.java (100%) rename distro/run/{distro => core}/src/main/resources/banner.txt (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/AbstractRestTest.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationDisabledTest.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledAllowedOriginConfiguredTest.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledWildcardTest.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/config/https/HttpsConfigurationEnabledTest.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/config/identity/DemoUserConfigurationTest.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/config/identity/LdapConfigurationTest.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/util/LoggingInterceptor.java (100%) rename distro/run/{distro => core}/src/test/java/org/camunda/bpm/run/test/util/TestUtils.java (100%) rename distro/run/{distro => core}/src/test/resources/application-test-auth-disabled.yml (100%) rename distro/run/{distro => core}/src/test/resources/application-test-cors-enabled.yml (100%) rename distro/run/{distro => core}/src/test/resources/application-test-demo-user.yml (100%) rename distro/run/{distro => core}/src/test/resources/application-test-https-enabled.yml (100%) rename distro/run/{distro => core}/src/test/resources/application-test-ldap-enabled.yml (100%) rename distro/run/{distro => core}/src/test/resources/keystore.p12 (100%) diff --git a/distro/run/assembly/assembly.xml b/distro/run/assembly/assembly.xml index d9aba86d73c..cc767c92218 100644 --- a/distro/run/assembly/assembly.xml +++ b/distro/run/assembly/assembly.xml @@ -11,6 +11,16 @@ false + + + internal/ + + org.camunda.bpm.run:camunda-bpm-run-core + + ${artifact.artifactId}.${artifact.extension} + + + resources/application.yml diff --git a/distro/run/assembly/pom.xml b/distro/run/assembly/pom.xml index ec3880da99c..7f11ef00f9c 100644 --- a/distro/run/assembly/pom.xml +++ b/distro/run/assembly/pom.xml @@ -23,6 +23,13 @@ ${project.version} pom + + + org.camunda.bpm.run + camunda-bpm-run-core + ${project.version} + + diff --git a/distro/run/assembly/resources/start.bat b/distro/run/assembly/resources/start.bat index c3d89f9a0c2..7a69bfca1d2 100644 --- a/distro/run/assembly/resources/start.bat +++ b/distro/run/assembly/resources/start.bat @@ -60,4 +60,4 @@ ECHO classpath: %classPath% REM start the application -call %JAVA% -Dloader.path="%classPath%" -jar "%BASEDIR%internal\camunda-bpm-run.jar" --spring.config.location=file:"%BASEDIR%configuration\application.yml" +call %JAVA% -Dloader.path="%classPath%" -jar "%BASEDIR%internal\camunda-bpm-run-core.jar" --spring.config.location=file:"%BASEDIR%configuration\application.yml" diff --git a/distro/run/assembly/resources/start.sh b/distro/run/assembly/resources/start.sh index 97e5ec2ed5c..7973abf5d71 100644 --- a/distro/run/assembly/resources/start.sh +++ b/distro/run/assembly/resources/start.sh @@ -48,4 +48,4 @@ fi echo classpath: $classPath # start the application -"$JAVA" -Dloader.path="$classPath" -jar "$BASEDIR/internal/camunda-bpm-run.jar" --spring.config.location=file:"$BASEDIR"/configuration/application.yml \ No newline at end of file +"$JAVA" -Dloader.path="$classPath" -jar "$BASEDIR/internal/camunda-bpm-run-core.jar" --spring.config.location=file:"$BASEDIR"/configuration/application.yml \ No newline at end of file diff --git a/distro/run/core/pom.xml b/distro/run/core/pom.xml new file mode 100644 index 00000000000..6da9baf1152 --- /dev/null +++ b/distro/run/core/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + + + org.camunda.bpm.run + camunda-bpm-run-root + 7.13.0-SNAPSHOT + .. + + + camunda-bpm-run-core + Camunda BPM - Run - Core + jar + + + + + org.camunda.bpm.springboot + camunda-bpm-spring-boot-starter + + + + org.camunda.bpm + camunda-engine-plugin-spin + + + + org.camunda.spin + camunda-spin-dataformat-all + + + + org.camunda.bpm.identity + camunda-identity-ldap + + + + org.camunda.bpm.springboot + camunda-bpm-spring-boot-starter-rest + provided + + + + org.springframework.boot + spring-boot-starter-jdbc + + + + com.h2database + h2 + + + + org.apache.tomcat.embed + tomcat-embed-core + + + + + + junit + junit + test + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + ZIP + + + org.camunda.bpm.springboot + camunda-bpm-spring-boot-starter-rest + + + com.h2database + h2 + + + + + + + repackage + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + true + + + + + + + \ No newline at end of file diff --git a/distro/run/distro/src/main/java/org/camunda/bpm/run/CamundaBpmRun.java b/distro/run/core/src/main/java/org/camunda/bpm/run/CamundaBpmRun.java similarity index 100% rename from distro/run/distro/src/main/java/org/camunda/bpm/run/CamundaBpmRun.java rename to distro/run/core/src/main/java/org/camunda/bpm/run/CamundaBpmRun.java diff --git a/distro/run/distro/src/main/java/org/camunda/bpm/run/CamundaBpmRunSecurityConfiguration.java b/distro/run/core/src/main/java/org/camunda/bpm/run/CamundaBpmRunSecurityConfiguration.java similarity index 100% rename from distro/run/distro/src/main/java/org/camunda/bpm/run/CamundaBpmRunSecurityConfiguration.java rename to distro/run/core/src/main/java/org/camunda/bpm/run/CamundaBpmRunSecurityConfiguration.java diff --git a/distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunAuthenticationProperties.java b/distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunAuthenticationProperties.java similarity index 100% rename from distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunAuthenticationProperties.java rename to distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunAuthenticationProperties.java diff --git a/distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunCorsProperty.java b/distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunCorsProperty.java similarity index 100% rename from distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunCorsProperty.java rename to distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunCorsProperty.java diff --git a/distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunLdapProperties.java b/distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunLdapProperties.java similarity index 100% rename from distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunLdapProperties.java rename to distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunLdapProperties.java diff --git a/distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunProperties.java b/distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunProperties.java similarity index 100% rename from distro/run/distro/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunProperties.java rename to distro/run/core/src/main/java/org/camunda/bpm/run/property/CamundaBpmRunProperties.java diff --git a/distro/run/distro/src/main/resources/banner.txt b/distro/run/core/src/main/resources/banner.txt similarity index 100% rename from distro/run/distro/src/main/resources/banner.txt rename to distro/run/core/src/main/resources/banner.txt diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/AbstractRestTest.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/AbstractRestTest.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/AbstractRestTest.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/AbstractRestTest.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationDisabledTest.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationDisabledTest.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationDisabledTest.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationDisabledTest.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledAllowedOriginConfiguredTest.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledAllowedOriginConfiguredTest.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledAllowedOriginConfiguredTest.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledAllowedOriginConfiguredTest.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledWildcardTest.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledWildcardTest.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledWildcardTest.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/config/cors/CorsConfigurationEnabledWildcardTest.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/https/HttpsConfigurationEnabledTest.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/config/https/HttpsConfigurationEnabledTest.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/https/HttpsConfigurationEnabledTest.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/config/https/HttpsConfigurationEnabledTest.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/identity/DemoUserConfigurationTest.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/config/identity/DemoUserConfigurationTest.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/identity/DemoUserConfigurationTest.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/config/identity/DemoUserConfigurationTest.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/identity/LdapConfigurationTest.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/config/identity/LdapConfigurationTest.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/config/identity/LdapConfigurationTest.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/config/identity/LdapConfigurationTest.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/util/LoggingInterceptor.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/util/LoggingInterceptor.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/util/LoggingInterceptor.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/util/LoggingInterceptor.java diff --git a/distro/run/distro/src/test/java/org/camunda/bpm/run/test/util/TestUtils.java b/distro/run/core/src/test/java/org/camunda/bpm/run/test/util/TestUtils.java similarity index 100% rename from distro/run/distro/src/test/java/org/camunda/bpm/run/test/util/TestUtils.java rename to distro/run/core/src/test/java/org/camunda/bpm/run/test/util/TestUtils.java diff --git a/distro/run/distro/src/test/resources/application-test-auth-disabled.yml b/distro/run/core/src/test/resources/application-test-auth-disabled.yml similarity index 100% rename from distro/run/distro/src/test/resources/application-test-auth-disabled.yml rename to distro/run/core/src/test/resources/application-test-auth-disabled.yml diff --git a/distro/run/distro/src/test/resources/application-test-cors-enabled.yml b/distro/run/core/src/test/resources/application-test-cors-enabled.yml similarity index 100% rename from distro/run/distro/src/test/resources/application-test-cors-enabled.yml rename to distro/run/core/src/test/resources/application-test-cors-enabled.yml diff --git a/distro/run/distro/src/test/resources/application-test-demo-user.yml b/distro/run/core/src/test/resources/application-test-demo-user.yml similarity index 100% rename from distro/run/distro/src/test/resources/application-test-demo-user.yml rename to distro/run/core/src/test/resources/application-test-demo-user.yml diff --git a/distro/run/distro/src/test/resources/application-test-https-enabled.yml b/distro/run/core/src/test/resources/application-test-https-enabled.yml similarity index 100% rename from distro/run/distro/src/test/resources/application-test-https-enabled.yml rename to distro/run/core/src/test/resources/application-test-https-enabled.yml diff --git a/distro/run/distro/src/test/resources/application-test-ldap-enabled.yml b/distro/run/core/src/test/resources/application-test-ldap-enabled.yml similarity index 100% rename from distro/run/distro/src/test/resources/application-test-ldap-enabled.yml rename to distro/run/core/src/test/resources/application-test-ldap-enabled.yml diff --git a/distro/run/distro/src/test/resources/keystore.p12 b/distro/run/core/src/test/resources/keystore.p12 similarity index 100% rename from distro/run/distro/src/test/resources/keystore.p12 rename to distro/run/core/src/test/resources/keystore.p12 diff --git a/distro/run/distro/assembly.xml b/distro/run/distro/assembly.xml index 458ef2af4f8..5eeb86dccd0 100644 --- a/distro/run/distro/assembly.xml +++ b/distro/run/distro/assembly.xml @@ -23,7 +23,7 @@ - configuration/database + configuration/database/ com.h2database:h2 @@ -31,15 +31,6 @@ - - - target/camunda-bpm-run-${project.version}.jar - - internal/ - camunda-bpm-run.jar - - - ../modules/webapps/target/dependency/ diff --git a/distro/run/distro/pom.xml b/distro/run/distro/pom.xml index 556b79cd757..e717362f475 100644 --- a/distro/run/distro/pom.xml +++ b/distro/run/distro/pom.xml @@ -13,51 +13,10 @@ camunda-bpm-run Camunda BPM - Run - Distribution - jar + pom - - org.camunda.bpm.springboot - camunda-bpm-spring-boot-starter - - - - org.camunda.bpm - camunda-engine-plugin-spin - - - - org.camunda.spin - camunda-spin-dataformat-all - - - - org.camunda.bpm.identity - camunda-identity-ldap - - - - org.camunda.bpm.springboot - camunda-bpm-spring-boot-starter-rest - provided - - - - org.springframework.boot - spring-boot-starter-jdbc - - - - com.h2database - h2 - - - - org.apache.tomcat.embed - tomcat-embed-core - - org.camunda.bpm.run camunda-bpm-run-assembly @@ -65,48 +24,10 @@ tar.gz - - - - junit - junit - test - - - - org.springframework.boot - spring-boot-starter-test - test - - - - org.springframework.boot - spring-boot-maven-plugin - - ZIP - - - org.camunda.bpm.springboot - camunda-bpm-spring-boot-starter-rest - - - com.h2database - h2 - - - - - - - repackage - - - - org.apache.maven.plugins maven-assembly-plugin @@ -131,15 +52,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - - true - - - diff --git a/distro/run/pom.xml b/distro/run/pom.xml index b23c7a8598f..5d6f21a7a88 100644 --- a/distro/run/pom.xml +++ b/distro/run/pom.xml @@ -87,6 +87,7 @@ modules modules/rest + core assembly