Hi there, I new using Gradle,
I’m building a project with next technologies:
Java
Gradle
Akka Http
My project structure:
Root project ‘chatting-auth’
±-- Project ‘:common’
±-- Project ‘:data-connect’
±-- Project ‘:domain’
-– Project ‘:endpoint’
build.gradle
plugins {
id ‘java’
id ‘application’
id ‘io.swagger.core.v3.swagger-gradle-plugin’ version ‘2.1.2’
}
allprojects {
group = ‘com.dac.chatting’
version = ‘1.0-SNAPSHOT’
sourceCompatibility = ‘14.0.1’
targetCompatibility = ‘14.0.1’
sourceSets {
main.java.srcDirs = ['src']
}
}
mainClassName = ‘com.dac.chatting.App’
subprojects {
apply plugin: 'java'
repositories {
mavenCentral()
mavenLocal()
jcenter()
}
dependencies {
implementation 'com.google.inject:guice:4.2.3'
implementation 'com.typesafe.akka:akka-http_2.13:10.1.12'
implementation 'com.typesafe.akka:akka-stream_2.13:2.6.6'
implementation 'com.typesafe.akka:akka-slf4j_2.13:2.6.6'
compileOnly 'org.projectlombok:lombok:1.18.12'
compileOnly 'javax.ws.rs:javax.ws.rs-api:2.1.1'
compileOnly 'org.apache.commons:commons-lang3:3.10'
testImplementation 'org.testng:testng:7.1.0'
annotationProcessor 'org.projectlombok:lombok:1.18.8'
}
}
Error:
Task :run FAILED
Error: Could not find or load main class endpoint:com.dac.chatting.App
Caused by: java.lang.ClassNotFoundException: endpoint:com.dac.chatting.App
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:run’.
Process ‘command ‘/usr/lib/jvm/java-14-oracle/bin/java’’ finished with non-zero exit value 1
-
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 678ms
1 actionable task: 1 executed
But, the class already Exists, in endpoint module:
What I am missing in the configuration?
Thank you so much in advantage,
Denilson