Announcement Announcement Module
No announcement yet.
Gradle folder dependency in STS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gradle folder dependency in STS

    I have the following line in my build.gradle file:

    dependencies {
    	testRuntime files("src/main/webapp")
    This works fine from the command line, but STS is not adding the webapp folder to the classpath. As a result, our tests fail because they cannot find required resources.

    What's the best way to get this working?

  • #2
    Probably you should declare it as a source folder (i.e. similar to defailts src/main/java and src/main/resources).

    Check out the documentation for Gradle's Java plugin on how to customize the layout of your Java project.

    What exactly you do may depend a bit on what's in that folder and how its used. E.g. whether it should be compiled or just copied onto the classpath.

    I'm sorry I can't be more specific. A better place to ask your question is probably on the gradle forum, if the info I provided here is not sufficient you can try to ask over there.