Comments (8)
Custom tasks implemented on branch "grettyTasks", not merged to master yet, not documented.
from gretty.
Custom tasks merged to master, documented in wiki pages.
from gretty.
Gretty task classes were substantially reworked, now they should be much more useful. See documentation: https://github.com/akhikhl/gretty/wiki/Gretty-task-classes
There is one new feature that you might like: afterEvaluate handlers for gretty and farm extensions.
Syntax:
gretty {
afterEvaluate {
tasks.jettyRun.with {
port = ...
dependsOn ...
}
}
}
afterEvaluate handler is executed in afterEvaluate handler of gretty-plugin, right after initialization of all tasks. This is the right place for altering gretty tasks.
Note that you don't need afterEvaluate handler for creating your own tasks, so the following would work just fine:
gretty {
}
import org.akhikhl.gretty.JettyStartTask
task('MyJettyRun', JettyStartTask) {
interactive = true
port = 7070
}
from gretty.
In my project, I've used
buildscript dependency: classpath 'org.akhikhl.gretty:gretty-plugin:+'
apply from: 'https://raw.githubusercontent.com/akhikhl/gretty/master/pluginScripts/gretty9-0.0.19.plugin' // global settings gretty { port = 8080 scanInterval = 1 scanDir 'src/main/webapp' onScanFilesChanged { fileList -> println "Files were changed: $fileList" } fastReload = true consoleLogEnabled = true fileLogEnabled = true logFileName = project.name logDir = "${System.getProperty('user.home')}/logs" }
After this recent change, the initial build fails with this:
FAILURE: Build failed with an exception. * Where: Script 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty9.plugin' * What went wrong: A problem occurred evaluating script. > org.akhikhl.gretty9.GrettyPlugin
After changing to
apply from: 'https://raw.githubusercontent.com/akhikhl/gretty/master/pluginScripts/gretty9-0.0.19.plugin'the build script the with jettyRun fails with this:
Exception in thread "Thread-14" groovy.lang.MissingPropertyException: No such property: absolutePath for class: java.lang.String
Full stacktrace and log at:
http://pastebin.com/kuspgtNm
Please help :)
from gretty.
The error:
Exception in thread "Thread-9" groovy.lang.MissingPropertyException: No such property: absolutePath for class: java.lang.String
is thrown even with the simplest settings.
from gretty.
First problem (gretty9.plugin)
yes, it was an error in class file naming in gretty9.plugin. Now fixed, so it should work right away, without version upgrade. Attention: although github shows new formatted verson of file, when it still returns old raw version of file. I don't know the reason for this problem, may only guess that github aggressively caches files (or maybe it's their bug?).
Edit: now raw version is also up-to-date, so you can use gretty9.plugin right away.
from gretty.
Second problem (logback condig absolutePath)
It's a bug in Gretty. It appears only if "logback.xml" or "logback.groovy" file is found in folders projectDir, webAppDir/WEB-INF or in output (like buildDir/classes/main, buildDir/resources/main).
As soon as you remove (or rename) the file, the problem disappears. I know, this is bad workaround, but you can solve it that way for now.
I'll try to fix it ASAP and publish fixed version.
from gretty.
Please, don't hesitate opening new issues
from gretty.
Related Issues (20)
- Hot deploy and fast reload not working
- Enable to run appStart task because of NoClassDefFoundError: Lorg/jCharts/properties/PieChart2DProperties
- Problem in appStart Task
- Examples folder is missing from master branch HOT 1
- Global logging.properties file for Tomcat
- how to appStartWar with war generated in subproject? HOT 2
- AppIntegrationTest is not using src/test/resources but src/main/resources for the server test instance
- Multiproject builds: Exception in thread "Thread-x" java.lang.IllegalStateException: The configuration ... was resolved from a thread not managed by Gradle. HOT 2
- jettyRun task produces java.lang.ClassNotFoundException: org.eclipse.jetty.security.DefaultAuthenticatorFactory
- Could not read script 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin'
- Object of class 'org.akhikhl.gretty.JettyWebAppContext' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders
- this link is obsolete
- Can I use Gretty to generate code with OpenAPI?
- KeyStores with multiple certificates are not supported on the base class org.eclipse.jetty.util.ssl.SslContextFactory HOT 2
- "Cannot run Project.afterEvaluate" crash when Gretty applied to a Gradle sub-module via plugins block HOT 1
- org.akhikhl.gretty.Runner.run issue
- For a non spring boot application, gretty is complaining for spring boot dependency HOT 1
- gretty versions after 2.0.0 no longer available in the recommended repos HOT 2
- Gretty unable to find jstl.core
- apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin' and Could not HEAD
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gretty.