Hi, I occurred in an error during project build…
It doesn’t matter which dependency I gather from: https://mvnrepository.com/artifact/org.restlet.jee/org.restlet.ext.servlet/
In my gradle project it’s never resolved as a dependency, i’ll give you my gradle build file… i can’t figure it out please help me
My build.gradle file:
import groovy.sql.Sql
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.postgresql:postgresql:42.2.1'
classpath 'org.hibernate:hibernate-core:4.1.0.Final'
}
}
plugins {
id 'java'
id 'groovy'
id 'war'
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
//jcenter()
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
// Use JUnit test framework.
testImplementation 'junit:junit:4.13.2'
// https://mvnrepository.com/artifact/org.restlet.jee/org.restlet
// HERE THE PROBLEMATIC DEPENDENCY
implementation group: 'org.restlet.jee', name: 'org.restlet', version: '2.4.0'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation group: 'com.google.code.gson', name: 'gson', version: '2.7'
// https://mvnrepository.com/artifact/org.hibernate/hibernate-gradle-plugin
implementation group: 'org.hibernate', name: 'hibernate-gradle-plugin', version: '5.6.12.Final'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
// This dependency is used by the application.
implementation 'com.google.guava:guava:30.1.1-jre'
}
The error reported in netbeans:
Task :clean
Task :compileJava FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Could not resolve all files for configuration ‘:compileClasspath’.
Could not find org.restlet.jee:org.restlet:2.4.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/restlet/jee/org.restlet/2.4.0/org.restlet-2.4.0.pom
- https://repo.maven.apache.org/maven2/org/restlet/jee/org.restlet/2.4.0/org.restlet-2.4.0.jar
Required by:
project :
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 0s
2 actionable tasks: 2 executed