I am having issues with my plugins not resolving as shown in the below screenshot. I am also having an issue with not being able to run flyway migrations. When I try to run flyway migrate I am getting an error that say database not found at the listed url. I am able to access the database using the integrated database tools in intellij so I know the url is valid. So I think the issue is due to not being able to resolve all the dependencies/plugins.
My build.gradle file is shown below
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id 'org.springframework.boot' version '3.2.1'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.jetbrains.kotlin.jvm' version '1.9.21'
id 'org.jetbrains.kotlin.plugin.spring' version '1.9.21'
id 'org.jetbrains.kotlin.plugin.jpa' version '1.9.21'
id 'org.flywaydb.flyway' version '10.4.1'
}
group = 'com.pdrake'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
flyway {
url = 'jdbc:oracle:thin:@//localhost:3000/XEPDB1'
user = 'pdbadmin'
password = 'my_password'
schemas = ['PDBADMIN']
driver = 'oracle.jdbc.OracleDriver'
locations = ['classpath:db/migrations']
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-database-oracle'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.springframework.session:spring-session-jdbc'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
runtimeOnly 'com.oracle.database.jdbc:ojdbc11'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}
tasks.withType(KotlinCompile) {
kotlinOptions {
freeCompilerArgs += '-Xjsr305=strict'
jvmTarget = '17'
}
}
tasks.named('test') {
useJUnitPlatform()
}