Reputation: 4185
apply plugin: 'java'
group 'com.CustomWIH'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile 'org.jbpm:jbpm-kie-services:7.20.0.Final'
}
task fatJar(type: Jar) {
baseName='jbpmTutorial'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
jbpm dependency has a dependency that is no longer available in maven repository
org.freemarker version 2.3.26 https://mvnrepository.com/artifact/org.freemarker/freemarker
C:\Users\kona\IdeaProjects\com-CustomWIH>gradle fatJar --stacktrace
FAILURE: Build failed with an exception.
Where: Build file 'C:\Users\kona\IdeaProjects\com-CustomWIH\build.gradle' line: 21
What went wrong: Could not determine the dependencies of task ':fatJar'.
Could not resolve all files for configuration ':compile'. Could not find org.freemarker:freemarker:2.3.26.jbossorg-1. Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/freemarker/freemarker/2.3.26.jbossorg-1/freemarker-2.3.26.jbossorg-1.pom
- https://repo.maven.apache.org/maven2/org/freemarker/freemarker/2.3.26.jbossorg-1/freemarker-2.3.26.jbossorg-1.jar Required by: project : > org.jbpm:jbpm-kie-services:7.20.0.Final
I've never ran into this issue before. What do I do in this situation?
Upvotes: 1
Views: 1253
Reputation: 1068
Your dependency tree contains this transitive dependency: org.freemarker:freemarker:2.3.26.jbossorg-1
, which is not found in Maven Central.
The reason it does not exist in Maven Central is that it is not the normal version of freemarker, but a JBoss patched version, which can be seen from the version of the dependency 2.3.26.jbossorg-1
.
Googling for org.freemarker:freemarker:2.3.26.jbossorg-1
took me to this Maven repository: https://repository.jboss.org/nexus/content/groups/public/
The solution would be to add this Maven repository to your build.gradle like this:
repositories {
mavenCentral()
maven {
url "https://repository.jboss.org/nexus/content/groups/public/"
// OR this one, as suggested by jb-nizet
// url "https://maven.repository.redhat.com/ga/"
}
}
Upvotes: 3