It may happen, that you wish to specify a custom location of your logfile when running your Java app. Within this post I use an example cli application that is written in Groovy and build with Gradle. By passing „–logfile=mylogfile.log“ it will write all logs to the specified location, while it is using the Slf4j-annotation […]
When playing around with the concepts of Continuous Integration/Delivery/Deployment I struggled over Gradle builds and how to integrate them in these concepts. Gradle is getting more and more important in build tool landscape and so I created a template or archetype about how to use it. I choose a scenario that I saw already implemented […]
Jenkins can be configured in many ways. When trying to find a suitable solution for deployment of plugins, we’ve been facing to the problem of using not (!) the latest and greatest plugin versions. This can be necessary when using the jobdsl plugin without having the resources to update our own dsl library when there […]
With version 1.8 a great feature got into the release of Groovy: the groovy.util.logging.Slf4j-annotation. With that annotation you can create the logging facade which can be used then at runtime with different logging implementations. In this example I will use „simple logging“, „log4j“ and „logback“ as implementations.
Reading configuration files with groovy can be easy if you know how 🙂 There are multiple formats the configuration can be served to an application, here we’ll have a look on xml, json and yaml.