Hello, I’m an intern (so, I’m newbie ) and I suggested to my boss the implementation of Gradle as build tool. As the project has been underway for months have restrictions to change the layout of directories.
In the project there is a web part (interface) and the layers with java code (domain, process and persistence). The layout of my project is as follows:
suite
–src
-----domain
-----interface
-----persistence
-----process
–libs
–build.gradle
I compile my project, but when I open my web application on localhost:8080/interface.Looks like the web application could not see my java directories. I searched and found that we can set the classes directory through jettyRun.classesDirectory, but he does not accept a list of directories. How to proceed?
There is my build.gradle
apply plugin: "java"
apply plugin: "war"
apply plugin: "jetty"
compileJava.options.encoding = "UTF-8"
repositories {
mavenCentral()
}
jettyRun.webAppSourceDirectory = file("src/interface/")
project.webAppDirName = file("src/interface/")
jettyRun {
setClassPathFiles {
srcDirs (
"src/domain/src/",
"src/persistence/src/",
"src/process/src/"
)
}
}
sourceSets {
main {
java {
srcDirs (
"src/domain/src/",
"src/persistence/src/",
"src/process/src/"
)
}
resources {
srcDir "libs/"
}
}
}
dependencies {
compile (
//a lot files
)
)
}
Already grateful and sorry about my english. It isn’t my native language.