Skip to content

Commit

Permalink
clean up dependencies on webapp et.all
Browse files Browse the repository at this point in the history
- really use kotlin 1.9.10
- remove dependency on webapp, fixes #8
- remove dependency on commons-io, fixes #9
  • Loading branch information
jangalinski committed Oct 25, 2023
1 parent a34c43a commit 12a8429
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
28 changes: 19 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,23 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-bom</artifactId>
<version>${kotlin.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
Expand Down Expand Up @@ -79,7 +82,13 @@
<!-- CAMUNDA -->
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<scope>provided</scope>
</dependency>

<!-- TEST -->
Expand Down Expand Up @@ -152,7 +161,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<version>0.8.11</version>
<executions>
<execution>
<id>pre-unit-test</id>
Expand Down Expand Up @@ -243,6 +252,7 @@
<version>${kotlin.version}</version>
<configuration>
<jvmTarget>${java.version}</jvmTarget>

<compilerPlugins>
<plugin>spring</plugin>
<plugin>no-arg</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.holunda.deployment

import mu.KLogging
import org.apache.commons.io.FilenameUtils
import org.camunda.bpm.engine.RepositoryService
import org.camunda.bpm.engine.repository.DeploymentBuilder
import org.camunda.bpm.spring.boot.starter.event.PostDeployEvent
Expand All @@ -18,11 +17,11 @@ open class DeployOnApplicationStart(

companion object : KLogging() {
const val PROCESS_APPLICATION = "process application"
val CAMUNDA_FILE_SUFFIXES = setOf(
CamundaBpmProperties.DEFAULT_BPMN_RESOURCE_SUFFIXES.toSet(),
CamundaBpmProperties.DEFAULT_CMMN_RESOURCE_SUFFIXES.toSet(),
CamundaBpmProperties.DEFAULT_DMN_RESOURCE_SUFFIXES.toSet()
).flatten()
val CAMUNDA_FILE_SUFFIXES: Set<String> = buildSet {
addAll(CamundaBpmProperties.DEFAULT_BPMN_RESOURCE_SUFFIXES)
addAll(CamundaBpmProperties.DEFAULT_CMMN_RESOURCE_SUFFIXES)
addAll(CamundaBpmProperties.DEFAULT_DMN_RESOURCE_SUFFIXES)
}
}

@EventListener
Expand Down Expand Up @@ -65,8 +64,7 @@ open class DeployOnApplicationStart(
}
}

private fun isCamundaResource(resource: Resource) =
CAMUNDA_FILE_SUFFIXES.any { it.equals(FilenameUtils.getExtension(resource.filename)) }
private fun isCamundaResource(resource: Resource) = CAMUNDA_FILE_SUFFIXES.contains(resource.filename!!.substringAfterLast("."))

private fun addDeployment(
processArchive: CamundaDeploymentProperties.ProcessArchive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class DeploymentBuilderFake(
return this
}

@Deprecated("delegates to deprecated method.", replaceWith = ReplaceWith("DeploymentBuilder#enableDuplicateFiltering(deployChangedOnly: Boolean)"))
override fun enableDuplicateFiltering(): DeploymentBuilder {
return this
}
Expand Down

0 comments on commit 12a8429

Please sign in to comment.