Some weeks ago, I gave a workshop about Ansible and I was asked how to set up a local test environment for Ansible. Requirement is that this test environment can run on a Windows 10 without a Linux subsystem. I don't why, but it was not my first customer where Windows 10 could not be used with Linux subsystem (Don't …
Read MoreSome weeks ago, I visited the bar camp "Software Engineering Camp 2019" in Erlangen. It was my first time visiting. I'd like to share my experience. Friday evening The bar camp started on Friday evening with three lighting talks. Firstly, Markus Harrer talked about psychology in software development. Here are …
Read MoreThis blog post wants to show another approach how to implement the Strategy Pattern with dependency injection. As DI framework, I choose Spring framework From Wikipedia Firstly, let's have a look how the Strategy Pattern is implemented in the classic way. As starting point, we have a HeroController that should add …
Read MoreI create a sample Groovy project for Maven, that mixes Spock tests and JUnit 5 tests in one project. In the next section I'll describe how to set up such kind of Maven project. Enable Groovy in the Project First at all, you have to enable Groovy in your project. One possibility is to add the GMavenPlus Plugin to your …
Read MoreThis post demonstrates how JUnit 5 can be used in pre-Java 8 projects and explains why it could be a good idea. JUnit 5 requires at least Java 8 as runtime environment, so you want to update your whole project to Java 8. But sometimes there exists reason why you can't immediately update your project to Java 8. For …
Read MoreIf you introduce code formatting rules retroactively, you have to solve the problem how to format existing code base according to the new formatting rules. You could checkout every code repository one by one in your IDE and click on Autoformat the whole project. But this is boring and waste of time. Fortunately, …
Read MoreOn my last conference talk (it was about Ansible and Docker at DevOpsCon in Berlin), I was asked what is the best way to run Ansible on a Windows system. Ansible itself requires a Linux-based system as the control machine. When I have to develop on a Windows machine, I install a Linux-based virtual machine to run the …
Read MoreI use a NPM registry proxy in Sonatype Nexus 3 behind an Apache2 as reverse proxy. With the "standard" Apache2 VirtualHost configuration 1<VirtualHost:80> 2ProxyRequests Off 3<Proxy *> 4Order deny,allow 5Allow from all 6</Proxy> 7ProxyPass / http://localhost:8081/ 8ProxyPassReverse / …
Read MoreJersey has a great possibility to write integration test for REST-APIs, written with Jersey. Just extend the class JerseyTest and go for it. I ran in an issue, where I had to mock a SecurityContext, so that the SecurityContext includes a special UserPrincipal. The challenge is that Jersey wraps the SecurityContext in …
Read MoreWhen I start a new Git repository, I lose a lot of time to set up my .gitignore file and normally, I don't match everything on the first shoot. Fortunately, there exists some tools, that help to bootstrapping it. I'd like to show two of them. One is a website that can be used on the command line and the another is a …
Read More