[100 Days of Code] Day 059: June 11, 2017

Today’s Progress: Wrote all Jenkins pipelines and wired the security-server project to the snapshot libraries on the public maven repo. Unfortunately when the build of security-server is running in Jenkins it’s failing also a local build succeeds. Things I’ve learned: More about Jenkins pipelines. Things I’ve planned for tomorrow: Investigate on the issue why the build fails on Jenkins and why test reports of integration tests don’t get collected by Jenkins.
Read more

[100 Days of Code] Day 058: June 10, 2017

Today’s Progress: I have not been able to work on the project as much as I’ve planned but have been able to publish the next artifact. Things I’ve learned: Repeated the steps necessary to publish an artifact. Things I’ve planned for tomorrow: Visiting the Maker Faire Berlin Link(s) to work: persistence-support

[100 Days of Code] Day 057: June 9, 2017

Today’s Progress: Published first snapshot version of a project to OSSRH maven repository. Things I’ve learned: How to setup an account with Sonatype and publish an artifact from a gradle build Things I’ve planned for tomorrow: Integrate publishing into CD pipeline. Link(s) to work: rule-jpa

[100 Days of Code] Day 056: June 7, 2017

Today’s Progress: I have been fighting with eclipse link the whole time. Suddenly my integration tests that where using JPA did stop working. Finally I decided to switch to Hibernate which solved my problems. Things I’ve learned: I will be using Hibernate from now on whenever possible. Things I’ve planned for tomorrow: Continue to publish the whole dependency chain so I can continue with my CD pipeline. Link(s) to work: rules-jpa

[100 Days of Code] Day 055: June 6, 2017

Today’s Progress: As I started to build my CD pipeline I noticed that I have some smaller “common” projects that have to be available in a repository in order to be used as a dependency during build. So I started to look into the different types of repositories that are available. Since my current project is publicly available I think that I also have to make the dependencies publicly available in a repository.
Read more

[100 Days of Code] Day 054: June 5, 2017

Today’s Progress: Setup a Jenkins 2 server for CI/CD and created a simple pipeline. Things I’ve learned: How to setup Jenkins 2 and how pipelines are working Things I’ve planned for tomorrow: Improve pipeline Link(s) to work: security-server

[100 Days of Code] Day 053: June 4, 2017

Today’s Progress: Implemented integration-tests for OAuth 2 token retrieval. Things I’ve learned: Learned many details about the different OAuth 2 grant_types and flows. This demonstrates how much you can learn when implementing tests ;) Things I’ve planned for tomorrow: Cleanup the tests and maybe implement some more API endpoints. Link(s) to work: security-server

Control following of redirects with Rest-Assured

By default Rest-Assured will follow a redirection if it receives a 302 response after issuing a request. In this case your checks will be applied to the response after the redirect. Some times you may not want this to happen and rather examine the response of the original request for example to extract cookies or assert the correct location of the redirect. To achieve this you can use the redirects().follow(false) directive when formulating the request:
Read more

Disable formatting in parts of source files with IntelliJ

Since I’m writing a lot of Spring code or using libraries like Rest Assured that allow to write somehow “human readable” code it’s nice to be able to turn off code formatting int IntelliJ so that the structure is not destroyed when the source file gets reformatted. given() .contentType("application/x-www-form-urlencoded; charset=utf-8") .when() .queryParam("foo", "bar") .get("http://localhost:8080/bar") .then() .statusCode(302) To prevent this from happening IntelliJ offers a function to turn off formatting by a marker comment.
Read more

[100 Days of Code] Day 052: June 3, 2017

Today’s Progress: F-I-N-A-L-L-Y got OAuth 2 and session/UI based authorization with Spring Security working. Things I’ve learned: A lot about Spring Security filters, and security configuration. Things I’ve planned for tomorrow: Improve the api of the server by adding some more features. Link(s) to work: security-server