Gretty is a feature-rich gradle plugin for running web-apps on embedded servlet containers. It supports Jetty versions 7, 8 and 9, Tomcat versions 7, 8 and 9, multiple web-apps and many more. It wraps servlet container functions as convenient Gradle tasks and configuration DSL.
Questions tagged [gretty]
84 questions
9
votes
1 answer
How to select specific jetty version in Gretty plugin
I am using Gretty plugin for running web application from Gradle script. Is it possible to select a specific version of jetty container to run? Not just jetty9 vs jetty8, but e.g. 9.2.13.v20150730

Nikem
- 5,716
- 3
- 32
- 59
5
votes
1 answer
Spring: Why do I need to add a javax.el-api dependency when loading the application context in a unit test?
I created a simple Spring 5 application with spring-mvc. In one of my model objects I use bean validation (hibernate-validator). I added the following configuration to make it all work:
@Configuration
@ComponentScan(basePackages =…

Anne-dirk
- 183
- 1
- 7
5
votes
1 answer
Run a gulp watch simultaneously than gretty
I'm trying to run a gulp watch when running my Java web-app with Gretty.
I'm using this plugin to run gulp from Gradle.
For the moment, I'm just able to run a single gulp build before the app run by doing this: appRun.dependsOn gulp_build
What I…

ThibaultV
- 529
- 1
- 5
- 24
5
votes
1 answer
Cannot change dependencies of configuration
After I added copyBootstrap to build.gradle I am getting the next error when try to run the build task:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project '.
Cannot change dependencies of…

Chu
- 468
- 1
- 5
- 21
5
votes
1 answer
Adding a dependency to a gretty task
I'm using the gretty plugin in Gradle.
It works, I can list the tasks, for example appRun, and execute them.
But the tasks aren't found when I try to add a dependency with
apply plugin 'war'
apply from:…

Denys Séguret
- 372,613
- 87
- 782
- 758
4
votes
0 answers
Tomcat 9 Servlet crashes with webapp using gretty
I am having an issue running my webapp with in gretty. I am using the following configuration
gretty {
httpPort = 8080
servletContainer = 'tomcat9'
reloadOnClassChange = true
managedClassReload = true
loggingLevel = 'ALL'
…

Ed Dunn
- 1,152
- 3
- 11
- 27
4
votes
2 answers
gretty appStart fails with unknown property 'classesDirs'
I'm trying to build a Java Servlet with gradle gretty plugin (gradle version 3.4).
I have a dependency to another project databaseprovider:1.0-SNAPSHOT (includes connection to the database and some spring definitions...).
When I run the task…

nh_
- 299
- 5
- 25
4
votes
1 answer
Jetty doesn't close connection
I've created a simple server Java application using Gradle. As an embedded server , I am using Jetty . I am also using a Gretty plugin as it supports the latest Jetty version.
The project runs just fine . And I have tried to stress test it. As a…

Ivelius
- 4,953
- 7
- 30
- 54
4
votes
1 answer
gradle: failure when plugin task `dependsOn` another plugin task
testing gradle as replacement for maven, we have a build.gradle file that contains the following plugins
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath…

Bruno Grieder
- 28,128
- 8
- 69
- 101
3
votes
0 answers
DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true
I like to use the Gretty plugin for our over 10 years old web application using old Servlets/JSP version specified in web.xml deployment descriptor type version 2.3:

Marek-A-
- 474
- 12
- 29
3
votes
1 answer
How to configure Jetty 9 to listen to multiple ports using Gretty
How do I configure Jetty 9 to listen to multiple ports using Gretty.
I just want to configure Jetty to listen to more than one port. I don't want multiple instances nor multiple webapps, just one Jetty, one webapp, but listening to 2 or more…

user1766169
- 1,932
- 3
- 22
- 44
3
votes
1 answer
pass in gretty options on the command line
Does anybody know if there is an easy way to override the gretty, or any gradle configuration on the command line?
(the ones here: http://akhikhl.github.io/gretty-doc/Gretty-configuration.html)
I have tried this
gradle -Dgretty.httpPort=8111…

Alex028502
- 3,486
- 2
- 23
- 50
3
votes
2 answers
unable to start spring boot web application
I am trying to create a basic application that would use Spring Boot and reactive programming (and without web.xml)
This is my servlet
public class RootServlet extends ServletHttpHandlerAdapter {
public RootServlet(HttpHandler httpHandler) {
…

lapots
- 12,553
- 32
- 121
- 242
3
votes
1 answer
How to use Gretty integrationTestTask with a war file?
Is it possible to use gretty integrationTestTask with a project that uses a war folder?
It seems from the documentation appBeforeIntegrationTest does not have access to the war. Is there another way to run test cases so that it uses the war folder?…

user3554664
- 349
- 2
- 16
3
votes
0 answers
gretty modify web.xml file in filter
I'm trying to figure out how to modify an xml file at build time as part of my gradle war project. I see how to use the groovy XmlParser to do what I want, and I see that I can apply a groovy filter to the task, but the filters all seem to be…

Pickles
- 1,270
- 2
- 11
- 20