Ok, enough of those simplified examples, here is my actual stuff:
Plugin:
p ackage org.camunda.bpm.spring.boot.gradle;
import org.gradle.api.Plugin
import org.gradle.api.Project
class CamundaWebjarPlugin implements Plugin<Project> {
void apply(Project project) {
def myExt = project.extensions.create("camundaWebjarPlugin", CamundaWebjarPluginExtension)
project.configurations {
camundaEE
}
project.dependencies {
camundaEE "org.camunda.bpm.webapp:camunda-webapp-ee-plugins:$myExt.camundaVersion@war"
compile "org.camunda.bpm.webapp:camunda-webapp-ee-plugins:$myExt.camundaVersion:classes"
}
project.task("resolveCamundaEnterpriseWebjar") {
dependsOn: project.configurations.camundaEE
doLast {
project.copy {
from project.configurations.camundaEE.collect { project.zipTree(it) }
into "$project.buildDir/resources/main"
}
project.delete "$project.buildDir/resources/main/META-INF"
project.copy {
from "$project.buildDir/resources/main/WEB-INF/securityFilterRules.json"
into "$project.buildDir/resources/main"
}
project.delete "$project.buildDir/resources/main/WEB-INF"
}
}
}
}
class CamundaWebjarPluginExtension {
String camundaVersion = "23.5.6"
}
build.gradle:
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'org.camunda.bpm.extension.springboot.gradle:camunda-bpm-spring-boot-webjar-gradle-plugin:2.1.0-SNAPSHOT'
}
}
plugins {
id "java"
id "org.springframework.boot" version "1.5.2.RELEASE"
id "io.spring.dependency-management" version "1.0.1.RELEASE"
}
apply plugin: 'camunda-webjar-plugin'
camundaWebjarPlugin {
camundaVersion = '7.6.3-ee'
}
repositories {
mavenLocal()
mavenCentral()
maven {
credentials {
username camundaRepoUser
password camundaRepoPassword
}
url 'https://app.camunda.com/nexus/content/repositories/camunda-bpm-ee'
}
}
dependencyManagement {
imports {
mavenBom 'org.camunda.bpm.extension.springboot:camunda-bpm-spring-boot-starter-bom:2.0.0'
}
imports {
mavenBom 'org.springframework.boot:spring-boot-dependencies:1.4.4.RELEASE'
}
imports {
mavenBom 'org.camunda.bpm:camunda-bom:7.6.3-ee'
}
}
dependencies {
compile 'org.camunda.bpm.extension.springboot:camunda-bpm-spring-boot-starter-webapp-core'
compile 'com.h2database:h2'
testCompile 'junit:junit:4.11'
}
jar.dependsOn resolveCamundaEnterpriseWebjar
I tried what you proposed, but without any effect…