A stupid problem happened to me, but I don't understand where I went wrong. I have a project with subprojects.
In the IDE I see this picture
My root build.gradle file
buildscript {
ext {
springBootVersion = '2.4.4'
dependencyManagementVersion = '1.0.11.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "io.spring.gradle:dependency-management-plugin:${dependencyManagementVersion}"
}
}
allprojects {
group = 'ru.omega'
version = '0.0.1-SNAPSHOT'
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 11
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-test'
}
}
project(':hub.sample_service') {
dependencies {
compile project(':hub.common_service')
}
}
Here is my project structure. This may be due to the fact that folders contain dots in their names.
├───hub.common_service
│ └───src
│ ├───main
│ │ ├───java
│ │ │ └───ru
│ │ │ └───gkomega
│ │ │ └───common
│ │ │ ├───config
│ │ │ ├───model
│ │ │ └───service
│ │ └───resources
│ │ └───META-INF
│ └───test
│ └───java
│ └───ru
│ └───gkomega
│ └───common
├───hub.sample_service
│ └───src
│ ├───main
│ │ ├───java
│ │ │ └───ru
│ │ │ └───gkomega
│ │ │ └───common
│ │ └───resources
│ │ └───META-INF
│ └───test
│ └───java
│ └───ru
│ └───gkomega
│ └───common
Is there any way to solve this problem? I will be very grateful for your help in this matter!
I had a similar problem. I don't know exactly why this happens, but try deleting the .idea folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With