Skip to content

Commit d436004

Browse files
committed
refactor for multi-project and compartmentalization
1 parent d69f9c4 commit d436004

38 files changed

+354
-98
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ Examples:
8888

8989
### Camunda SpringBoot Deployment
9090

91-
WIP: Add the dependency to your Camunda Webapp deployment.
91+
See the `springboot` folder for a example of the deployment
9292

9393
### Typical Camunda Deployment
9494

95-
WIP: Add the dependency to your Camunda Webapp deployment.
95+
See the `docker` folder for an example of the deployment using the Camunda Tomcat distribution
9696

9797

9898
## Submission Storage

bpmn/SomeProcess1.bpmn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<bpmn:userTask id="Activity_1xq7c62" name="Typical Form with Server Validation" camunda:formKey="embedded:/forms/formio.html?deployment=MyUT1.json&#38;var=subWithServerValidation">
1414
<bpmn:extensionElements>
1515
<camunda:formData>
16-
<camunda:formField id="FormField_0t7u03d" type="string">
16+
<camunda:formField id="FormField_3rdvv3a" type="string">
1717
<camunda:validation>
1818
<camunda:constraint name="formio" />
1919
</camunda:validation>

build.gradle.kts

Lines changed: 38 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
2-
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
31
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
42

5-
val developmentOnly: Configuration by configurations.creating
6-
val kotlinVersion: String by project
7-
val spekVersion: String by project
8-
93
plugins {
104
val kotlinVersion = "1.3.50"
115
application
12-
id("com.github.johnrengelman.shadow") version "5.1.0"
13-
id("org.jetbrains.kotlin.jvm") version kotlinVersion
14-
id("org.jetbrains.kotlin.kapt") version kotlinVersion
15-
id("org.jetbrains.kotlin.plugin.allopen") version kotlinVersion
16-
id("org.jetbrains.kotlin.plugin.jpa") version "1.3.71"
6+
id("com.github.johnrengelman.shadow") version "5.1.0" apply false
7+
id("org.jetbrains.kotlin.jvm") version kotlinVersion apply false
8+
id("org.jetbrains.kotlin.kapt") version kotlinVersion apply false
9+
id("org.jetbrains.kotlin.plugin.allopen") version kotlinVersion apply false
10+
id("org.jetbrains.kotlin.plugin.spring") version "1.3.72" apply false
1711
id("idea")
18-
id("org.jetbrains.kotlin.plugin.spring") version "1.3.72"
1912
}
2013

2114
idea {
@@ -25,75 +18,47 @@ idea {
2518
}
2619
}
2720

28-
version = "0.1"
29-
//group = "camunda-formio-plugin"
30-
31-
repositories {
32-
mavenCentral()
33-
jcenter()
34-
}
35-
36-
configurations {
37-
developmentOnly
38-
}
39-
40-
dependencies {
41-
testImplementation(enforcedPlatform("org.springframework.boot:spring-boot-dependencies:2.2.5.RELEASE"))
42-
implementation(enforcedPlatform("org.camunda.bpm:camunda-bom:7.13.0"))
43-
44-
implementation("org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter")
45-
46-
testImplementation("org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp")
47-
testImplementation("org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest")
48-
49-
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
50-
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
51-
52-
implementation("org.camunda.bpm:camunda-engine-plugin-spin")
53-
implementation("org.camunda.spin:camunda-spin-dataformat-json-jackson")
54-
55-
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.10.3")
56-
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.3")
57-
58-
runtimeOnly("ch.qos.logback:logback-classic:1.2.3")
5921

60-
runtimeOnly("com.h2database:h2:1.4.200")
22+
allprojects {
6123

62-
implementation("org.apache.httpcomponents:fluent-hc:4.5.12")
24+
version = "1.0"
25+
group = "camunda-formio-plugin"
6326

27+
repositories {
28+
jcenter()
29+
}
6430

65-
testImplementation("org.springframework.boot:spring-boot-starter-test")
66-
}
67-
68-
application {
69-
mainClassName = "com.github.stephenott.camunda.formio"
70-
}
71-
72-
java {
73-
sourceCompatibility = JavaVersion.VERSION_1_8
74-
}
75-
76-
tasks {
77-
withType<KotlinCompile> {
78-
kotlinOptions {
79-
jvmTarget = JavaVersion.VERSION_1_8.toString()
80-
javaParameters = true
31+
tasks {
32+
withType<KotlinCompile> {
33+
kotlinOptions {
34+
jvmTarget = JavaVersion.VERSION_1_8.toString()
35+
javaParameters = true
36+
}
8137
}
8238
}
39+
}
8340

84-
withType<Test> {
85-
classpath = classpath.plus(configurations["developmentOnly"])
86-
useJUnitPlatform()
41+
/**
42+
* Copy files used in dockerfile build
43+
*/
44+
tasks.create("setupDockerFiles"){
45+
copy {
46+
from("./common/tasklist")
47+
into("./docker/tasklist")
8748
}
88-
89-
named<JavaExec>("run") {
90-
doFirst {
91-
jvmArgs = listOf("-noverify", "-XX:TieredStopAtLevel=1", "-Dcom.sun.management.jmxremote")
92-
classpath = classpath.plus(configurations["developmentOnly"])
93-
}
49+
copy {
50+
from("./common/forms")
51+
into("./docker/forms")
9452
}
53+
}
9554

96-
named<ShadowJar>("shadowJar") {
97-
mergeServiceFiles()
98-
}
55+
/**
56+
* Cleanup docker files
57+
*/
58+
tasks.clean {
59+
delete("./docker/forms")
60+
delete("./docker/tasklist")
61+
delete(fileTree("./docker"){
62+
include("*.jar")
63+
})
9964
}

common/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Common Files
2+
3+
These are the common files that are copied into the sub-projects.
4+
5+
Make changes here and rebuild the projects / run the applicable tasks.

src/main/webapp/forms/font-awesome-4.7.0/css/font-awesome.css renamed to common/forms/font-awesome-4.7.0/css/font-awesome.css

File renamed without changes.

src/main/webapp/forms/font-awesome-4.7.0/css/font-awesome.min.css renamed to common/forms/font-awesome-4.7.0/css/font-awesome.min.css

File renamed without changes.

src/main/webapp/forms/font-awesome-4.7.0/fonts/FontAwesome.otf renamed to common/forms/font-awesome-4.7.0/fonts/FontAwesome.otf

File renamed without changes.

src/main/webapp/forms/font-awesome-4.7.0/fonts/fontawesome-webfont.eot renamed to common/forms/font-awesome-4.7.0/fonts/fontawesome-webfont.eot

File renamed without changes.

src/main/webapp/forms/font-awesome-4.7.0/fonts/fontawesome-webfont.svg renamed to common/forms/font-awesome-4.7.0/fonts/fontawesome-webfont.svg

File renamed without changes.

0 commit comments

Comments
 (0)