<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sandra Parsick - Just Another Blog about IT</title><link>https://blog.sandra-parsick.de/</link><description>Recent content on Sandra Parsick - Just Another Blog about IT</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Copyright © 2011–2023, Sandra Parsick; all rights reserved.</copyright><lastBuildDate>Wed, 18 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.sandra-parsick.de/index.xml" rel="self" type="application/rss+xml"/><item><title>GitHub to Codeberg Migration - Part 3 - Set up and Running an own Forgejo Runner On Hetzner</title><link>https://blog.sandra-parsick.de/2026/02/18/github-to-codeberg-migration-part-03/</link><pubDate>Wed, 18 Feb 2026 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2026/02/18/github-to-codeberg-migration-part-03/</guid><description>
&lt;p>In my previous &lt;a href="https://blog.sandra-parsick.de/2025/08/08/github-to-codeberg-migration-part-02/">blog post&lt;/a> about the GitHub to Codeberg migration, my teaser was that the next step will be to set up a &lt;a href="https://forgejo.org/docs/latest/user/actions/overview/">Forgejo Action&lt;/a> to automate the deployment of my Codeberg pages.&lt;/p>
&lt;p>Forgejo Action is inspired by GitHub Action.
So if you are familiar with GitHub Action, the entry barrier for Forgejo Action is minimal for you.&lt;/p>
&lt;p>Similar to GitHub Action, Forgejo Action needs a runner (called &lt;em>Forgejo Runner&lt;/em>) for execution.
Codeberg itself provides limited runners, so for the first steps with Forgejo Action, you can use their &lt;a href="https://docs.codeberg.org/ci/#using-forgejo-actions">hosted version&lt;/a>.
I've decided to set up my own Forgejo runner to preserve the limited runner.&lt;/p></description></item><item><title>Jira Issue to GitHub Issue Migration in Apache Maven</title><link>https://blog.sandra-parsick.de/2025/10/02/support-and-care-jira-gh-migration/</link><pubDate>Thu, 02 Oct 2025 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2025/10/02/support-and-care-jira-gh-migration/</guid><description>
&lt;p>&lt;strong>This blog post was originally published on &lt;a href="https://open-elements.com/posts/2025/08/08/jira-issue-to-github-issue-migration-in-apache-maven/">Open Elements Blog&lt;/a>.&lt;/strong>&lt;/p>
&lt;p>In this blog post, we'd like to share how funding can help in doing maintenance tasks in open-source projects.&lt;/p>
&lt;p>Our &lt;a href="https://open-elements.com/de/support-care-maven/">Support and Care&lt;/a> project got financially supported by the &lt;a href="https://www.sovereign.tech/">German Sovereign Tech Fund&lt;/a> (STF) to work on the following four packages of &lt;a href="https://maven.apache.org/">Apache Maven&lt;/a>™:&lt;/p>
&lt;ul>
&lt;li>Security of the Supply Chain&lt;/li>
&lt;li>Maintenance&lt;/li>
&lt;li>Modernization of Core Features&lt;/li>
&lt;li>Documentation&lt;/li>
&lt;/ul>
&lt;p>One task in the &lt;em>maintenance&lt;/em> working package was to support the migration of Jira issues to GitHub issues.&lt;/p></description></item><item><title>GitHub to Codeberg Migration - Part 2 - Codeberg Pages</title><link>https://blog.sandra-parsick.de/2025/08/08/github-to-codeberg-migration-part-02/</link><pubDate>Fri, 08 Aug 2025 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2025/08/08/github-to-codeberg-migration-part-02/</guid><description>
&lt;p>In this blog post, I'd like to describe my experience with the migration of hosting websites from Netlify to &lt;a href="https://codeberg.page/">Codeberg Pages&lt;/a>.&lt;/p>
&lt;h2 id="starting-point">Starting Point&lt;/h2>
&lt;p>As I described in &lt;a href="https://blog.sandra-parsick.de/2025/08/06/github-to-codeberg-migration-motivation/">my previous post&lt;/a>, I have two website projects, a blog and my personal homepage.
Both were hosted on Netlify.&lt;/p>
&lt;p>With the repository migration from GitHub to Codeberg (as described in a previous &lt;a href="https://blog.sandra-parsick.de/2025/08/07/github-to-codeberg-migration-part-01/">blog post&lt;/a>), I also wanted to change the hosting location of both websites.
Codeberg offers a GitHub Pages-similar service called &lt;a href="https://codeberg.page/">Codeberg Pages&lt;/a>.
The software behind Codeberg Pages is in a &lt;a href="https://codeberg.org/Codeberg/pages-server/issues/399">maintenance mode&lt;/a>, which means bug fixes are accepted but no new features.
Maybe I will search for another solution for my websites in the future, but currently, Codeberg Pages matches my requirements.&lt;/p></description></item><item><title>GitHub to Codeberg Migration - Part 1 - Repositories</title><link>https://blog.sandra-parsick.de/2025/08/07/github-to-codeberg-migration-part-01/</link><pubDate>Thu, 07 Aug 2025 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2025/08/07/github-to-codeberg-migration-part-01/</guid><description>
&lt;p>In this blog post, I'd like to describe my experience with the migration of repositories from GitHub to Codeberg.
The migration is still in progress, so I will update this blog post, when I will have a new lesson learned.&lt;/p>
&lt;h2 id="starting-point">Starting Point&lt;/h2>
&lt;p>As I described in &lt;a href="https://blog.sandra-parsick.de/2025/08/06/github-to-codeberg-migration-motivation/">my previous post&lt;/a>, I have three use cases for using GitHub:&lt;/p>
&lt;ol>
&lt;li>Hosting the source code of my blog and homepage and deploying them to Netlify.&lt;/li>
&lt;li>Hosting source code of some pet projects or sample projects.&lt;/li>
&lt;li>Having forks from open-source projects where I'm contributing.&lt;/li>
&lt;/ol>
&lt;p>For the third use case, I have decided to stay on GitHub to keep my contribution workflow simple.
For the first use case, I have decided to migrate them completely and delete the repositories on GitHub.
Also, I want to have a solution for hosting the website.
Therefore, I choose &lt;a href="https://codeberg.page/">Codeberg Pages&lt;/a> as the solution.
How I configure it, I will describe it in a separate blog post (still wip).&lt;/p></description></item><item><title>Github To Codeberg Migration - Motivation</title><link>https://blog.sandra-parsick.de/2025/08/06/github-to-codeberg-migration-motivation/</link><pubDate>Wed, 06 Aug 2025 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2025/08/06/github-to-codeberg-migration-motivation/</guid><description>
&lt;p>After Microsoft bought GitHub, I made my thoughts on whether it is good to host source code on GitHub.
Many features of Github are for &lt;em>free&lt;/em>.
&lt;em>Free&lt;/em> in this context means you don't pay money for the features but with &lt;em>something else&lt;/em>.
&lt;em>Something else&lt;/em> seems to be our data.
As we learned, it was used to train Co-Pilot.
To be honest, in my opinion, GitHub boosted the possibility of collaboration in open-source projects.
I'm deeply thankful for that.
But my distrust has been grown after the buy.&lt;/p></description></item><item><title>Using Cygwin in 2023</title><link>https://blog.sandra-parsick.de/2023/11/30/oh-my-zsh-on-cygwin/</link><pubDate>Thu, 30 Nov 2023 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2023/11/30/oh-my-zsh-on-cygwin/</guid><description>
&lt;p>In one of my customer project I have to use a Windows 11 system.
In 2023, it should be not a problem as a Linux fan to work on a Windows system, because I could install WSL2 and the story would end on this point.
Because of reasons, it is not allowed and not possible to install WSL2 on my system, so I fall back to Cygwin.&lt;/p>
&lt;p>The default shell on Cygwin is a Bash, but I like to use ZSH in combination with the framework &lt;em>oh-my-zsh&lt;/em> and the theme &lt;em>Starship&lt;/em>.
Of course, Cygwin is not a 100% replacement for WSL2, but it simplifies many things, that I like to do in a shell.&lt;/p></description></item><item><title>Successful Validation of self-signed Server certificates in Java Application</title><link>https://blog.sandra-parsick.de/2023/04/14/successful-validation-of-self-signed-server-certificates-in-java-application/</link><pubDate>Fri, 14 Apr 2023 10:01:42 +0100</pubDate><guid>https://blog.sandra-parsick.de/2023/04/14/successful-validation-of-self-signed-server-certificates-in-java-application/</guid><description>
&lt;p>When your Java application wants to communicate with a server that used self-signed certificate, you get very often a &lt;code>javax.net.ssl.SSLHandshakeException&lt;/code>, because the validation of self signed public key fails.
It is possible to ignore this validation.
But this is not recommended because of it simplifies a man-in-the-middle-attack.&lt;/p>
&lt;p>The best solution is to avoid using self-signed certificate, but sometimes it is not possible (I know, the reasons are very often nonsense, but this case is reality, so you should handle with that).
For this case, you can add the public key of the self-signed server certificate in your truststore of your JVM, so that the Java application can validate the certificate successfully.&lt;/p></description></item><item><title>Using Testcontainers in Spring Boot Tests combined with JUnit5 for Selenium Tests</title><link>https://blog.sandra-parsick.de/2022/11/21/using-testcontainers-selenium-in-spring-boot-tests/</link><pubDate>Mon, 21 Nov 2022 10:01:42 +0100</pubDate><guid>https://blog.sandra-parsick.de/2022/11/21/using-testcontainers-selenium-in-spring-boot-tests/</guid><description>
&lt;p>In this blog post, I'd like to show how to integrate Testcontainers in Spring Boot tests for running UI tests with Selenium.&lt;/p>
&lt;h2 id="why-testcontainers">Why Testcontainers?&lt;/h2>
&lt;p>Testcontainers is a library that helps to integrate infrastructure components like Selenium or databases in integration tests based on Docker Container.
It helps to avoid writing integrated tests.
These are kind of tests that will pass or fail based on the correctness of another system.
In this case, Selenium.
With Testcontainers we have the control over this dependent system.&lt;/p></description></item><item><title>Passing Variables Through GitLab Pipelines</title><link>https://blog.sandra-parsick.de/2022/04/29/passing-variable-through-gitlab-pipelines/</link><pubDate>Fri, 29 Apr 2022 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2022/04/29/passing-variable-through-gitlab-pipelines/</guid><description>
&lt;p>During working with GitLab multi-project pipelines and parent-child pipelines, I have encountered the problem how to pass variables through these pipelines.
The &lt;a href="https://docs.gitlab.com/13.12/ee/ci/multi_project_pipelines.html#passing-cicd-variables-to-a-downstream-pipeline">GitLab documentation&lt;/a> describes very well how to pass variables to a downstream pipeline.
My challenge is how to pass variables from child to parent pipeline and how the parent pipeline can pass these variables to a downstream pipeline, that it describes in another GitLab project.
Let's start, how to publish the variable that are defined in a child pipeline.&lt;/p></description></item><item><title>Pimp My Git - Manage Different Git Authentications</title><link>https://blog.sandra-parsick.de/2022/02/21/pimp-my-git-manage-different-git-authentications/</link><pubDate>Mon, 21 Feb 2022 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2022/02/21/pimp-my-git-manage-different-git-authentications/</guid><description>
&lt;p>Sometimes you have to work on different projects that are hosted on different Git management systems (GitHub, Gitlab, BitBucket, Gitea).
The classical scenario is that you work on open source projects that are hosted on GitHub and on enterprise projects that are hosted on an own Git management system.
These projects also need different authentications.
These authentications can be managed in Password Manager.
But it remains cumbersome to log in with username and password.
Especially with Git repositories, there is the possibility to authenticate using an SSH key and SSH can be configured to detect itself which key to use.&lt;/p></description></item><item><title>How to Debug Jenkins remotely</title><link>https://blog.sandra-parsick.de/2022/02/17/how-to-debug-jenkins-remotely/</link><pubDate>Thu, 17 Feb 2022 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2022/02/17/how-to-debug-jenkins-remotely/</guid><description>
&lt;p>Thanks Jenkins &lt;a href="http://jenkinsci.github.io/maven-hpi-plugin/">Maven HPI Plugin&lt;/a>, you can do the most Jenkins plugin development stuff locally.
But in some cases, you have to debug a Jenkins instance remotely (In my case, the Jenkins had to run in Azure to reproduce a bug).&lt;/p>
&lt;p>Jenkins is a Java application, so you have to add Java's JDWP agent for debugging as Java argument to Jenkins config&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000 // for JDK 9 or later
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The big question is, where is the configuration file on the machine to do it.&lt;/p></description></item><item><title>My Preparation for CKAD Exam</title><link>https://blog.sandra-parsick.de/2021/12/02/my-preparation-for-ckad-exam/</link><pubDate>Thu, 02 Dec 2021 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2021/12/02/my-preparation-for-ckad-exam/</guid><description>
&lt;p>Some days ago, I passed my &lt;a href="https://www.credly.com/badges/7848d923-82cf-42be-a226-b20457cf981e">CKAD (Certified Kubernetes Application Developer) exam&lt;/a>.
In this post I'd like to share the resources, that I used for my preparation.&lt;/p>
&lt;p>I started with reading the book &lt;a href="https://www.manning.com/books/kubernetes-in-action-second-edition">Kubernetes in Action, First Edition&lt;/a> to understand the concept of Kubernetes (k8s) under the hood.
It gave me a deep dive in k8s.
It was a deeper dive than I really need as a developer in my daily life, but this knowledge helps me when I have to do troubleshooting and in the communication with k8s administrators.&lt;/p></description></item><item><title>How to Measure Test Coverage in Invoker Tests with JaCoCo</title><link>https://blog.sandra-parsick.de/2021/05/31/how-to-measure-test-coverage-in-invoker-tests-with-jacoco/</link><pubDate>Mon, 31 May 2021 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2021/05/31/how-to-measure-test-coverage-in-invoker-tests-with-jacoco/</guid><description>
&lt;p>During the development of the &lt;a href="https://github.com/reficio/p2-maven-plugin">P2 Maven Plugin&lt;/a>, I wanted to get an overview about the test coverage of the code.
The tests of this plugin can be divided in two groups:&lt;/p>
&lt;ul>
&lt;li>&lt;em>Unit tests&lt;/em>, that is written with Java, Groovy and JUnit;&lt;/li>
&lt;li>&lt;em>integration tests&lt;/em>, that is written with &lt;a href="https://maven.apache.org/plugins/maven-invoker-plugin/index.html">Maven Invoker Plugin&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;a href="https://www.jacoco.org/jacoco/">JaCoCo &lt;/a> is the defacto standard for test coverage measurement in the Java ecosystem.
For the unit tests, the JaCoCo configuration was not a challenge.
How this configuration looks like can be read in the &lt;a href="https://blog.sandra-parsick.de/2020/06/10/test-coverage-reports-for-maven-projects-in-sonarqube-8-3-x">post &amp;quot;Test Coverage Reports For Maven Projects In SonarQube 8.3.x&amp;quot;&lt;/a>.&lt;/p></description></item><item><title>Test Coverage Reports For Maven Projects In SonarQube 8.3.x</title><link>https://blog.sandra-parsick.de/2020/06/10/test-coverage-reports-for-maven-projects-in-sonarqube-8-3-x/</link><pubDate>Wed, 10 Jun 2020 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2020/06/10/test-coverage-reports-for-maven-projects-in-sonarqube-8-3-x/</guid><description>
&lt;p>Some years ago I write a &lt;a href="https://blog.sandra-parsick.de/2015/01/30/unit-and-integration-test-reports-for-maven-projects-in-sonarqube/">blog post&lt;/a> about how to generate test reports in SonarQube separate in test report for unit tests and for integration tests. Since SonarQube 6.2 the test report isn't separate in these categories any more (see &lt;a href="https://blog.sonarsource.com/sonarqube-6-2-in-screenshots/">SonarQube's blog post&lt;/a>). SonarQube merges all test reports to one test report with an overall coverage. So how to configure JaCoCo Maven Plugin if you have separate your tests in unit tests (running by Maven Surefire Plugin) and integration tests (running by Maven Failsafe Plugin) in your Maven project.&lt;/p></description></item><item><title>Using Testcontainers in Spring Boot Tests For Database Integration Tests</title><link>https://blog.sandra-parsick.de/2020/05/21/using-testcontainers-in-spring-boot-tests-for-database-integration-tests/</link><pubDate>Thu, 21 May 2020 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2020/05/21/using-testcontainers-in-spring-boot-tests-for-database-integration-tests/</guid><description>
&lt;p>In this blog post I'd like to demonstrate how I integrate Testcontainers in Spring Boot tests for running integration tests with a database. I'm not using Testcontainers' Spring Boot modules. How it works with them, I will show in a separate blog post. All samples can be found on &lt;a href="https://github.com/sparsick/testcontainers-spring-boot">GitHub&lt;/a>.&lt;/p>
&lt;h2 id="why-testcontainers">Why Testcontainers?&lt;/h2>
&lt;p>Testcontainers is a library that helps to integrate infrastructure components like database in integration tests based on Docker Container. It helps to avoid writing integrated tests. These are kind of tests that will pass or fail based on the correctness of another system. With Testcontainers I have the control over these dependent systems.&lt;/p></description></item><item><title>Test Environment for Ansible on a Windows System Without Linux Subsystem Support</title><link>https://blog.sandra-parsick.de/2020/01/24/test-environment-for-ansible-on-a-windows-system-without-linux-subsystem-support/</link><pubDate>Fri, 24 Jan 2020 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2020/01/24/test-environment-for-ansible-on-a-windows-system-without-linux-subsystem-support/</guid><description>
&lt;p>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 ask me about reasons). So I recommend following set up.&lt;/p></description></item><item><title>Software Engineering Camp 2019</title><link>https://blog.sandra-parsick.de/2019/12/10/software-engineering-camp-2019/</link><pubDate>Tue, 10 Dec 2019 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2019/12/10/software-engineering-camp-2019/</guid><description>
&lt;p>Some weeks ago, I visited the bar camp &amp;quot;Software Engineering Camp 2019&amp;quot; in Erlangen. It was my first time visiting. I'd like to share my experience.&lt;/p>
&lt;h2 id="friday-evening">Friday evening&lt;/h2>
&lt;p>The bar camp started on Friday evening with three lighting talks. Firstly, &lt;a href="https://twitter.com/feststelltaste">Markus Harrer&lt;/a> talked about psychology in software development.&lt;/p>
&lt;blockquote class="twitter-tweet">&lt;p lang="en" dir="ltr">Here are the slides of my talk &amp;quot;Psychology screws it all up!&amp;quot; at &lt;a href="https://twitter.com/swe_camp?ref_src=twsrc%5Etfw">@swe_camp&lt;/a> (in German). &lt;br>&lt;br>Static: &lt;a href="https://t.co/8NC3VAN2x9">https://t.co/8NC3VAN2x9&lt;/a>&lt;br>Dynamic: &lt;a href="https://t.co/HgsaabotWu">https://t.co/HgsaabotWu&lt;/a>&lt;/p>&amp;mdash; Markus Harrer (@feststelltaste) &lt;a href="https://twitter.com/feststelltaste/status/1193093583332675586?ref_src=twsrc%5Etfw">November 9, 2019&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;p>The second lightning talk by Sasabe-san was about the mindset behind ShuHaRi. He is a Japanese software engineer, and he explained what the Japanese understand by ShuHaRi. And surprise, surprise, they have a different understanding than Europeans.&lt;/p></description></item><item><title>Strategy Pattern Revisited With Spring</title><link>https://blog.sandra-parsick.de/2019/09/18/strategy-pattern-revisited-with-spring/</link><pubDate>Wed, 18 Sep 2019 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2019/09/18/strategy-pattern-revisited-with-spring/</guid><description>
&lt;p>This blog post wants to show another approach how to implement the Strategy Pattern with dependency injection. As DI framework, I choose Spring framework&lt;/p>
&lt;p>&lt;figure>
&lt;picture>
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_external image_processed"
width="650"
height="240"
src="https://blog.sandra-parsick.de/images/W3sDesign_Strategy_Design_Pattern_UML_4601814998929417155.jpg"
/>
&lt;/picture>
&lt;/figure>
&lt;/p>
&lt;p>From &lt;a href="https://en.wikipedia.org/wiki/Strategy_pattern">Wikipedia&lt;/a>&lt;/p>
&lt;p>Firstly, let's have a look how the Strategy Pattern is implemented in the classic way.&lt;br>
As starting point, we have a &lt;code>HeroController&lt;/code> that should add a hero in &lt;code>HeroRepository&lt;/code> depends on which repository was chosen by the user.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="ln"> 1&lt;/span>&lt;span class="cl">&lt;span class="kn">package&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">com.github.sparsick.springbootexample.hero.universum&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 2&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 3&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">org.springframework.stereotype.Controller&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 4&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">org.springframework.web.bind.annotation.ModelAttribute&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 5&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">org.springframework.web.bind.annotation.PostMapping&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 6&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 7&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nd">@Controller&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 8&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">class&lt;/span> &lt;span class="nc">HeroControllerClassicWay&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 9&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">10&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@PostMapping&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;/hero/new&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">11&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">addNewHero&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nd">@ModelAttribute&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;newHero&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">NewHeroModel&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">newHeroModel&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">12&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">HeroRepository&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">heroRepository&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">findHeroRepository&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">newHeroModel&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">getRepository&lt;/span>&lt;span class="p">());&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">13&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">heroRepository&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">addHero&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">newHeroModel&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">getHero&lt;/span>&lt;span class="p">());&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">14&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s">&amp;#34;redirect:/hero&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">15&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">16&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">17&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">HeroRepository&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">findHeroRepository&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">repositoryName&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">18&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">if&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">repositoryName&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">equals&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Unique&amp;#34;&lt;/span>&lt;span class="p">))&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">19&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">UniqueHeroRepository&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">20&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">21&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">22&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">if&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">repositoryName&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">equals&lt;/span>&lt;span class="p">((&lt;/span>&lt;span class="s">&amp;#34;Duplicate&amp;#34;&lt;/span>&lt;span class="p">)){&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">23&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">DuplicateHeroRepository&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">24&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">25&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">26&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">throw&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">IllegalArgumentException&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">format&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Find no repository for given repository name \[%s\]&amp;#34;&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">repositoryName&lt;/span>&lt;span class="p">));&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">27&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">28&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="ln"> 1&lt;/span>&lt;span class="cl">&lt;span class="kn">package&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">com.github.sparsick.springbootexample.hero.universum&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 2&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 3&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">java.util.Collection&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 4&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">java.util.HashSet&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 5&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">java.util.Set&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 6&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 7&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">org.springframework.stereotype.Repository&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 8&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 9&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nd">@Repository&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">10&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">class&lt;/span> &lt;span class="nc">UniqueHeroRepository&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">implements&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">HeroRepository&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">11&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">12&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">Set&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">Hero&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">heroes&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">HashSet&lt;/span>&lt;span class="o">&amp;lt;&amp;gt;&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">13&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">14&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@Override&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">15&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">getName&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">16&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s">&amp;#34;Unique&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">17&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">18&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">19&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@Override&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">20&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">addHero&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">Hero&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">hero&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">21&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">heroes&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">add&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">hero&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">22&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">23&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">24&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@Override&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">25&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">Collection&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">Hero&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">allHeros&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">26&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">HashSet&lt;/span>&lt;span class="o">&amp;lt;&amp;gt;&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">heroes&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">27&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">28&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">29&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="ln"> 1&lt;/span>&lt;span class="cl">&lt;span class="kn">package&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">com.github.sparsick.springbootexample.hero.universum&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 2&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 3&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">org.springframework.stereotype.Repository&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 4&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 5&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">java.util.ArrayList&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 6&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">java.util.Collection&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 7&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kn">import&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nn">java.util.List&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 8&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 9&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nd">@Repository&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">10&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">class&lt;/span> &lt;span class="nc">DuplicateHeroRepository&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">implements&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">HeroRepository&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">11&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">12&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">List&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">Hero&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">heroes&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">ArrayList&lt;/span>&lt;span class="o">&amp;lt;&amp;gt;&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">13&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">14&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@Override&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">15&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">addHero&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">Hero&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">hero&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">16&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">heroes&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">add&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">hero&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">17&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">18&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">19&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@Override&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">20&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">Collection&lt;/span>&lt;span class="o">&amp;lt;&lt;/span>&lt;span class="n">Hero&lt;/span>&lt;span class="o">&amp;gt;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">allHeros&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">21&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">List&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">copyOf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">heroes&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">22&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">23&lt;/span>&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">24&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@Override&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">25&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">getName&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">26&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s">&amp;#34;Duplicate&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">27&lt;/span>&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">28&lt;/span>&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This implementation has some pitfalls. The creation of the repository implementations aren't managed by the Spring Context (it breaks the dependency injection / inverse of control). This will be painful as soon as you want to expand the repository implementation with further feature that need to inject other classes (for example, counting the usage of this class with &lt;code>MeterRegistry&lt;/code>).&lt;/p></description></item><item><title>Maven Project Setup for Mixing Spock 1.x and JUnit 5 Tests</title><link>https://blog.sandra-parsick.de/2019/03/21/maven-project-setup-for-mixing-spock-1-x-and-junit-5-tests/</link><pubDate>Thu, 21 Mar 2019 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2019/03/21/maven-project-setup-for-mixing-spock-1-x-and-junit-5-tests/</guid><description>
&lt;p>I 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.&lt;/p>
&lt;h3 id="enable-groovy-in-the-project">Enable Groovy in the Project&lt;/h3>
&lt;p>First at all, you have to enable Groovy in your project. One possibility is to add the &lt;a href="https://groovy.github.io/GMavenPlus/">GMavenPlus Plugin&lt;/a> to your project.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-xml" data-lang="xml">&lt;span class="line">&lt;span class="ln"> 1&lt;/span>&lt;span class="cl">&lt;span class="nt">&amp;lt;build&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 2&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;plugins&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 3&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;plugin&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 4&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;groupId&amp;gt;&lt;/span>org.codehaus.gmavenplus&lt;span class="nt">&amp;lt;/groupId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 5&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;artifactId&amp;gt;&lt;/span>gmavenplus-plugin&lt;span class="nt">&amp;lt;/artifactId&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 6&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;version&amp;gt;&lt;/span>1.6.2&lt;span class="nt">&amp;lt;/version&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 7&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;executions&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 8&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;execution&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 9&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;goals&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">10&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;goal&amp;gt;&lt;/span>addSources&lt;span class="nt">&amp;lt;/goal&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">11&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;goal&amp;gt;&lt;/span>addTestSources&lt;span class="nt">&amp;lt;/goal&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">12&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;goal&amp;gt;&lt;/span>compile&lt;span class="nt">&amp;lt;/goal&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">13&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;goal&amp;gt;&lt;/span>compileTests&lt;span class="nt">&amp;lt;/goal&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">14&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;/goals&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">15&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;/execution&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">16&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;/executions&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">17&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;/plugin&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">18&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;/plugins&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">19&lt;/span>&lt;span class="cl">&lt;span class="nt">&amp;lt;/build&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The goals &lt;code>addSources&lt;/code> and &lt;code>addTestSources&lt;/code> add Groovy (test) sources to Maven's main (test) sources. The default locations are &lt;code>src/main/groovy&lt;/code> (for main source) and &lt;code>src/test/groovy&lt;/code> (for test source). Goals &lt;code>compile&lt;/code> and &lt;code>compileTests&lt;/code> compile the Groovy (test) code. If you don't have Groovy main code, you can omit &lt;code>addSource&lt;/code> and &lt;code>compile&lt;/code>.&lt;/p></description></item><item><title>Using JUnit 5 In Pre-Java 8 Projects</title><link>https://blog.sandra-parsick.de/2019/01/20/using-junit-5-in-pre-java-8-projects/</link><pubDate>Sun, 20 Jan 2019 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2019/01/20/using-junit-5-in-pre-java-8-projects/</guid><description>
&lt;p>This 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 example, the version of your application server in production only supports Java 7. But an update isn't be taken quickly because of some issues in your production code. Now, the question is how can you use JUnit 5 without update your production code to Java 8? You can set up the Java version separately for production code and for test code.&lt;/p></description></item><item><title>How to Format a Large Code Base Automatically</title><link>https://blog.sandra-parsick.de/2018/10/19/how-to-format-a-large-code-base-automatically/</link><pubDate>Fri, 19 Oct 2018 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2018/10/19/how-to-format-a-large-code-base-automatically/</guid><description>
&lt;p>If 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 &lt;code>Autoformat the whole project.&lt;/code> But this is boring and waste of time. Fortunately, Intellij IDEA has a format CLI tool in its installation. You can locate it in the path &lt;code>&amp;lt;your Intellij IDEA installation&amp;gt;/bin&lt;/code>. It's called &lt;code>format.sh&lt;/code>. In the next section I'd like to show you how you can automate formatting big code base. First, I will show the preparation steps like exporting your code formatting rule setting from the IDE. Then, I will demonstrate how to use the CLI-Tool &lt;code>format.sh.&lt;/code> At the end, I will show a small Groovy script that query all repositories (in this case they are Git repositories), formatting the code and push it back to the remote SCM.&lt;/p></description></item><item><title>Running Ansible on a Windows System</title><link>https://blog.sandra-parsick.de/2018/06/11/running-ansible-on-a-windows-system/</link><pubDate>Mon, 11 Jun 2018 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2018/06/11/running-ansible-on-a-windows-system/</guid><description>
&lt;p>On my last conference talk (it was about &lt;a href="https://www.sandra-parsick.de/talk/ansible-docker-devopscon/">Ansible and Docker at DevOpsCon&lt;/a> 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 Ansible's playbooks inside the virtual machine. I set up the virtual machine with Virtualbox and Vagrant. This tools allow me to share the playbooks easily between host and the virtual machine. so I can develop the playbook on the windows system and the virtual machine can have a headless setup. The next section shows you how to set up this tool chain.&lt;/p></description></item><item><title>Apache2 as Reverse Proxy for NPM Registry Proxies in Sonatype Nexus 3</title><link>https://blog.sandra-parsick.de/2018/04/29/apache2-as-reverse-proxy-for-npm-registry-proxies-in-sonatype-nexus-3/</link><pubDate>Sun, 29 Apr 2018 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2018/04/29/apache2-as-reverse-proxy-for-npm-registry-proxies-in-sonatype-nexus-3/</guid><description>
&lt;p>I use a NPM registry proxy in Sonatype Nexus 3 behind an Apache2 as reverse proxy. With the &amp;quot;standard&amp;quot; Apache2 VirtualHost configuration&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&amp;lt;VirtualHost:80&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl"> ProxyRequests Off
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl"> &amp;lt;Proxy *&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl"> Order deny,allow
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">5&lt;/span>&lt;span class="cl"> Allow from all
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">6&lt;/span>&lt;span class="cl"> &amp;lt;/Proxy&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">7&lt;/span>&lt;span class="cl"> ProxyPass / http://localhost:8081/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">8&lt;/span>&lt;span class="cl"> ProxyPassReverse / http://localhost:8081/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">9&lt;/span>&lt;span class="cl">&amp;lt;/VirtualHost:80&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>I got following failure when I tried to install the dependency &lt;code>@sinonjs/formatio&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="ln"> 1&lt;/span>&lt;span class="cl">$ yarn add @sinonjs/formatio --verbose
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 2&lt;/span>&lt;span class="cl"> yarn add v1.3.2
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 3&lt;/span>&lt;span class="cl"> warning package.json: No license field
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 4&lt;/span>&lt;span class="cl"> verbose 0.337 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/yarn-test-module/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 5&lt;/span>&lt;span class="cl"> verbose 0.337 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 6&lt;/span>&lt;span class="cl"> verbose 0.337 Found configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 7&lt;/span>&lt;span class="cl"> verbose 0.337 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/usr/etc/npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 8&lt;/span>&lt;span class="cl"> verbose 0.338 Found configuration file &lt;span class="s2">&amp;#34;/usr/etc/npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 9&lt;/span>&lt;span class="cl"> verbose 0.338 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/yarn-test-module/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">10&lt;/span>&lt;span class="cl"> verbose 0.338 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">11&lt;/span>&lt;span class="cl"> verbose 0.338 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">12&lt;/span>&lt;span class="cl"> verbose 0.338 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">13&lt;/span>&lt;span class="cl"> verbose 0.338 Found configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">14&lt;/span>&lt;span class="cl"> verbose 0.338 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/.npmrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">15&lt;/span>&lt;span class="cl"> verbose 0.341 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/yarn-test-module/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">16&lt;/span>&lt;span class="cl"> verbose 0.342 Found configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/yarn-test-module/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">17&lt;/span>&lt;span class="cl"> verbose 0.343 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">18&lt;/span>&lt;span class="cl"> verbose 0.344 Found configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">19&lt;/span>&lt;span class="cl"> verbose 0.344 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/usr/etc/yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">20&lt;/span>&lt;span class="cl"> verbose 0.344 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/yarn-test-module/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">21&lt;/span>&lt;span class="cl"> verbose 0.345 Found configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/yarn-test-module/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">22&lt;/span>&lt;span class="cl"> verbose 0.345 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/workspace/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">23&lt;/span>&lt;span class="cl"> verbose 0.345 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/dev/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">24&lt;/span>&lt;span class="cl"> verbose 0.345 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">25&lt;/span>&lt;span class="cl"> verbose 0.345 Found configuration file &lt;span class="s2">&amp;#34;/home/sparsick/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">26&lt;/span>&lt;span class="cl"> verbose 0.345 Checking &lt;span class="k">for&lt;/span> configuration file &lt;span class="s2">&amp;#34;/home/.yarnrc&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">27&lt;/span>&lt;span class="cl"> verbose 0.347 current time: 2018-02-27T08:04:43.357Z warning yarn-test-module: No license field &lt;span class="se">\[&lt;/span>1/4&lt;span class="se">\]&lt;/span> Resolving packages...
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">28&lt;/span>&lt;span class="cl"> verbose 0.45 Performing &lt;span class="s2">&amp;#34;GET&amp;#34;&lt;/span> request to &lt;span class="s2">&amp;#34;http://mycompany/repository/npm-public/@sinonjs%2fformatio&amp;#34;&lt;/span>.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">29&lt;/span>&lt;span class="cl"> verbose 0.55 Request &lt;span class="s2">&amp;#34;http://mycompany/repository/npm-public/@sinonjs%2fformatio&amp;#34;&lt;/span> finished with status code 404.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">30&lt;/span>&lt;span class="cl"> verbose 0.551 Error: Couldn&lt;span class="s1">&amp;#39;t find package &amp;#34;@sinonjs/formatio&amp;#34; on the &amp;#34;npm&amp;#34; registry. at /usr/lib/node\_modules/yarn/lib/cli.js:49061:15 at Generator.next (&amp;lt;anonymous&amp;gt;) at step (/usr/lib/node\_modules/yarn/lib/cli.js:92:30) at /usr/lib/node\_modules/yarn/lib/cli.js:103:13 at &amp;lt;anonymous&amp;gt; at process.\_tickCallback (internal/process/next\_tick.js:188:7) error Couldn&amp;#39;&lt;/span>t find package &lt;span class="s2">&amp;#34;@sinonjs/formatio&amp;#34;&lt;/span> on the &lt;span class="s2">&amp;#34;npm&amp;#34;&lt;/span> registry. info Visit https://yarnpkg.com/en/docs/cli/add &lt;span class="k">for&lt;/span> documentation about this command.
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The problem is that Apache2 canonicalizes URLs as default. So I have to configure Apache2 to not canonicalize URLs and additionally, I have to allow encoded slashes:&lt;/p></description></item><item><title>Mocking SecurityContext in Jersey Tests</title><link>https://blog.sandra-parsick.de/2018/03/29/mocking-securitycontext-in-jersey-tests/</link><pubDate>Thu, 29 Mar 2018 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2018/03/29/mocking-securitycontext-in-jersey-tests/</guid><description>
&lt;p>Jersey has a great possibility to write integration test for REST-APIs, written with Jersey. Just extend the class &lt;code>JerseyTest&lt;/code> and go for it. I ran in an issue, where I had to mock a &lt;code>SecurityContext&lt;/code>, so that the &lt;code>SecurityContext&lt;/code> includes a special &lt;code>UserPrincipal&lt;/code>. The challenge is that Jersey wraps the &lt;code>SecurityContext&lt;/code> in an own class &lt;code>SecurityContextInjectee&lt;/code> in tests. So I have to add my &lt;code>SecurityContext&lt;/code> Mock to this Jersey's wrapper class. Let me demonstrate it in an example. Let say I have the following Jersey Resource:&lt;/p></description></item><item><title>Pimp My Git - Generate Content for .gitignore From the Scratch</title><link>https://blog.sandra-parsick.de/2018/01/03/pimp-my-git-generate-content-for-gitignore-from-the-scratch/</link><pubDate>Wed, 03 Jan 2018 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2018/01/03/pimp-my-git-generate-content-for-gitignore-from-the-scratch/</guid><description>
&lt;p>When I start a new Git repository, I lose a lot of time to set up my &lt;code>.gitignore&lt;/code> 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 plugin for the IDE &lt;em>IntelliJ IDEA&lt;/em>.&lt;/p>
&lt;h2 id="website-gitignoreio">Website gitignore.io&lt;/h2>
&lt;p>&lt;figure>
&lt;picture>
&lt;img
loading="lazy"
decoding="async"
alt=""
class="image_figure image_internal image_unprocessed"
src="https://blog.sandra-parsick.de/gitignore_search_mask.png"
/>
&lt;/picture>
&lt;/figure>
&lt;/p></description></item><item><title>How to Mark a Jenkins Job Red When Tests Fail In A Maven Build</title><link>https://blog.sandra-parsick.de/2017/10/14/how-to-mark-a-jenkins-job-red-when-tests-fail-in-a-maven-build/</link><pubDate>Sat, 14 Oct 2017 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2017/10/14/how-to-mark-a-jenkins-job-red-when-tests-fail-in-a-maven-build/</guid><description>
&lt;p>The default setting in Jenkins is to mark a job yellow, when a Maven build fails because of failing tests. If you don't want to have three status of your jobs, you can configure Jenkins so, that the jobs also mark red independent why a Maven build fails. For this you will need administration rights on your Jenkins instance. Following steps have to be done:&lt;/p>
&lt;ol>
&lt;li>Go to &lt;code>Manage Jenkins -&amp;gt; Manage system.&lt;/code>&lt;/li>
&lt;li>Add &lt;code>-Dmaven.test.failure.ignore=false&lt;/code> to &lt;code>Maven Project Configuration -&amp;gt; Global Maven_OPTS.&lt;/code>&lt;/li>
&lt;li>Save this change and that's it.&lt;/li>
&lt;/ol>
&lt;p>Your next job run will consider this configuration. Unfortunately, this configuration has only effects for Maven jobs. Freestyle jobs ignore this configuration (see also &lt;a href="https://issues.jenkins-ci.org/browse/JENKINS-24655">this bug&lt;/a>). But a workaround exists:&lt;/p></description></item><item><title>Generate P2 Repository From Maven Artifacts In 2017</title><link>https://blog.sandra-parsick.de/2017/09/22/generate-p2-repository-from-maven-artifacts-in-2017/</link><pubDate>Fri, 22 Sep 2017 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2017/09/22/generate-p2-repository-from-maven-artifacts-in-2017/</guid><description>
&lt;p>Some years ago, I wrote a &lt;a href="http://blog.sandra-parsick.de/2013/07/04/generate-p2-repository-from-maven-dependencies/">blog post&lt;/a> about how to generate a P2 repository based on Maven artifacts. That described approach is obsolete nowadays and I'd like to show a new approach that is based on the &lt;a href="https://github.com/reficio/p2-maven-plugin">p2-maven-plugin&lt;/a> that was created to solve exactly this problem.&lt;/p>
&lt;h2 id="p2-maven-plugin-integration-in-maven-build-life-cycle">P2-Maven-Plugin Integration in Maven Build Life Cycle&lt;/h2>
&lt;p>First at all, we bind the p2-maven-plugin's goal &lt;code>site&lt;/code> to the Maven's life cycle phase &lt;code>package&lt;/code>. This goal is responsible for the generation of the P2 repository.&lt;/p></description></item><item><title>How to Configure Apache2 as Forward and Reverse Proxy</title><link>https://blog.sandra-parsick.de/2017/08/25/how-to-configure-apache2-as-forward-and-reverse-proxy/</link><pubDate>Fri, 25 Aug 2017 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2017/08/25/how-to-configure-apache2-as-forward-and-reverse-proxy/</guid><description>
&lt;p>This is a cook recipe to configure an Apache2 as a forward and reverse proxy on Debian-based Linux systems like Ubuntu or Debian itself.&lt;/p>
&lt;h1 id="installation">Installation&lt;/h1>
&lt;p>It is assumed that the &lt;code>apache2&lt;/code> package is already installed on your system. For the proxy feature, we have to install the Apache2 module &lt;code>libapache2-mod-proxy-html&lt;/code> on the system and activate theses Apache modules. At the end, Apache2 has to be restarted, so that the modules can be used.&lt;/p></description></item><item><title>Pimp My Git - Manage Different Git Identities</title><link>https://blog.sandra-parsick.de/2017/07/24/pimp-my-git-manage-different-git-identities/</link><pubDate>Mon, 24 Jul 2017 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2017/07/24/pimp-my-git-manage-different-git-identities/</guid><description>
&lt;p>I usually work on different Git projects that need different Git identities. My work flow for new repositories was&lt;/p>
&lt;ol>
&lt;li>Clone new repository.&lt;/li>
&lt;li>Go to cloned repository.&lt;/li>
&lt;li>If it is necessary to change the Git identity, call a shell script that runs &lt;code>git config user.name &amp;quot;Sandra Parsick&amp;quot;; git config user.email sparsick@web.de&lt;/code>&lt;/li>
&lt;/ol>
&lt;p>I was never happy with this solution, but it works. Fortunately, a tweet of &lt;a href="https://twitter.com/BenediktRitter">@BenediktRitter&lt;/a> and one of &lt;a href="https://twitter.com/wosc">@wosc&lt;/a> suggest two alternatives to my method.&lt;/p></description></item><item><title>Pimp My Git - Git Mergetool</title><link>https://blog.sandra-parsick.de/2017/05/25/pimp-my-git-git-mergetool/</link><pubDate>Thu, 25 May 2017 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2017/05/25/pimp-my-git-git-mergetool/</guid><description>
&lt;p>I like to work with git on the command line. But in some cases I prefer UI support. For example, solving merge conflicts is such a case. Git has a command &lt;code>mergetool&lt;/code>, which can open a graphical tool to solve merge conflicts. But before you can use this command, you had to configure it. In this blog post I'd like to show you how to configure mergetool and how to use it.&lt;/p></description></item><item><title>Automatic Tomcat 8.5 Installation and Configuration as Windows Service</title><link>https://blog.sandra-parsick.de/2017/03/15/automatic-tomcat-8-5-installation-and-configuration-as-windows-service/</link><pubDate>Wed, 15 Mar 2017 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2017/03/15/automatic-tomcat-8-5-installation-and-configuration-as-windows-service/</guid><description>
&lt;p>If you want to install Tomcat on Windows system as a service, you'll get the recommendation to use the &lt;em>32-/64-Bit Windows Service Installer&lt;/em>. If you want to install the Tomcat manually, it's fine. But you can't use this installer for an automatic installation and configuration of Tomcat, because the installer is UI-based. The next sections explain how you can install and configure Tomcat on a CMD.&lt;/p>
&lt;h1 id="tomcat-installation">Tomcat Installation&lt;/h1>
&lt;ol>
&lt;li>Download from the Apache Tomcat 8.5 &lt;a href="http://tomcat.apache.org/download-80.cgi">download page&lt;/a> the &lt;code>Core 64-bit Windows zip&lt;/code> (or the 32-Bit zip).&lt;/li>
&lt;li>Unzip it (for example to &lt;code>C:\tomcat\&lt;/code>)&lt;/li>
&lt;/ol>
&lt;p>That's it. Now we have a ready-to-use Tomcat with default configuration values. But it isn't install as a service.&lt;/p></description></item><item><title>Migration Sonatype Nexus 2 to Nexus 3</title><link>https://blog.sandra-parsick.de/2016/12/30/migration-sonatype-nexus-2-to-nexus-3/</link><pubDate>Fri, 30 Dec 2016 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2016/12/30/migration-sonatype-nexus-2-to-nexus-3/</guid><description>
&lt;p>I'd like to share my experience with migration Sonatype Nexus 2 to Nexus 3.&lt;/p>
&lt;h2 id="starting-point">Starting Point&lt;/h2>
&lt;p>I used two Nexus instances:&lt;/p>
&lt;ul>
&lt;li>A Nexus 2 Instance for Maven Repositories (2.13)&lt;/li>
&lt;li>A Nexus 3 Instance for Bower Repositories (3.0.1)&lt;/li>
&lt;/ul>
&lt;p>Both instances had several types of repositories (host, proxy, group). The reason for this set up was that Sonatype recommended not to use Nexus 3 (pre 3.1) for Maven repositories and Nexus 2 doesn't support Bower repositories.&lt;/p></description></item><item><title>Summary of SoCraTes 2016 Session "Hey dude, where is my tool chain?" - Working on Windows as a Linux</title><link>https://blog.sandra-parsick.de/2016/09/20/summary-of-socrates-2016-session-hey-dude-where-is-my-tool-chain-working-on-windows-as-a-linux-user-aka-lets-talk-about-windows/</link><pubDate>Tue, 20 Sep 2016 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2016/09/20/summary-of-socrates-2016-session-hey-dude-where-is-my-tool-chain-working-on-windows-as-a-linux-user-aka-lets-talk-about-windows/</guid><description>
&lt;p>This year on the conference SoCraTes I hosted a session for the first time. It was about working on a Windows system from the perspective of a Linux user.  A big thank to &lt;a href="https://twitter.com/ndrssmn">@ndrssmn&lt;/a>, who motivated to host this session.&lt;/p>
&lt;p>&lt;a href="https://twitter.com/yooogan">@yooogan&lt;/a> was so nice to summarize the session in the &lt;a href="https://www.socrates-conference.de/wiki/2016/session_windows_tools">SoCraTes wiki&lt;/a> (big thank for that).  But the wiki page is only accessible for SoCraTes participants, so we decided that I republish it on my blog. Enjoy it.&lt;/p></description></item><item><title>My Lesson Learned From Doing Gilded Rose Kata</title><link>https://blog.sandra-parsick.de/2016/06/28/my-lesson-learned-from-doing-gilded-rose-kata/</link><pubDate>Tue, 28 Jun 2016 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2016/06/28/my-lesson-learned-from-doing-gilded-rose-kata/</guid><description>
&lt;p>I'd like to share some of my thoughts about my approach to solve the Gilded Rose Refactoring Kata by Emily Bache. If you don't know this kata, read the &lt;a href="https://github.com/emilybache/GildedRose-Refactoring-Kata">description&lt;/a> for a better understanding. I have published my whole solution on &lt;a href="https://github.com/sparsick/coding-katas/tree/master/GildedRose-Refactoring-Kata-Java">GitHub&lt;/a> . I tried to make a commit after every step, so you can keep track of my steps in the log of git. The chosen programming language is Java.&lt;/p>
&lt;h1 id="solving-gilded-rose-step-by-step">Solving Gilded Rose Step-By-Step&lt;/h1>
&lt;p>Let's have a look at what I have done step-by-step. Before adding the new feature, I wanted to refactor the given code base. Therefore, I started writing tests till I had a 100% line and branch coverage. During writing the tests, I was having the idea,, that the calculation of the quality is depended by the name of the item. Hence, the idea arose to use something similar like the &lt;a href="https://en.wikipedia.org/wiki/Strategy_pattern">Strategy Pattern&lt;/a>. When I reached for 100% coverage, I tried to start with the implementation for the first strategy (&amp;quot;Aged Brie&amp;quot;). But I was unsure, what was my limit values for this first strategy. My problem was that I hadn't tests for the limit values. So my first lessons learned was that 100% line or branch coverage doesn't mean all test cases are covered. So I added tests for the limit values and finished implementing the &amp;quot;Aged Brie&amp;quot; strategy, added it to the original &lt;code>updateQualtity&lt;/code> method (see below code snippet) and ran the tests. All tests were green.&lt;/p></description></item><item><title>Continuous Integration Infrastructure With Windows - Scripting With PowerShell</title><link>https://blog.sandra-parsick.de/2016/05/17/continuous-integration-infrastructure-with-windows-scripting-with-powershell/</link><pubDate>Tue, 17 May 2016 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2016/05/17/continuous-integration-infrastructure-with-windows-scripting-with-powershell/</guid><description>
&lt;p>In one of my current project, I deal with how to run a Continuous Integration (CI) infrastructure on Windows machines. I have had experience in running a CI infrastructure for five years, but it was always on Linux machines. So in the next months I will write some blog posts about my challenge with Windows machines from the perspective of a Linux fan girl :-). This first blog post is about shell scripting on Windows. But bear in mind: This blog post isn't a tutorial for PowerShell scripting. It only explains striking feature coming from Linux background. When you run a CI infrastructure, it's a frequent practice to write little shell scripts to automate repeatable tasks. On a Linux system you would write your scripts in Bash or in a script language like Perl or Phyton. I usually write my script in Bash or in Groovy. I choose Groovy, because I'm a Java Developer and it is possible writing Groovy script in Java-style in the beginning and the second argument for me was, that the administration of Jenkins is easier with Groovy scripts. Jenkins supports a Groovy console for administration tasks and build job's step also can be automated with Groovy in Jenkins, directly. So I use Groovy for other automated tasks to not use so many script languages at the same time. Now you can say, ok, what's the problem. It is able to use Groovy on Windows system. The problem is the requirements in my project. It is only allowed to use Java, C# or PowerShell as programming language. But I want to write little scripts, so from this point of view, only PowerShell remains.&lt;/p></description></item><item><title>Deleting Windows Services In PowerShell</title><link>https://blog.sandra-parsick.de/2016/05/11/deleting-windows-services-in-powershell/</link><pubDate>Wed, 11 May 2016 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2016/05/11/deleting-windows-services-in-powershell/</guid><description>
&lt;p>For deleting a Windows service in Windows CMD, you have to call&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-cmd" data-lang="cmd">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">sc delete &lt;span class="s2">&amp;#34;Service Name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This doesn't work in PowerShell, because &lt;code>sc&lt;/code> is an alias for the cmdlet &lt;code>Set-Content&lt;/code> in PowerShell. Deleting Windows service in PowerShell can be done by calling&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-powershell" data-lang="powershell">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="n">sc&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="py">exe&lt;/span> &lt;span class="n">delete&lt;/span> &lt;span class="s2">&amp;#34;Service Name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note, that PowerShell has to be run as administrator.&lt;/p></description></item><item><title>How to Install Serverspec in the Current Version on Ubuntu 14.04 LTS (Trusty)</title><link>https://blog.sandra-parsick.de/2016/03/16/how-to-install-serverspec-in-the-current-version-on-ubuntu-14-04-lts-trusty/</link><pubDate>Wed, 16 Mar 2016 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2016/03/16/how-to-install-serverspec-in-the-current-version-on-ubuntu-14-04-lts-trusty/</guid><description>
&lt;p>If you google &amp;quot;serverspec install ubuntu&amp;quot;, you find the information that a package called &lt;code>ruby-serverspec&lt;/code> in the standard package repository can be used to install Serverspec on an Ubuntu 14.04 LTS based system. Unfortunately, this package installs an outdated version of Serverspec. The next point is that if you try to install the newest version of Serverspec with gem (that's the way that it is described on the Serverspec homepage), you will get the following error message:&lt;/p></description></item><item><title>Installation Cheat Sheet For LivingDoc</title><link>https://blog.sandra-parsick.de/2016/03/08/installation-cheat-sheet-for-livingdoc/</link><pubDate>Tue, 08 Mar 2016 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2016/03/08/installation-cheat-sheet-for-livingdoc/</guid><description>
&lt;p>&lt;em>Guest Contribution by Markus Jenderek&lt;/em>&lt;/p>
&lt;p>We wanted to evaluate the new Confluence plugin LivingDoc as a replacement to Fitnesse in order to execute automated web GUI tests.&lt;/p>
&lt;ul>
&lt;li>Confluence 5.7.1 (Non-Cloud version)&lt;/li>
&lt;li>Inside Confluence HSQL In-Memory DB for evaluation purpose&lt;/li>
&lt;li>LivingDoc plugin 1.0.0.jar&lt;/li>
&lt;li>Selenium Webdriver for automated Web Testing of&lt;/li>
&lt;li>Spring Petclinic running inside a Tomcat 8&lt;/li>
&lt;li>Java Version SDK 1.7.0.80&lt;/li>
&lt;li>Maven 3.3.1&lt;/li>
&lt;/ul>
&lt;p>The following steps are an extension to the LivingDoc documentation. This documentation is very detailed, but if you struggle around some steps, check the following out. We recommend to use the search function of your browser to find the relevant parts. Additional this is not about Best Practices, but only about getting the setup running fast. Let´s start:&lt;/p></description></item><item><title>My Notes From Conference "Herbstcampus 2015"</title><link>https://blog.sandra-parsick.de/2015/11/22/my-notes-from-conference-herbstcampus-2015/</link><pubDate>Sun, 22 Nov 2015 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2015/11/22/my-notes-from-conference-herbstcampus-2015/</guid><description>
&lt;p>In September I visited the conference &amp;quot;Herbstcampus&amp;quot; in Nuremberg. I took notes about some sessions, that I like to share with you. The notes are in German.&lt;/p>
&lt;h3 id="solides-design---kriterien-für-objektorientiertes-design-by-david-tanzer">SOLIDes Design - Kriterien für objektorientiertes Design by David Tanzer&lt;/h3>
&lt;p>&lt;figure>
&lt;picture>
&lt;img
loading="lazy"
decoding="async"
alt="Solides Design"
class="image_figure image_internal image_unprocessed"
src="https://blog.sandra-parsick.de/solides-design.png"
/>
&lt;/picture>
&lt;/figure>
&lt;/p>
&lt;h3 id="wie-gehts-was-geht-wann-hat-es-sinn---portierung-von-cobol-programmen-nach-java-by-carsten-siedentop">Wie geht's? Was geht? Wann hat es Sinn? - Portierung von COBOL-Programmen nach Java by Carsten Siedentop&lt;/h3>
&lt;p>&lt;figure>
&lt;picture>
&lt;img
loading="lazy"
decoding="async"
alt="Cobol"
class="image_figure image_internal image_unprocessed"
src="https://blog.sandra-parsick.de/cobol.png?w=300"
/>
&lt;/picture>
&lt;/figure>
&lt;/p>
&lt;h3 id="überzogen---technische-schulden-by-gerrit-beine">Überzogen - Technische Schulden by Gerrit Beine&lt;/h3>
&lt;p>&lt;figure>
&lt;picture>
&lt;img
loading="lazy"
decoding="async"
alt="Technische Schulden"
class="image_figure image_internal image_unprocessed"
src="https://blog.sandra-parsick.de/technische-schulden.png?w=300"
/>
&lt;/picture>
&lt;/figure>
&lt;/p></description></item><item><title>How To Debug Groovy Script From Shell</title><link>https://blog.sandra-parsick.de/2015/11/02/how-to-debug-groovy-script-from-shell/</link><pubDate>Mon, 02 Nov 2015 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2015/11/02/how-to-debug-groovy-script-from-shell/</guid><description>
&lt;p>Groovy is a scripting language, so it is possible to run Groovy code without compiling to Java byte code. The necessary condition is that Groovy is installed on your machine. Then, running a Groovy script in a shell looks like the following line.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">groovy TestScript.groovy
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now, something is wrong with the script, only on a special environment. So you want to debug your Groovy script from the shell. Fortunately, it works for Groovy just like for Java. You only have to export the Java options for debugging.&lt;/p></description></item><item><title>Git Resources for Beginner</title><link>https://blog.sandra-parsick.de/2015/10/19/git-resources-for-beginner/</link><pubDate>Mon, 19 Oct 2015 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2015/10/19/git-resources-for-beginner/</guid><description>
&lt;p>In this post I'd like to share resources that help me learning and understanding Git.&lt;/p>
&lt;h1 id="links">Links&lt;/h1>
&lt;ul>
&lt;li>&lt;a href="https://www.atlassian.com/git/">&amp;quot;Getting Git Right&amp;quot; tutorials&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://ndpsoftware.com/git-cheatsheet.html">Interactive Git Cheatsheet&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://gitready.com/">git ready&lt;/a> Collection of tips based on use cases.&lt;/li>
&lt;li>&lt;a href="https://jaxenter.de/git-ist-einfach-wenn-man-weis-wie-1638">Article &amp;quot;Git ist einfach – wenn man weiß, wie&amp;quot; (in German)&lt;/a> This article describes how the data model of Git works. Understanding the data model helps me a lot with the handling with Git.&lt;/li>
&lt;/ul>
&lt;p>Do you have some more resources that you can recommend? Let me know it and write a comment.&lt;/p></description></item><item><title>(Not only) Internet Sources About Writing Software Documentation</title><link>https://blog.sandra-parsick.de/2015/10/05/not-only-internet-sources-about-writing-software-documentation/</link><pubDate>Mon, 05 Oct 2015 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2015/10/05/not-only-internet-sources-about-writing-software-documentation/</guid><description>
&lt;p>&lt;em>Last update: 2019-11-04&lt;/em>&lt;/p>
&lt;p>I was asked some time ago, which sources I used in order to inform me about writing software documentation. This motivates me to collect all sources, that helps me, in this blog post. Most of the sources are in German.&lt;/p>
&lt;h2 id="links">Links&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="http://arc42.org/">Arc42 Homepage:&lt;/a> This site is about the Arc42 template. This template gives you a good framework for your own software documentation. The template is available in English and German. A Spanish version is working in progress.&lt;/li>
&lt;li>&lt;a href="https://www.dokchess.de/en/">DokChess:&lt;/a> Example for how to write software documentation based on the Arc42 template. This example is used in the book &amp;quot;Softwarearchitekturen dokumentieren und kommunizieren&amp;quot;. The documentation itself describes a chess engine.&lt;/li>
&lt;li>&lt;a href="https://www.embarc.de/arc42-starschnitt-gradle">Arc42 Starschnitt (in German):&lt;/a> Again, an example for how to write software documentation based on the Arc42 template. The documentation describes the build tool Gradle. The difference to Dokchess is that this example explains the motivation and goals behind the single chapter of the Arc42 template.&lt;/li>
&lt;li>&lt;a href="http://www.swadok.de/auflage_1/weitere_informationen/kolumne_java_magazin/index.html">Kolumne &amp;quot;Architekturen dokumentieren&amp;quot; (in German)&lt;/a>: Newspaper column about architecture documentation from German Java Magazine.&lt;/li>
&lt;li>&lt;a href="https://www.embarc.de/portfolio/cheatsheet1-architecture-overview/">Architecture Cheat Sheet&lt;/a>: Cheat Sheet for writing an overview about your software architecture.&lt;/li>
&lt;li>&lt;a href="http://www.agilemodeling.com/">Agile Modeling:&lt;/a> Collection of best practices for effective modeling and documentation in an agile context.&lt;/li>
&lt;/ul>
&lt;h2 id="books">Books&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="http://www.hanser-fachbuch.de/buch/Effektive&amp;#43;Softwarearchitekturen/9783446443617?et_cid=39&amp;amp;et_lid=76">Effektive Softwarearchitekturen (German) by Gernot Starke&lt;/a>: This book is a good introduction to software architecture. One chapter is about writing software documentation based on Arc42 template.&lt;/li>
&lt;li>&lt;a href="http://www.hanser-fachbuch.de/buch/Softwarearchitekturen&amp;#43;dokumentieren&amp;#43;und&amp;#43;kommunizieren/9783446443488">Softwarearchitekturen dokumentieren und kommunizieren (German) by Stefan Zörner:&lt;/a> This book is a good introduction to writing software documentation. It describes why and how we should write software documentation. It also gives a good introduction to tools and how a process for writing software documentation can look like.&lt;/li>
&lt;li>&lt;a href="https://leanpub.com/arc42starschnittgradle">Arc42 Starschnitt: Gradle (in German) by Stefan Zörner&lt;/a>: It's the blog serie &lt;a href="https://www.embarc.de/arc42-starschnitt-gradle">Arc42 Starschnitt&lt;/a> as e-book with a bonus chapter about alternatives to Arc42.&lt;/li>
&lt;/ul>
&lt;h2 id="videos">Videos&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://vimeo.com/18111588">42 für Softwarearchitekten (German)&lt;/a>: This W-JAX 09 talk by Gernot Starke introduces to the Arc42 template.&lt;/li>
&lt;/ul>
&lt;p>Do you have some more links, books or videos that you can recommend? Let me know it and write a comment.&lt;/p></description></item><item><title>Commons VFS, SSHJ and JSch in Comparison</title><link>https://blog.sandra-parsick.de/2015/07/30/commons-vfs-sshj-and-jsch-in-comparison/</link><pubDate>Thu, 30 Jul 2015 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2015/07/30/commons-vfs-sshj-and-jsch-in-comparison/</guid><description>
&lt;p>Some weeks ago I evaluated some SSH libraries for Java. The main requirements to them are file transferring and file operations on a remote machine. Therefore, it exists a network protocol based on SSH, SSH File Transfer Protocol (or SFTP). So I needed a SSH library that supports SFTP. A research shows that it exits many SSH libraries for Java. I reduce the number of libraries to three for the comparison. I choose JSch, SSHJ and Apache's Commons VFS for a deeper look. All of them support SFTP. JSch seems to be the de-facto standard for Java. SSHJ is a newer library. Its goal is to have a clear Java API for SSH. The goal of Commons VFS is to have a clear API for virtual file systems and SFTP is one of the supported protocol. Under the hood it uses JSch for the SFTP protocol. The libraries should cover following requirements:&lt;/p></description></item><item><title>Unit And Integration Test Reports For Maven Projects In SonarQube 4.5.1</title><link>https://blog.sandra-parsick.de/2015/01/30/unit-and-integration-test-reports-for-maven-projects-in-sonarqube/</link><pubDate>Fri, 30 Jan 2015 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2015/01/30/unit-and-integration-test-reports-for-maven-projects-in-sonarqube/</guid><description>
&lt;p>Since SonarQube 4.2. the test report isn't generated by the Sonar Maven Plugin during a Maven build (see &lt;a href="http://www.sonarqube.org/unit-test-execution-in-sonarqube/">SonarQube's blog post&lt;/a>) . Therefore, the test report has to be generated by another plugin before Sonar Maven Plugin collects the information for the SonarQube server. Here, Jacoco Maven Plugin can help. It has the possibility to generate test report that are understandable for SonarQube. Jacoco Maven Plugin goes one step further, it has the possibility to generate a test report for integration test.&lt;/p></description></item><item><title>Vagrant Home and Vagrant Dot File On NTFS Partition Mounted In A Linux System</title><link>https://blog.sandra-parsick.de/2014/11/18/vagrant-home-and-vagrant-dot-file-on-ntfs-partition-mounted-in-a-linux-system/</link><pubDate>Tue, 18 Nov 2014 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2014/11/18/vagrant-home-and-vagrant-dot-file-on-ntfs-partition-mounted-in-a-linux-system/</guid><description>
&lt;p>I use Vagrant together with VirtualBox  on an Ubuntu based Linux system.  Because my internal SSD drive isn't so large, I outsource the location of VirtualBox's VMs to an external HDD drive with a NTFS partition. Additionally, I set Vagrant's environment variables &lt;code>VAGRANT_DOTFILE_PATH&lt;/code> and &lt;code>VAGRANT_HOME&lt;/code> so, that the directories &lt;code>.vagrant&lt;/code> and &lt;code>.vagrant.d&lt;/code> are also on the external HDD drive. External HDD drive with NTFS partition are auto-mounted with the following mount options on an Ubuntu based Linux system.&lt;/p></description></item><item><title>Salt SSH Installation on Centos 5.5</title><link>https://blog.sandra-parsick.de/2014/11/01/salt-ssh-installation-on-centos-5-5/</link><pubDate>Sat, 01 Nov 2014 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2014/11/01/salt-ssh-installation-on-centos-5-5/</guid><description>
&lt;p>Salt has the option to manage servers agentlessly.  Agentless means that the targets don't need a agent process. The master orchestrates the target system over SSH. Therefor it exists an own command called _salt-shh. _ The following sections explain how to install Salt SSH on a CentOs 5.5 and how to configure minimally a master and its targets for a test connection. The how to is tested with Salt version 2014.1.11.&lt;/p></description></item><item><title>Salt Installation On Centos 5.5</title><link>https://blog.sandra-parsick.de/2014/10/18/salt-installation-on-centos-5-5/</link><pubDate>Sat, 18 Oct 2014 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2014/10/18/salt-installation-on-centos-5-5/</guid><description>
&lt;p>When you follow the instruction step in the &lt;a href="http://docs.saltstack.com/en/latest/topics/installation/rhel.html#installation-from-epel" title="Salt Installation Guide for Centos">installation guide&lt;/a> for Centos 5.5, the package manager automatically installs ZeroMQ in version 2.2. This ZeroMQ version &lt;a href="http://docs.saltstack.com/en/latest/topics/troubleshooting/#salt-master-stops-responding" title="Salt Troubleshooting for ZeroMQ">makes some troubles&lt;/a>. Therefore, Salt recommends using ZeroMQ in version &amp;gt;= 3.2. There is no ZeroMQ package for this version available in the official Centos 5 repositories, neither in EPEL. So the community prepares some RPMs for Centos 5 for installing ZeroMQ in version 3.3.2.2. This post describes which steps has to be done to install Salt 2014.1.11 on a Centos 5.5 64bit.&lt;/p></description></item><item><title>Configuration over JNDI in Spring Framework</title><link>https://blog.sandra-parsick.de/2014/10/04/configuration-over-jndi-in-spring-framework/</link><pubDate>Sat, 04 Oct 2014 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2014/10/04/configuration-over-jndi-in-spring-framework/</guid><description>
&lt;p>From a certain point on, an application has to be configurable.  Spring Framework has a nice auxiliary tool for this issue since the first version 0.9 , the class &lt;a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html" title="JavaDoc PropertyPlaceholderConfigurer">&lt;code>PropertyPlaceholderConfigurer&lt;/code>&lt;/a> and since Spring Framework 3.1 the class &lt;a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.html" title="JavaDoc PropertySourcesPlaceholderConfigurer">&lt;code>PropertySourcesPlaceholderConfigurer.&lt;/code>&lt;/a> When you start a Google search for &lt;code>PropertyPlaceholderConfigurer,&lt;/code> you will find many examples where the configuration items are saved in properties files. But in many Java enterprise applications, it is common that the configuration items are loaded over &lt;a href="http://www.oracle.com/technetwork/java/index-jsp-137536.html" title="Oracle&amp;#39;s Official Homepage about JNDI">JNDI&lt;/a> look ups. I'd like to demonstrate how the &lt;code>PropertyPlaceholderConfigurer&lt;/code> (before Spring Framework 3.1) and accordingly &lt;code>PropertySourcesPlaceholderConfigurer&lt;/code> (since Spring Framework 3.1) can help to ease the configuration over JNDI look ups in our application.&lt;/p></description></item><item><title>QA Milestones since the Foundation of an eHealth Framework</title><link>https://blog.sandra-parsick.de/2014/03/26/qa-milestones-since-the-foundation-of-an-ehealth-framework/</link><pubDate>Wed, 26 Mar 2014 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2014/03/26/qa-milestones-since-the-foundation-of-an-ehealth-framework/</guid><description>
&lt;p>&lt;em>Guest Contribution by Markus Jenderek&lt;/em>&lt;/p>
&lt;p>&lt;em>&amp;quot;Quality exists when the price is long forgotten&amp;quot;,  said Mr Royce to Mr Rolls with his petrol smeared face or Mr Rolls to Mr Royce - but anyway.&lt;/em> &lt;em>The question is about &lt;strong>which&lt;/strong> price is he talking about?&lt;/em> &lt;em>Money, yes of course! But what about Pain, Features, Competition, Time, Returns, No-Family, Consumer Satisfaction, Feelgood Management, Lifecycle.... - I think you get the point.&lt;/em> &lt;em>The reason for the pain i feel right now is that it happens again to me for the third time to move my contribution for the Developer Network of ICW to another webspace.&lt;/em> &lt;em>So i was quite surprized and more important i´m very thankful to the offer of SKM (Big Hugs!) to be finally part of this enviroment full of motivation, positive energy and knowledge in order to link the following stuff for eternity to my Xing account.&lt;/em>&lt;/p></description></item><item><title>Migration Path for Jenkins Subversion Plugin from Version 1.53 to 2.2</title><link>https://blog.sandra-parsick.de/2014/03/21/migration-path-for-jenkins-subversion-plugin-from-version-1-53-to-2-2/</link><pubDate>Fri, 21 Mar 2014 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2014/03/21/migration-path-for-jenkins-subversion-plugin-from-version-1-53-to-2-2/</guid><description>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Jenkins Subversion Plugin changes its credential management. Before version 2.2 you had to set your Subversion credential globally depend on domain name. In version 2.2 it's changed. The credential management is still central but now you have to configure in every job which credential the job has to use for Subversion authentication . If you have many jobs, you don't want to touch every job to change the Subversion configuration. A Groovy script for Jenkins Script Console [1] can help. In the next section I will describe how the migration path looks like.&lt;/p></description></item><item><title>Groovy Script for Jenkins Script Console to Add or Modify Discard Old Builds Setting</title><link>https://blog.sandra-parsick.de/2014/02/16/groovy-script-for-jenkins-script-console-to-add-or-modify-discard-old-builds-setting/</link><pubDate>Sun, 16 Feb 2014 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2014/02/16/groovy-script-for-jenkins-script-console-to-add-or-modify-discard-old-builds-setting/</guid><description>
&lt;p>When your Jenkins server runs on for a while, your hard disk usage grows up because the default setting of each job is that every job build and build artifact obtained from this are stored in a build history.  Limiting this build history can save hard disk usage. Each job has a setting option called &lt;code>Discard Old Builds&lt;/code>. In this setting you can set how long (in days) old builds keep in the build history (criteria 1) or how many old builds keep at most in the build history (criteria 2). Jenkins matches first criteria 1 and then criteria 2. Beyond that there exists advanced setting options. This advanced setting options can configured how long and how many builds with build artifacts have to keep in the build history. After that Jenkins deletes the build artifact, but the logs, history, reports, etc for the build will be kept. These will be kept so as long as they match the criteria in the normal setting options. When you have many jobs, you don't want to configure every job manually. For that you can modify the &lt;code>Discard Old Builds&lt;/code> setting in each job over a Groovy script at one go. Jenkins has a so-called &lt;em>Script Console&lt;/em> [1].  In this console you have to put the following Groovy script and every job is modified to discard its old builds.&lt;/p></description></item><item><title>Groovy Script for Jenkins Script Console to Add or Replace Subversion Repository Browser</title><link>https://blog.sandra-parsick.de/2013/10/15/groovy-script-for-jenkins-script-console-to-add-or-replace-subversion-repository-browser/</link><pubDate>Tue, 15 Oct 2013 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2013/10/15/groovy-script-for-jenkins-script-console-to-add-or-replace-subversion-repository-browser/</guid><description>
&lt;p>In my &lt;a href="https://blog.sandra-parsick.de/2013/09/01/groovy-script-for-jenkins-script-console-to-rename-the-subversion-host-name/" title="Groovy Script for Jenkins Script Console to Rename the Subversion Host Name">last post&lt;/a> I showed how to rename the host name for Subversion in all jobs with one script. In this post I will show you how to set the repository browser in all jobs with one script. This script is based on the script from my &lt;a href="https://blog.sandra-parsick.de/2013/09/01/groovy-script-for-jenkins-script-console-to-rename-the-subversion-host-name/" title="Groovy Script for Jenkins Script Console to Rename the Subversion Host Name">last post&lt;/a>.&lt;/p></description></item><item><title>Groovy Script for Jenkins Script Console to Rename the Subversion Host Name</title><link>https://blog.sandra-parsick.de/2013/09/01/groovy-script-for-jenkins-script-console-to-rename-the-subversion-host-name/</link><pubDate>Sun, 01 Sep 2013 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2013/09/01/groovy-script-for-jenkins-script-console-to-rename-the-subversion-host-name/</guid><description>
&lt;p>The host name of a Subversion instance is renamed and now many Jenkins jobs have to be adjusted. One possibility is to change every job by hand. But this approach is very time-consuming and error-prone. A better possibility is to have a script based approach, that rename the Subversion host name of all jobs in one go. Jenkins has a feature, that helps us thereby. Jenkins has a script console to run Groovy script on Jenkins server [1]. Below you can see a Groovy script  that renames the Subversion host name in all jobs.&lt;/p></description></item><item><title>Generate P2 Repository From Maven Artifacts In 2017</title><link>https://blog.sandra-parsick.de/2013/07/04/generate-p2-repository-from-maven-dependencies/</link><pubDate>Thu, 04 Jul 2013 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2013/07/04/generate-p2-repository-from-maven-dependencies/</guid><description>
&lt;p>&lt;em>A new version of this blog post is published under the title &amp;quot;&lt;a href="http://blog.sandra-parsick.de/2017/09/22/generate-p2-repository-from-maven-artifacts-in-2017/">Generate P2 Repository From Maven Artifacts in 2017&lt;/a>&amp;quot;&lt;/em>&lt;/p>
&lt;h3 id="motivation">Motivation&lt;/h3>
&lt;p>If you use Maven Tycho to build your Eclipse RCP application, you can use Maven dependencies as you know it from Maven (for more information see [1]). I notice that Tycho takes many times for computing the target platform from the Maven dependencies during the build. I expect a speed up of build time if I use a P2 repository instead of Maven dependencies directly. Therefore, the task is how do I get the Maven dependencies to a P2 repository.&lt;/p></description></item><item><title>Spring Web Application With Hessian Services As a Maven Project</title><link>https://blog.sandra-parsick.de/2012/11/12/spring-web-application-with-hessian-services-as-a-maven-project/</link><pubDate>Mon, 12 Nov 2012 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2012/11/12/spring-web-application-with-hessian-services-as-a-maven-project/</guid><description>
&lt;p>This post describes how to set up a Maven project for a Spring web application with Hessian Service. It also shows how to set up the deployment for exposing the Hessian service and how to set up a client to consume the Hessian service. The Spring Framework version is 3.1.1.RELEASE and the Hessian version is 4.0.7.&lt;/p>
&lt;h3 id="maven-set-up-for-server">Maven Set Up For Server&lt;/h3>
&lt;p>Our Maven project has three modules&lt;/p>
&lt;ul>
&lt;li>hello-world-api&lt;/li>
&lt;li>hello-world-impl&lt;/li>
&lt;li>hello-word-war&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-xml" data-lang="xml">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="nt">&amp;lt;modules&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;module&amp;gt;&lt;/span>hello-world-api&lt;span class="nt">&amp;lt;/module&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;module&amp;gt;&lt;/span>hello-world-impl&lt;span class="nt">&amp;lt;/module&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl"> &lt;span class="nt">&amp;lt;module&amp;gt;&lt;/span>hello-world-war&lt;span class="nt">&amp;lt;/module&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">5&lt;/span>&lt;span class="cl">&lt;span class="nt">&amp;lt;/modules&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The module &lt;code>hello-world-api&lt;/code> contains the interfaces of the services that Hessian server and Hessian client need for the communication. The module &lt;code>hello-world-impl&lt;/code> contains the implementation of the services that are deployed on the server side. The module &lt;code>hello-world-war&lt;/code> contains the configuration for the servlet container and the configuration which services should be exported as a  Hessian service.&lt;/p></description></item><item><title>Cygwin Embedded In Console2 Under Windows 7</title><link>https://blog.sandra-parsick.de/2012/11/11/cygwin-embedded-in-console2-under-windows-7/</link><pubDate>Sun, 11 Nov 2012 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2012/11/11/cygwin-embedded-in-console2-under-windows-7/</guid><description>
&lt;p>I like to use &lt;a href="http://www.cygwin.com/">Cygwin&lt;/a> for having a bash shell on a windows machine. In combination with &lt;a href="http://sourceforge.net/projects/console/">Console2&lt;/a> you have a powerful command-line tool for windows. I'd like to describe how to install Cygwin and Console2 under windows 7 (I think this instruction works on Windows XP, too) and how to embed Cygwin in Console2. I used for Cygwin version 1.7.17-1 32bit and for Console2 version 2.00b148-Beta_32bit.&lt;/p>
&lt;h3 id="cygwin-installation">Cygwin Installation&lt;/h3>
&lt;ol>
&lt;li>Download &lt;a href="http://cygwin.com/setup.exe">setup.exe.&lt;/a>&lt;/li>
&lt;li>Double click on setup.exe starts the installation.&lt;/li>
&lt;li>Follow the set up instruction. As installation location I use &lt;code>c:\cygwin.&lt;/code>&lt;/li>
&lt;li>Go to &lt;code>c:\cygwin&lt;/code> and run &lt;code>Cygwin.bat&lt;/code> for setting up Cygwin user home etc.&lt;/li>
&lt;/ol>
&lt;h3 id="console2-installation">Console2 Installation&lt;/h3>
&lt;ol>
&lt;li>Download &lt;a href="http://sourceforge.net/projects/console/files/console-devel/2.00/Console-2.00b148-Beta_32bit.zip/download">zip file.&lt;/a>&lt;/li>
&lt;li>Unzip it into installation location.&lt;/li>
&lt;li>Start Console2 with a double click on &lt;code>Console2.exe.&lt;/code>&lt;/li>
&lt;/ol>
&lt;h3 id="how-to-embed-cygwin-in-console2">How to embed Cygwin in Console2&lt;/h3>
&lt;ol>
&lt;li>Open Console2.&lt;/li>
&lt;li>Go to &lt;code>Edit -&amp;gt; Settings.&lt;/code>&lt;/li>
&lt;li>Go to  &lt;code>Tab&lt;/code>&lt;/li>
&lt;li>In field &lt;code>title&lt;/code> insert for example &lt;code>bash&lt;/code>. It is the name of the first tab in Console2.&lt;/li>
&lt;li>In field &lt;code>Shell&lt;/code> you have to insert &lt;code>C:\cygwin\bin\bash.exe --login -i&lt;/code> (Don't forget &lt;code>c:\cygwin&lt;/code> is your installation folder).&lt;/li>
&lt;li>In field &lt;code>Startup dir&lt;/code> you can insert &lt;code>C:\cygwin\home\user.name.&lt;/code> This folder is used at every Console2 start.&lt;/li>
&lt;/ol>
&lt;h3 id="links">Links&lt;/h3>
&lt;ol>
&lt;li>&lt;a href="http://www.cygwin.com/">Cygwin Homepage&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://sourceforge.net/projects/console/">Console2 Homepage&lt;/a>&lt;/li>
&lt;li>&lt;a href="http://en.wikipedia.org/wiki/Cygwin">Good short feature overview of Cygwin on the Wikipedia page&lt;/a>&lt;/li>
&lt;/ol></description></item><item><title>Launching Several Pax Runner Daemons With The Same User</title><link>https://blog.sandra-parsick.de/2012/08/16/launching-several-pax-runner-daemons-with-the-same-user/</link><pubDate>Thu, 16 Aug 2012 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2012/08/16/launching-several-pax-runner-daemons-with-the-same-user/</guid><description>
&lt;p>I use &lt;a href="http://team.ops4j.org/wiki/display/paxrunner/Pax&amp;#43;Runner" title="Homepage PAX Runner">Pax Runner&lt;/a> to provisioning my OSGi applications. I want to use several OSGi applications on my test server. As soon as you start the second OSGi application provisioned by Pax Runner, you get the following exception:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">Exception in thread &lt;span class="s2">&amp;#34;main&amp;#34;&lt;/span> java.lang.RuntimeException: org.ops4j.pax.runner.daemon.lock exists. Please make sure that the Pax Runner daemon is not already running.
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>As per Google search it is a &lt;a href="http://team.ops4j.org/browse/PAXRUNNER-416">bug&lt;/a> in Pax Runner. The source code of  Pax Runner is hosted by &lt;a href="https://github.com/ops4j/org.ops4j.pax.runner.git">Github&lt;/a>, so I create a &lt;a href="https://github.com/rhenus-fl/org.ops4j.pax.runner">fork&lt;/a> for fixing this issue. My first idea was to add a new runner option. Problem is that the method, which build the path for the daemon home directory, is static, so I have no chance to read the runner option without a big refactoring. I decided to add a new Java property &lt;code>relative.runner.home&lt;/code>., so I need to change only one method &lt;code>getRunnerHomeDir.&lt;/code> Now, the path of the daemon runner home directory is &lt;code>user.home/.pax/relative.runner.home&lt;/code>. If this property is not set, the default path will be  &lt;code>user.home/.pax/runner&lt;/code> (like the behaviour before this change). With this change, the start call of the Pax Runner looks like that:&lt;/p></description></item><item><title>Set up a Proxy P2 Repository with Nexus OOS</title><link>https://blog.sandra-parsick.de/2012/04/25/set-up-a-proxy-p2-repository-with-nexus-oos/</link><pubDate>Wed, 25 Apr 2012 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2012/04/25/set-up-a-proxy-p2-repository-with-nexus-oos/</guid><description>
&lt;h3 id="assumption">Assumption&lt;/h3>
&lt;p>I assume &lt;a href="http://www.sonatype.org/nexus/go">Nexus OOS in version 2.1.2&lt;/a> is installed. You can find a good tutorial in Sonatype's Nexus book &lt;em>Repository Management with Nexus&lt;/em> (&lt;a href="http://www.sonatype.com/books/nexus-book/reference/install.html">Chapter 3: Installing and Running Nexus&lt;/a>).&lt;/p>
&lt;h3 id="preparation">Preparation&lt;/h3>
&lt;p>For the set up of a proy P2 repository three Nexus plugins are needed:&lt;/p>
&lt;ul>
&lt;li>Nexus Capability Plugin (It is contained  in the basic Nexus installation)&lt;/li>
&lt;li>Nexus P2 Bridge Plugin 2.0.5 (&lt;a href="https://repository.sonatype.org/index.html#nexus-search;quick~nexus-p2-bridge-plugin">Download&lt;/a>)&lt;/li>
&lt;li>Nexus P2 Repository Plugin 2.2  (&lt;a href="https://repository.sonatype.org/index.html#nexus-search;quick~nexus-p2-repository-plugin">Download&lt;/a>)&lt;/li>
&lt;/ul>
&lt;p>It is important that you download the artifacts ending with &lt;code>-bundle.zip&lt;/code>. Unzip both plugins in the directory &lt;code>$NEXUS_HOME/../sonatype-work/nexus/plugin-repository&lt;/code> of your Nexus instance. Restart your Nexus instance. Then follow the &lt;a href="http://www.sonatype.com/books/nexus-book/reference/_proxy_p2_repositories.html">instruction&lt;/a> for creating a proxy P2 repository in the Sonatype Nexus book.&lt;/p></description></item><item><title>Read Classpath Resource from Jar Files with Spring</title><link>https://blog.sandra-parsick.de/2012/02/29/read-classpath-resource-from-jar-files-with-spring/</link><pubDate>Wed, 29 Feb 2012 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2012/02/29/read-classpath-resource-from-jar-files-with-spring/</guid><description>
&lt;p>To read resources from classpath, you can use the Spring class &lt;a href="http://static.springsource.org/spring/docs/3.0.6.RELEASE/javadoc-api/org/springframework/core/io/ClassPathResource.html" title="JavaDoc Spring Framework ClassPathResource">ClassPathResource&lt;/a>. The constructor with one argument reads only resources from file system.  But sometimes you want to read a resources from a jar file in the classpath.  For this case, you must build an own &lt;a href="http://docs.oracle.com/javase/7/docs/api/java/net/URLClassLoader.html" title="JavaDoc Java 7 URLClassLoader">URLClassLoader&lt;/a> from the URL of the jar file and use the &lt;a href="http://static.springsource.org/spring/docs/3.0.6.RELEASE/javadoc-api/org/springframework/core/io/ClassPathResource.html" title="JavaDoc Spring Framework ClassPathResource">ClassPathResource&lt;/a> constructor with the arguments &lt;code>path&lt;/code> and &lt;code>classLoader&lt;/code>.  The &lt;code>path&lt;/code> value is the path of the resource in the jar file.&lt;/p></description></item><item><title>Automated Build of RCP Artifacts with Maven Tycho - A field report (Part 2)</title><link>https://blog.sandra-parsick.de/2012/02/24/second-part-of-maven-tycho-field-report/</link><pubDate>Fri, 24 Feb 2012 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2012/02/24/second-part-of-maven-tycho-field-report/</guid><description>
&lt;p>In my last post of this series, I described how to solve the dependency problem. In this post, I will describe how to build Eclipse Plugin and Eclipse Feature with Maven Tycho and which problems I have.&lt;/p>
&lt;h3 id="pom-definition">POM Definition&lt;/h3>
&lt;p>The procedure for both Eclipse artifacts is similar. In both, you have to insert a &lt;code>pom.xml&lt;/code> and fill it with the Maven coordinate (group id, artifact id and version) and the packaging type. But there exists some rules about the content.&lt;/p></description></item><item><title>Automated Build of RCP Artifacts with Maven Tycho - A field report (Part 1)</title><link>https://blog.sandra-parsick.de/2012/01/16/maven-tycho-a-field-report/</link><pubDate>Mon, 16 Jan 2012 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2012/01/16/maven-tycho-a-field-report/</guid><description>
&lt;p>This post series should not be a tutorial for Maven Tycho. You can find many tutorials on the web (see for example [2] and [3]). This post series should be a field report about the problems during the introduction of Maven Tycho.&lt;/p>
&lt;h3 id="why-maven-tycho">Why Maven Tycho?&lt;/h3>
&lt;p>One requirement is that we can use Maven artifacts. So it seems obvious to search after a solution based on Maven. After a search on the web, two Maven plugins are noticed:&lt;/p></description></item><item><title>Release Preparing of a Maven Project</title><link>https://blog.sandra-parsick.de/2011/12/08/release-preparing-of-a-maven-project/</link><pubDate>Thu, 08 Dec 2011 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2011/12/08/release-preparing-of-a-maven-project/</guid><description>
&lt;p>This post describes how to prepare a release for Maven project with a set of Maven Plugins.&lt;/p>
&lt;h3 id="background">Background&lt;/h3>
&lt;p>The release preparation phase is built of following common steps:&lt;/p>
&lt;ol>
&lt;li>Build the artifact to verify that the build is successful.&lt;/li>
&lt;li>Run the unit tests of the artifact.&lt;/li>
&lt;li>Update the version of the artifact to the release version.&lt;/li>
&lt;li>Commit the artifact to the SCM.&lt;/li>
&lt;li>Create a tag of the artifact.&lt;/li>
&lt;li>Update the version of the artifact to the next development version.&lt;/li>
&lt;li>Commit the artifact to the SCM.&lt;/li>
&lt;/ol>
&lt;p>These common steps must be extended when the artifact has snapshot dependencies. The snapshot dependencies  appears in following types:&lt;/p></description></item><item><title>Calling org.hsqldb.Server.main with the argument "--props" throws an org.hsqldb.HsqlException</title><link>https://blog.sandra-parsick.de/2011/10/18/calling-org-hsqldb-server-main-with-the-argument-props-throws-an-org-hsqldb-hsqlexception/</link><pubDate>Tue, 18 Oct 2011 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2011/10/18/calling-org-hsqldb-server-main-with-the-argument-props-throws-an-org-hsqldb-hsqlexception/</guid><description>
&lt;p>Whensoever, you call, for example,  &lt;code>java -cp ../lib/hsqldb.jar org.hsqldb.Server --props ../bin/config/server.properties&lt;/code> following exception is thrown:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="o">[&lt;/span>Server@e0e1c6&lt;span class="o">]&lt;/span>: &lt;span class="o">[&lt;/span>Thread&lt;span class="o">[&lt;/span>main,5,main&lt;span class="o">]]&lt;/span>: checkRunning&lt;span class="o">(&lt;/span>&lt;span class="nb">false&lt;/span>&lt;span class="o">)&lt;/span> entered
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl">&lt;span class="o">[&lt;/span>Server@e0e1c6&lt;span class="o">]&lt;/span>: &lt;span class="o">[&lt;/span>Thread&lt;span class="o">[&lt;/span>main,5,main&lt;span class="o">]]&lt;/span>: checkRunning&lt;span class="o">(&lt;/span>&lt;span class="nb">false&lt;/span>&lt;span class="o">)&lt;/span> exited
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl">&lt;span class="o">[&lt;/span>Server@e0e1c6&lt;span class="o">]&lt;/span>: &lt;span class="o">[&lt;/span>Thread&lt;span class="o">[&lt;/span>main,5,main&lt;span class="o">]]&lt;/span>: Failed to &lt;span class="nb">set&lt;/span> properties
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl">org.hsqldb.HsqlException: no valid database paths: unsupported property: server.props
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">5&lt;/span>&lt;span class="cl">at org.hsqldb.error.Error.error&lt;span class="o">(&lt;/span>Unknown Source&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">6&lt;/span>&lt;span class="cl">at org.hsqldb.error.Error.error&lt;span class="o">(&lt;/span>Unknown Source&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">7&lt;/span>&lt;span class="cl">at org.hsqldb.server.Server.setProperties&lt;span class="o">(&lt;/span>Unknown Source&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">8&lt;/span>&lt;span class="cl">at org.hsqldb.server.Server.main&lt;span class="o">(&lt;/span>Unknown Source&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Debugging results in following: The main method finds the &lt;code>server.properties&lt;/code> file and it can read the properties in this file, too.  But then the main method merges the properties from the file with the properties from the arguments (local variable named &lt;code>argProps&lt;/code>).&lt;/p></description></item><item><title>SaxException During a Sucessful Maven Build in Jenkins</title><link>https://blog.sandra-parsick.de/2011/10/08/saxexception-during-a-sucessful-maven-build-in-jenkins/</link><pubDate>Sat, 08 Oct 2011 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2011/10/08/saxexception-during-a-sucessful-maven-build-in-jenkins/</guid><description>
&lt;p>During the inspection of  several  sucessful Maven 3 build output, following &lt;code>SaxException&lt;/code> catchs my eye:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-shell" data-lang="shell">&lt;span class="line">&lt;span class="ln"> 1&lt;/span>&lt;span class="cl">&lt;span class="o">[&lt;/span>INFO&lt;span class="o">]&lt;/span> Parsing file:/home/skosmalla/.m2/repository/repository.xml
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 2&lt;/span>&lt;span class="cl">&lt;span class="o">[&lt;/span>Fatal Error&lt;span class="o">]&lt;/span> repository.xml:3:1: Premature end of file.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 3&lt;/span>&lt;span class="cl">org.xml.sax.SAXParseException: Premature end of file.
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 4&lt;/span>&lt;span class="cl">at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse&lt;span class="o">(&lt;/span>DOMParser.java:249&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 5&lt;/span>&lt;span class="cl">at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse&lt;span class="o">(&lt;/span>DocumentBuilderImpl.java:284&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 6&lt;/span>&lt;span class="cl">at javax.xml.parsers.DocumentBuilder.parse&lt;span class="o">(&lt;/span>DocumentBuilder.java:208&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 7&lt;/span>&lt;span class="cl">at org.apache.felix.obrplugin.ObrUpdate.parseFile&lt;span class="o">(&lt;/span>ObrUpdate.java:347&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 8&lt;/span>&lt;span class="cl">at org.apache.felix.obrplugin.ObrUpdate.parseRepositoryXml&lt;span class="o">(&lt;/span>ObrUpdate.java:324&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln"> 9&lt;/span>&lt;span class="cl">at org.apache.felix.obrplugin.ObrInstall.execute&lt;span class="o">(&lt;/span>ObrInstall.java:140&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">10&lt;/span>&lt;span class="cl">at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo&lt;span class="o">(&lt;/span>DefaultBuildPluginManager.java:101&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">11&lt;/span>&lt;span class="cl">at org.apache.maven.lifecycle.internal.MojoExecutor.execute&lt;span class="o">(&lt;/span>MojoExecutor.java:209&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">12&lt;/span>&lt;span class="cl">at org.apache.maven.lifecycle.internal.MojoExecutor.execute&lt;span class="o">(&lt;/span>MojoExecutor.java:153&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">13&lt;/span>&lt;span class="cl">at org.apache.maven.lifecycle.internal.MojoExecutor.execute&lt;span class="o">(&lt;/span>MojoExecutor.java:145&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">14&lt;/span>&lt;span class="cl">at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject&lt;span class="o">(&lt;/span>LifecycleModuleBuilder.java:84&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">15&lt;/span>&lt;span class="cl">at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject&lt;span class="o">(&lt;/span>LifecycleModuleBuilder.java:59&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">16&lt;/span>&lt;span class="cl">at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild&lt;span class="o">(&lt;/span>LifecycleStarter.java:183&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">17&lt;/span>&lt;span class="cl">at org.apache.maven.lifecycle.internal.LifecycleStarter.execute&lt;span class="o">(&lt;/span>LifecycleStarter.java:161&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">18&lt;/span>&lt;span class="cl">at org.apache.maven.DefaultMaven.doExecute&lt;span class="o">(&lt;/span>DefaultMaven.java:319&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">19&lt;/span>&lt;span class="cl">at org.apache.maven.DefaultMaven.execute&lt;span class="o">(&lt;/span>DefaultMaven.java:156&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">20&lt;/span>&lt;span class="cl">at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main&lt;span class="o">(&lt;/span>Maven3Launcher.java:79&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">21&lt;/span>&lt;span class="cl">at sun.reflect.NativeMethodAccessorImpl.invoke0&lt;span class="o">(&lt;/span>Native Method&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">22&lt;/span>&lt;span class="cl">at sun.reflect.NativeMethodAccessorImpl.invoke&lt;span class="o">(&lt;/span>NativeMethodAccessorImpl.java:39&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">23&lt;/span>&lt;span class="cl">at sun.reflect.DelegatingMethodAccessorImpl.invoke&lt;span class="o">(&lt;/span>DelegatingMethodAccessorImpl.java:25&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">24&lt;/span>&lt;span class="cl">at java.lang.reflect.Method.invoke&lt;span class="o">(&lt;/span>Method.java:597&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">25&lt;/span>&lt;span class="cl">at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard&lt;span class="o">(&lt;/span>Launcher.java:329&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">26&lt;/span>&lt;span class="cl">at org.codehaus.plexus.classworlds.launcher.Launcher.launch&lt;span class="o">(&lt;/span>Launcher.java:239&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">27&lt;/span>&lt;span class="cl">at org.jvnet.hudson.maven3.agent.Maven3Main.launch&lt;span class="o">(&lt;/span>Maven3Main.java:158&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">28&lt;/span>&lt;span class="cl">at hudson.maven.Maven3Builder.call&lt;span class="o">(&lt;/span>Maven3Builder.java:122&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">29&lt;/span>&lt;span class="cl">at hudson.maven.Maven3Builder.call&lt;span class="o">(&lt;/span>Maven3Builder.java:74&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">30&lt;/span>&lt;span class="cl">at hudson.remoting.UserRequest.perform&lt;span class="o">(&lt;/span>UserRequest.java:118&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">31&lt;/span>&lt;span class="cl">at hudson.remoting.UserRequest.perform&lt;span class="o">(&lt;/span>UserRequest.java:48&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">32&lt;/span>&lt;span class="cl">at hudson.remoting.Request&lt;span class="nv">$2&lt;/span>.run&lt;span class="o">(&lt;/span>Request.java:287&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">33&lt;/span>&lt;span class="cl">at java.util.concurrent.Executors&lt;span class="nv">$RunnableAdapter&lt;/span>.call&lt;span class="o">(&lt;/span>Executors.java:441&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">34&lt;/span>&lt;span class="cl">at java.util.concurrent.FutureTask&lt;span class="nv">$Sync&lt;/span>.innerRun&lt;span class="o">(&lt;/span>FutureTask.java:303&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">35&lt;/span>&lt;span class="cl">at java.util.concurrent.FutureTask.run&lt;span class="o">(&lt;/span>FutureTask.java:138&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">36&lt;/span>&lt;span class="cl">at java.util.concurrent.ThreadPoolExecutor&lt;span class="nv">$Worker&lt;/span>.runTask&lt;span class="o">(&lt;/span>ThreadPoolExecutor.java:886&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">37&lt;/span>&lt;span class="cl">at java.util.concurrent.ThreadPoolExecutor&lt;span class="nv">$Worker&lt;/span>.run&lt;span class="o">(&lt;/span>ThreadPoolExecutor.java:908&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">38&lt;/span>&lt;span class="cl">at java.lang.Thread.run&lt;span class="o">(&lt;/span>Thread.java:662&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>I didn't find a solution with google for this problem. But I found a hint that the &lt;code>repository.xml&lt;/code> is generated by Maven at the  end of  a build.  I noticed that only the Maven builds had this &lt;code>SaxException&lt;/code> that were built parallelly (Jenkins had two build processors)  and all Maven builds used the same M2 repository.  So I had the idea that the reason of this exception could be that two almost finished Maven build tried to generate the &lt;code>repository.xml&lt;/code>.  I actived in every job the option &lt;code>Use private Maven repository&lt;/code> and the &lt;code>SaxException&lt;/code> didn't turn up anymore.&lt;/p></description></item><item><title>Distinctive Feature of Running Nexus on Linux</title><link>https://blog.sandra-parsick.de/2011/09/29/distinctive-feature-of-running-nexus-on-linux/</link><pubDate>Thu, 29 Sep 2011 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2011/09/29/distinctive-feature-of-running-nexus-on-linux/</guid><description>
&lt;p>I installed Nexus on Linux according to the step-by-step instruction of Sonatype. Everything looked fine during the installation. To find out, whether the installation was successful, I tried to go to the welcome page of my nexus installation. I got an error message. I looked in the log file of Nexus and found following exception:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: java.lang.TypeNotPresentException: Type org.codehaus.enunciate.contract.jaxrs.ResourceMethodSignature not present
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl"> ....
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl">ERROR [er_start_runner] - /nexus - unavailable java.lang.IllegalStateException: The PlexusServerServlet couldn&amp;#39;t lookup the target component (role=&amp;#39;org.restlet.Application&amp;#39;, hint=&amp;#39;nexus&amp;#39;)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>With Google's help I found a fixed bug in the Nexus bug tracking system, that describes my problem. The reason for my problem was: I had on my Linux machine an IBM JVM in an elder version. With this version Nexus doesn't run because of a bug in the IBM JVM.  Two solutions and one workaround exist for this problem:&lt;/p></description></item><item><title>Reading tips for OSGi Beginner</title><link>https://blog.sandra-parsick.de/2011/09/25/reading-tips-for-osgi-beginner/</link><pubDate>Sun, 25 Sep 2011 00:00:00 +0000</pubDate><guid>https://blog.sandra-parsick.de/2011/09/25/reading-tips-for-osgi-beginner/</guid><description>
&lt;p>In the last weeks I familiarised myself with OSGi. Two books were very helpful:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Modular Java: Creating Flexible Applications with OSGi and Spring&lt;/strong> by Craig Walls&lt;/li>
&lt;li>&lt;strong>OSGi für Praktiker - Prinzipien, Werkzeuge und praktische Anleitungen auf dem Weg zur kleinen SOA&lt;/strong> by Bernd Weber,  Patrick Baumgartner, Oliver Braun (in German)&lt;/li>
&lt;/ul>
&lt;p>Both books are similar organised.  They introduce OSGi by an example project form the first source code till the deployment.  These projects are not 'Hello World' projects, so you can adopt the way of working with OSGi for your real OSGi projects.&lt;/p></description></item></channel></rss>