Enterprise project setup with gradle

Hi,
I am trying to setup enterprise camunda project with gradle. and i am getting below errors when i build it. but i am getting below:
Could not resolve: org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-ee:7.14.0-ee
Could not resolve: com.h2database:h2:1.4.196
Could not resolve: com.sun.xml.bind:jaxb-impl:2.2.3
Could not resolve: org.camunda.bpm:camunda-bom:7.14.0-ee
Could not resolve: org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest:7.14.0-ee
Could not resolve: org.camunda.bpm:camunda-engine-plugin-spin:7.14.0-ee
Could not resolve: org.camunda.spin:camunda-spin-dataformat-all:1.10.0
Could not resolve: org.springframework.kafka:spring-kafka:2.3.1.RELEASE
Could not resolve: org.json:json:20201115
Could not resolve: org.springframework.boot:spring-boot-starter-test

and here is my build.gradle configuation:
repositories {
maven {
url “https://app.camunda.com/nexus/content/repositories/camunda-bpm-ee/
//url “https://app.camunda.com/nexus/repository/camunda-bpm-ee/
credentials {
username ‘user’
password ‘pwd’
}
}
//mavenCentral()
}

dependencies {
implementation ‘org.springframework.boot:spring-boot-starter’
testImplementation ‘org.springframework.boot:spring-boot-starter-test’

implementation "org.camunda.bpm:camunda-external-task-client:1.4.0"
//implementation "org.slf4j:slf4j-simple:1.6.1"
implementation "javax.xml.bind:jaxb-api:2.3.1"
implementation "org.springframework.boot:spring-boot-dependencies:2.4.2"
implementation "org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-ee:7.14.0-ee"
implementation "com.h2database:h2:1.4.196"
implementation "com.sun.xml.bind:jaxb-impl:2.2.3"
implementation "org.camunda.bpm:camunda-bom:7.14.0-ee"

I am able to access the url - https://app.camunda.com/nexus/content/repositories/camunda-bpm-ee/ using my credentials. not sure how to resolve it.

Anyone have any idea please help

Thanks

I’m not a Gradle expert, but one of the projects I use has this setup in build.gradle in order to use the EE dependencies:

repositories {
  mavenLocal()
  mavenCentral()
  maven {
    credentials {
      username camundaBpmNexusUser
      password camundaBpmNexusPassword
    }
    url "https://app.camunda.com/nexus/repository/camunda-bpm-ee/"
  }
}

The variables camundaBpmNexusUser and camundaBpmNexusPassword are then included in another file, gradle.properties:

camundaBpmNexusUser=<fill>
camundaBpmNexusPassword=<fill>

The other relevant parts of build.gradle:

plugins {
  id 'org.springframework.boot' version '2.2.1.RELEASE'
}

...

apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'

dependencies {
  implementation(platform("org.camunda.bpm:camunda-bom:7.14.0-ee"))

  compile "org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:7.14.0"
  compile "org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest:7.14.0"
  compile "org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-ee:7.14.0-ee"

  runtimeClasspath "org.springframework.boot:spring-boot-starter-jdbc:2.4.1"
  runtimeClasspath "org.postgresql:postgresql:42.2.2"

  implementation 'org.springframework.boot:spring-boot-starter-actuator'
}

Thanks That works for me only a small correction here:

dependencies {
implementation(platform(“org.camunda.bpm:camunda-bom:7.14.0-ee”))

compileOnly “org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:7.14.0”
compileOnly “org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest:7.14.0”
compileOnly “org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-ee:7.14.0-ee”

runtimeClasspath “org.springframework.boot:spring-boot-starter-jdbc:2.4.1”
runtimeClasspath “org.postgresql:postgresql:42.2.2”

1 Like