Since version 1.1.3 Gretty supports virtual WEB-INF/lib entries. That is: dependency JARs specified in "build.gradle"/dependencies are mapped "on-the-fly" to WEB-INF/lib directory. As a consequence, ServletContext.getResourcePaths("/WEB-INF/lib") returns the expected list of JARs, even if you are starting a web-app "inplace", without assembling WAR-file.

There is no special syntax associated with web-app virtual WEB-INF/lib entries. The described mapping happens automatically, whenever you start one of Gretty tasks.

Gretty sources contain example program demonstrating use of virtual WEB-INF/lib entries. You can run integration tests against this example program by invoking integrationTestAllContainers task.