'Build spring hello world with gradle
I am following this tutorial https://spring.io/guides/gs/gradle/. I have created the java files and directory tree indicated and have the following build.gradle:
apply plugin: 'java'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
implementation 'joda-time:joda-time:2.10.14'
testImplementation "junit:junit:4.12"
}
jar {
archiveBaseName = 'gs-gradle'
archiveVersion = '0.1.0'
}
and when I run gradle bulid I get:
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve joda-time:joda-time:2.10.14.
Required by:
project :
> Could not resolve joda-time:joda-time:2.10.14.
> Could not get resource 'https://repo.maven.apache.org/maven2/joda-time/joda-time/2.10.14/joda-time-2.10.14.pom'.
> java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
I am using ubuntu and my gradle version is
------------------------------------------------------------
Gradle 7.2
------------------------------------------------------------
Build time: 2021-08-17 09:59:03 UTC
Revision: a773786b58bb28710e3dc96c4d1a7063628952ad
Kotlin: 1.5.21
Groovy: 3.0.8
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 16.0.1 (Private Build 16.0.1+9-Ubuntu-120.04)
OS: Linux 5.15.0-30-generic amd64
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
