Multiple class directories for jettyRun

Hello, I’m an intern (so, I’m newbie :blush: ) 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.

Configuring the jettyRun task shouldn’t be necessary. You are already telling Gradle where your code lives by configuring the source sets. Is your code being properly compiled? You should see the class files in the ‘build/classes/main’ directory.

Not sure exactly what you mean by this. Are you getting a ClassNotFoundException?

You may also want to consider using the superior Gretty plugin. The core jetty plugin is likely to be deprecated in the future.

I’ll try Gretty. Thank you, Mark. :wink: