Pavel Sklenar

How To Create Maven Dependencies using DSL in Groovy

This post shows how to create Maven’s dependency elements (used in pom.xml file) programmatically, using DSL (Domain-Specific Language). You may find it useful, when you need to convert e.g. an old Java project (with dozens of required dependency jar files in one folder) into Maven project, i.e. create a new pom.xml file with all necessary dependency elements. Of cause, it exists a lot of different ways how to do it, but I solved this task using dynamic nature of Groovy and its metaprogramming capabilities, which makes it attractive for building DSLs.

How to Run Application in Docker on Synology

When you want to run your application in Docker on Synology you are not allowed to use all of the available parameters of the docker run command. Check my other post about basics with Docker on Synology which contains an enumeration of all possible parameters. Basically, you have two options how to run your application in Docker. Create your own original dockerfile including your application and build your new image.

How to install and use Docker on Synology

Installation Simply find and install a Docker application from the Synology Package Center. Note: If you do not find the application in your Package Center, your Synology is most probably not supported yet: Due to the hardware requirement, Docker will be only available on the following models: 18 series: DS3018xs, DS918+, DS718+, DS218+ 17 series: FS3017, FS2017, RS18017xs+, RS4017xs+, RS3617xs+, RS3617xs, RS3617RPxs, DS3617xs, DS1817+, DS1517+ 16 series: RS18016xs+, RS2416+, RS2416RP+, DS916+, DS716+II, DS716+, DS216+II, DS216+ 15-series: RC18015xs+, DS3615xs, DS2415+, DS1815+, DS1515+, RS815RP+, RS815+, DS415+ 14-series: RS3614xs+, RS3614xs, RS3614RPxs, RS2414RP+, RS2414+, RS814RP+, RS814+ 13-series: DS2413+, RS3413xs+, RS10613xs+, DS1813+, DS1513+, DS713+ 12-series: DS3612xs, RS3412xs, RS3412RPxs, RS2212RP+, RS2212+, DS1812+, DS1512+, RS812RP+, RS812+, DS412+, DS712+ 11-series: DS3611xs, DS2411+, RS3411xs, RS3411RPxs, RS2211RP+, RS2211+, DS1511+, DS411+II, DS411+ 10-series: DS1010+, RS810RP+, RS810+, DS710+(source, last updated 09-29-2017)

Simple Groovy Logger Without Any Logging Framework

If you need to use a simple logging in your Groovy script you can use some existing and supported frameworks. Sometimes you do not want or cannot use any other dependencies in your script, so you can write your own simple logger using methodMissing implementation: /** * Possibility to log TRACE, DEBUG, INFO, WARN and ERROR levels * Simply call methods like info, debug etc. (case insensitive) * Possibility to set/change: * * logFile - location of a log file (default value:default.

5 Useful Docker Tips and Tricks on Windows

UPDATED: Docker deprecates the Boot2Docker command line in favor of Docker Machine. All Tips and Tricks were updated to reflect this change. Edit etc/hosts Your Docker host on Windows is usually accessible either on the IP address 192.168.59.103 (older Docker versions) or 192.168.99.101 (newer Docker versions). As you can see, not so easy to remember. You can add a new record to your etc/hosts file (in Windows) to create a local DNS name for your Docker VM (Boot2Docker), e.

10 Useful Docker Commands - Tips and Tricks

Set HTTP proxy in your Dockerfile Your Dockerfile usually starts most probably like this: FROMtifayuki/java:8MAINTAINER...RUN apt-get update \ wget download.java.net/glassfish/4.0/release/glassfish-4.0.zip \ ...At first, you are apt-getting some missing applications and preparing your environment. Sometimes some applications need to be downloaded from the internet. You may encounter a problem when you are behind a proxy. Fortunately, you can use an [ENV](https://docs.docker.com/reference/builder/) command to set a HTTP/HTTPS proxy address, which will be in the environment of all “descendent” Dockerfile commands.