gretty

What does `ObjectMapper mapper = []` mean in groovy?

半腔热情 提交于 2019-12-24 08:04:42
问题 I'm new to groovy, and I'm reading the source of a project gretty import org.codehaus.jackson.map.ObjectMapper class JacksonCategory { static final ObjectMapper mapper = [] ... } I don't understand the code ObjectMapper mapper = [] , what does [] mean here? I thought it's a list , but how to assign it to a ObjectMapper ? UPDATE Depends on Dunes's answer, seems [] means invocation of default constructor . So, it means: static final ObjectMapper mapper = new ObjectMapper() But: String s = []

Error while replacing jetty plugin to gretty plugin gradle

梦想的初衷 提交于 2019-12-24 07:05:16
问题 I have a JAX-RS project which have jetty plugin in gradle. I want to replace jetty plugin with gretty as jetty is not supported in gradle 4 and other versions. I get following errors while running gretty plugin. Execution failed for task ':appRunWar'. java.lang.Exception: com/sun/jersey/spi/inject/InjectableProvider build.gradle code containing jetty plugin apply plugin: 'java' apply plugin: 'war' apply plugin: 'jetty' apply plugin: 'eclipse' jettyRun { httpPort = 8080 reload = 'automatic'

Adding a dependency to a gretty task

[亡魂溺海] 提交于 2019-12-23 12:56:15
问题 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: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin' transpileScss << { ... } tasks.appRun.dependsOn transpileScss I get: Could not find property 'appRun' on task set. What happens? How can I add a dependency to tasks of the Gretty plugin? 回答1: Wrap your logic into a

Jetty JNDI resource fails: “java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource”

我的未来我决定 提交于 2019-12-11 14:03:32
问题 When I started the Jetty (over Gretty plugin) I get the CNF exception. When I run gradlew :MyWebApplication:appRun -ds > g.log I see following configuration in debug: { "servletContainerId": "jetty9.3", "servletContainerDescription": "Jetty 9.3.25.v20180904", "httpEnabled": true, "httpPort": 8585, "serverConfigFile": "C:\\Users\\user\\eclipse-workspace\\WS\\jetty.xml", "logbackConfigFile": "C:\\Users\\user\\eclipse-workspace\\WS\\MyWebApp\\config\\logback.xml", "loggingLevel": "INFO",

Adding a resource directory to classpath of greety (Gradle Plugin)

前提是你 提交于 2019-12-11 00:09:35
问题 I'm trying to run gradle with the plugin gretty using jetty . The problem is the gretty plugin does put the directory src/test/resources on the classpath and I need a lazy load for some .properties files on the Jetty startup. dependencies { gretty "com.zaxxer:HikariCP:${version_hikaricp}" gretty "org.hsqldb:hsqldb:${version_hsqldb}" gretty files("target/classes/main", "target/resources/main", "src/test/resources") } The code above is not loading the resources to the classpath to be used by