<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Maven on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/maven/</link>
    <description>Recent content in Maven on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo -- 0.147.8</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #213243b1d6e8932079e09227d3f3ed0c806cd0c9</copyright>
    <lastBuildDate>Fri, 28 Mar 2025 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/maven/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>CVE Scanning and Guided Remediation with OSV Scanner</title>
      <link>https://www.hascode.com/cve-scanning-and-guided-remediation-with-osv-scanner/</link>
      <pubDate>Fri, 28 Mar 2025 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/cve-scanning-and-guided-remediation-with-osv-scanner/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;osv-scanner-cover.webp&#34; alt=&#34;osv scanner cover&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OSV Scanner&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Security is a critical aspect of software development, and staying ahead of vulnerabilities is essential for us application developers. Google’s OSV Scanner is a powerful tool that helps detect vulnerabilities in open-source dependencies.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This article will guide us through setting up and using OSV Scanner to secure our projects, scan for invalid licenses, scan OCI images and finally how to fix findings via guided remediation.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Messaging with NATS and Java</title>
      <link>https://www.hascode.com/messaging-with-nats-and-java/</link>
      <pubDate>Tue, 26 Nov 2024 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/messaging-with-nats-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;nats-messaging.svg&#34; alt=&#34;nats messaging&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. NATS Architecture Component Diagram&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;NATS is a high-performance messaging system that offers simplicity, speed, and scalability. It is particularly suited for building distributed systems and microservices.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This article demonstrates how to integrate NATS with Java, showcasing the essential steps to set up, connect, and publish/subscribe to messages.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Before diving in, we should ensure to have the following installed:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Java Development Kit (JDK) 11 or later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Maven or Gradle for dependency management.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Docker (optional).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Object Audit with Java and Javers</title>
      <link>https://www.hascode.com/object-audit-with-java-and-javers/</link>
      <pubDate>Mon, 18 Sep 2023 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/object-audit-with-java-and-javers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;object-audit-javers-cover-image.webp&#34; alt=&#34;object audit javers cover image&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Object Audit with Java and Javers&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Just a quick snippet
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_integration&#34;&gt;Maven Integration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;org.javers&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;javers-core&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;${javers.version}&amp;lt;/version&amp;gt;
&amp;lt;/dependency&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_calculate_changes_in_object_graph&#34;&gt;Calculate Changes in Object Graph&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package io.hascode;

import org.javers.core.Changes;
import org.javers.core.Javers;
import org.javers.core.JaversBuilder;
import org.javers.core.diff.Diff;

public &amp;lt;T&amp;gt; Changes diff(T snapshot, T latest) {
  Javers javers = JaversBuilder.javers().build();
  Diff diff = javers.compare(snapshot, latest);
  return diff.getChanges();
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_resources&#34;&gt;Resources&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://javers.org/&#34;&gt;Javers Website&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Bean Mapping with MapStruct</title>
      <link>https://www.hascode.com/java-bean-mapping-with-mapstruct/</link>
      <pubDate>Thu, 31 Mar 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-bean-mapping-with-mapstruct/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://mapstruct.org/&#34;&gt;MapStruct&lt;/a&gt; is a nice tool to generate mappers for converting one Java bean into another
e.g. for projections, data-transfer-objects and so on …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As long as fields in source and target beans do match, the mapper is able to generate the data setting automatically ..
else we may specify which source fields to map into which target fields or to register custom converters with ease.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we need to add dependencies and plugin integration to our &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Converting XML Schema (XSD) to Protocol Buffers (Protobuf)</title>
      <link>https://www.hascode.com/converting-xml-schema-xsd-to-protocol-buffers-protobuf/</link>
      <pubDate>Wed, 02 Feb 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/converting-xml-schema-xsd-to-protocol-buffers-protobuf/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes one needs to derive a Google Protocol Buffers schema from an XML schema .. e.g. from an Enterprise Architect Export.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Tool used here: &lt;a href=&#34;https://github.com/entur/schema2proto/&#34;&gt;schema2proto (GitLab project)&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Download &lt;code&gt;schema2proto-lib&lt;/code&gt; from the global Maven repository: &lt;a href=&#34;https://search.maven.org/search?q=schema2proto&#34; class=&#34;bare&#34;&gt;https://search.maven.org/search?q=schema2proto&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run &lt;code&gt;Schema2Proto&lt;/code&gt; against a give XSD schema file and with a given output directory:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre&gt;java -jar schema2proto-lib-1.53.jar Schema2Proto --outputDirectory=src/main/protobuf input.xsd&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A yaml config file may be given instead of cli parameters:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;java -jar schema2proto-lib-1.53.jar Schema2Proto ----configFile=config.yaml input.xsd&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kafka Java Quickstart with Docker</title>
      <link>https://www.hascode.com/kafka-java-quickstart-with-docker/</link>
      <pubDate>Sat, 29 Jan 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kafka-java-quickstart-with-docker/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Setup Kafka and Zookeeper with Docker and docker-compose&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a message consumer and producer in Java&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_kafka_setup&#34;&gt;Kafka Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re using &lt;code&gt;docker-compose&lt;/code&gt; to set up our message broker, zookeper and other stuff using &lt;code&gt;confluent-platform&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is our &lt;code&gt;docker-compose.yaml&lt;/code&gt; config file from Confluent’s following
&lt;a href=&#34;https://github.com/confluentinc/cp-all-in-one/blob/7.0.1-post/cp-all-in-one-community/docker-compose.yml&#34;&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;docker-compose.yaml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;---
version: &amp;#39;2&amp;#39;
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:7.0.1
    hostname: zookeeper
    container_name: zookeeper
    ports:
      - &amp;#34;2181:2181&amp;#34;
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
      ZOOKEEPER_TICK_TIME: 2000

  broker:
    image: confluentinc/cp-kafka:7.0.1
    hostname: broker
    container_name: broker
    depends_on:
      - zookeeper
    ports:
      - &amp;#34;29092:29092&amp;#34;
      - &amp;#34;9092:9092&amp;#34;
      - &amp;#34;9101:9101&amp;#34;
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: &amp;#39;zookeeper:2181&amp;#39;
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
      KAFKA_JMX_PORT: 9101
      KAFKA_JMX_HOSTNAME: localhost

  schema-registry:
    image: confluentinc/cp-schema-registry:7.0.1
    hostname: schema-registry
    container_name: schema-registry
    depends_on:
      - broker
    ports:
      - &amp;#34;8081:8081&amp;#34;
    environment:
      SCHEMA_REGISTRY_HOST_NAME: schema-registry
      SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081

  connect:
    image: cnfldemos/kafka-connect-datagen:0.5.0-6.2.0
    hostname: connect
    container_name: connect
    depends_on:
      - broker
      - schema-registry
    ports:
      - &amp;#34;8083:8083&amp;#34;
    environment:
      CONNECT_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      CONNECT_REST_ADVERTISED_HOST_NAME: connect
      CONNECT_GROUP_ID: compose-connect-group
      CONNECT_CONFIG_STORAGE_TOPIC: docker-connect-configs
      CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_OFFSET_FLUSH_INTERVAL_MS: 10000
      CONNECT_OFFSET_STORAGE_TOPIC: docker-connect-offsets
      CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_STATUS_STORAGE_TOPIC: docker-connect-status
      CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
      CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter
      CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
      CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry:8081
      CONNECT_PLUGIN_PATH: &amp;#34;/usr/share/java,/usr/share/confluent-hub-components&amp;#34;
      CONNECT_LOG4J_LOGGERS: org.apache.zookeeper=ERROR,org.I0Itec.zkclient=ERROR,org.reflections=ERROR

  ksqldb-server:
    image: confluentinc/cp-ksqldb-server:7.0.1
    hostname: ksqldb-server
    container_name: ksqldb-server
    depends_on:
      - broker
      - connect
    ports:
      - &amp;#34;8088:8088&amp;#34;
    environment:
      KSQL_CONFIG_DIR: &amp;#34;/etc/ksql&amp;#34;
      KSQL_BOOTSTRAP_SERVERS: &amp;#34;broker:29092&amp;#34;
      KSQL_HOST_NAME: ksqldb-server
      KSQL_LISTENERS: &amp;#34;http://0.0.0.0:8088&amp;#34;
      KSQL_CACHE_MAX_BYTES_BUFFERING: 0
      KSQL_KSQL_SCHEMA_REGISTRY_URL: &amp;#34;http://schema-registry:8081&amp;#34;
      KSQL_PRODUCER_INTERCEPTOR_CLASSES: &amp;#34;io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor&amp;#34;
      KSQL_CONSUMER_INTERCEPTOR_CLASSES: &amp;#34;io.confluent.monitoring.clients.interceptor.MonitoringConsumerInterceptor&amp;#34;
      KSQL_KSQL_CONNECT_URL: &amp;#34;http://connect:8083&amp;#34;
      KSQL_KSQL_LOGGING_PROCESSING_TOPIC_REPLICATION_FACTOR: 1
      KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: &amp;#39;true&amp;#39;
      KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: &amp;#39;true&amp;#39;

  ksqldb-cli:
    image: confluentinc/cp-ksqldb-cli:7.0.1
    container_name: ksqldb-cli
    depends_on:
      - broker
      - connect
      - ksqldb-server
    entrypoint: /bin/sh
    tty: true

  ksql-datagen:
    image: confluentinc/ksqldb-examples:7.0.1
    hostname: ksql-datagen
    container_name: ksql-datagen
    depends_on:
      - ksqldb-server
      - broker
      - schema-registry
      - connect
    command: &amp;#34;bash -c &amp;#39;echo Waiting for Kafka to be ready... &amp;amp;&amp;amp; \
                       cub kafka-ready -b broker:29092 1 40 &amp;amp;&amp;amp; \
                       echo Waiting for Confluent Schema Registry to be ready... &amp;amp;&amp;amp; \
                       cub sr-ready schema-registry 8081 40 &amp;amp;&amp;amp; \
                       echo Waiting a few seconds for topic creation to finish... &amp;amp;&amp;amp; \
                       sleep 11 &amp;amp;&amp;amp; \
                       tail -f /dev/null&amp;#39;&amp;#34;
    environment:
      KSQL_CONFIG_DIR: &amp;#34;/etc/ksql&amp;#34;
      STREAMS_BOOTSTRAP_SERVERS: broker:29092
      STREAMS_SCHEMA_REGISTRY_HOST: schema-registry
      STREAMS_SCHEMA_REGISTRY_PORT: 8081

  rest-proxy:
    image: confluentinc/cp-kafka-rest:7.0.1
    depends_on:
      - broker
      - schema-registry
    ports:
      - 8082:8082
    hostname: rest-proxy
    container_name: rest-proxy
    environment:
      KAFKA_REST_HOST_NAME: rest-proxy
      KAFKA_REST_BOOTSTRAP_SERVERS: &amp;#39;broker:29092&amp;#39;
      KAFKA_REST_LISTENERS: &amp;#34;http://0.0.0.0:8082&amp;#34;
      KAFKA_REST_SCHEMA_REGISTRY_URL: &amp;#39;http://schema-registry:8081&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>GitHub Release Pipeline for Java</title>
      <link>https://www.hascode.com/github-release-pipeline-for-java/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/github-release-pipeline-for-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Set up Maven build pipeline for a Java 11 app&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Release Maven artifact on GitHub using GitHub actions&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_maven&#34;&gt;Setup Maven&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Assuming that we have a project named &lt;code&gt;sample-app&lt;/code&gt; released for my &lt;code&gt;hascode&lt;/code&gt; GitHub account:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re adding some release information to our project’s &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
  xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
  xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;sample-app&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;bookmark-manager
  &amp;lt;name&amp;gt;sample-app&amp;lt;/name&amp;gt;
  &amp;lt;description&amp;gt;hasCode.com Bookmark Manager&amp;lt;/description&amp;gt;


  &amp;lt;scm&amp;gt;
    &amp;lt;developerConnection&amp;gt;scm:git:https://github.com/hascode/sample-app.git
    &amp;lt;/developerConnection&amp;gt;
  &amp;lt;/scm&amp;gt;


  &amp;lt;distributionManagement&amp;gt;
    &amp;lt;repository&amp;gt;
      &amp;lt;id&amp;gt;github&amp;lt;/id&amp;gt;
      &amp;lt;name&amp;gt;GitHub&amp;lt;/name&amp;gt;
      &amp;lt;url&amp;gt;https://maven.pkg.github.com/hascode/sample-app&amp;lt;/url&amp;gt;
    &amp;lt;/repository&amp;gt;
  &amp;lt;/distributionManagement&amp;gt;


  &amp;lt;properties&amp;gt;
    &amp;lt;java.version&amp;gt;11&amp;lt;/java.version&amp;gt;
    &amp;lt;project.scm.id&amp;gt;github&amp;lt;/project.scm.id&amp;gt;
  &amp;lt;/properties&amp;gt;

  [..]
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>JUnit5 Java Maven Snippet</title>
      <link>https://www.hascode.com/junit5-java-maven-snippet/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/junit5-java-maven-snippet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Use JUnit Maven BOM for version alignment&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add minimal dependencies for JUnit5 Java Projekt&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Excerpt from the &lt;a href=&#34;https://maven.apache.org&#34;&gt;Maven&lt;/a&gt; project’s &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;dependencyManagement&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.junit&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;junit-bom&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;5.7.1&amp;lt;/version&amp;gt;
      &amp;lt;type&amp;gt;pom&amp;lt;/type&amp;gt;
      &amp;lt;scope&amp;gt;import&amp;lt;/scope&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;
&amp;lt;/dependencyManagement&amp;gt;

&amp;lt;dependencies&amp;gt;
  &amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;junit-jupiter&amp;lt;/artifactId&amp;gt;
    &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
  &amp;lt;/dependency&amp;gt;
&amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit5 does not work with older versions of the Maven Compiler Plugin and the Surefire Plugin used for test execution.
Setting their versions in the &lt;code&gt;pom.xml&lt;/code&gt; is done like this:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Package a Spring Boot App as RPM</title>
      <link>https://www.hascode.com/package-a-spring-boot-app-as-rpm/</link>
      <pubDate>Fri, 14 May 2021 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/package-a-spring-boot-app-as-rpm/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sidebarblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Goals&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Package a Spring Boot Service as RPM Package&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure systemd integration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add install/uninstall hooks to create users, directories etc.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_setup&#34;&gt;Maven Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34;
  xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34;
  xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;parent&amp;gt;
    &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;spring-boot-starter-parent&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;2.4.2&amp;lt;/version&amp;gt;
    &amp;lt;relativePath/&amp;gt;
  &amp;lt;/parent&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;sample-app&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;
  &amp;lt;name&amp;gt;sample-app&amp;lt;/name&amp;gt;

  &amp;lt;properties&amp;gt;
    &amp;lt;java.version&amp;gt;11&amp;lt;/java.version&amp;gt;
  &amp;lt;/properties&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifactId&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;spring-boot-starter-actuator&amp;lt;/artifactId&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;

  &amp;lt;build&amp;gt;
    &amp;lt;plugins&amp;gt;
      &amp;lt;plugin&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;1&#34;&gt;&lt;/i&gt;&lt;b&gt;(1)&lt;/b&gt;
        &amp;lt;groupId&amp;gt;de.dentrassi.maven&amp;lt;/groupId&amp;gt;
        &amp;lt;artifactId&amp;gt;rpm&amp;lt;/artifactId&amp;gt;
        &amp;lt;version&amp;gt;1.5.0&amp;lt;/version&amp;gt;
        &amp;lt;executions&amp;gt;
          &amp;lt;execution&amp;gt;
            &amp;lt;goals&amp;gt;
              &amp;lt;goal&amp;gt;rpm&amp;lt;/goal&amp;gt;
            &amp;lt;/goals&amp;gt;
          &amp;lt;/execution&amp;gt;
        &amp;lt;/executions&amp;gt;
        &amp;lt;configuration&amp;gt;
          &amp;lt;packageName&amp;gt;sample-app&amp;lt;/packageName&amp;gt;
          &amp;lt;skipSigning&amp;gt;true&amp;lt;/skipSigning&amp;gt;
          &amp;lt;group&amp;gt;Application/Misc&amp;lt;/group&amp;gt;
          &amp;lt;requires&amp;gt;
            &amp;lt;require&amp;gt;java-11-openjdk-headless&amp;lt;/require&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;2&#34;&gt;&lt;/i&gt;&lt;b&gt;(2)&lt;/b&gt;
          &amp;lt;/requires&amp;gt;
          &amp;lt;entries&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;3&#34;&gt;&lt;/i&gt;&lt;b&gt;(3)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app&amp;lt;/name&amp;gt;
              &amp;lt;directory&amp;gt;true&amp;lt;/directory&amp;gt;
              &amp;lt;user&amp;gt;root&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;root&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0755&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;4&#34;&gt;&lt;/i&gt;&lt;b&gt;(4)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app/log&amp;lt;/name&amp;gt;
              &amp;lt;directory&amp;gt;true&amp;lt;/directory&amp;gt;
              &amp;lt;user&amp;gt;sample-app&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;sample-app&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0750&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;5&#34;&gt;&lt;/i&gt;&lt;b&gt;(5)&lt;/b&gt;
              &amp;lt;name&amp;gt;/opt/sample-app/sample-app.jar&amp;lt;/name&amp;gt;
              &amp;lt;file&amp;gt;${project.build.directory}/${project.build.finalName}.jar&amp;lt;/file&amp;gt;
              &amp;lt;user&amp;gt;root&amp;lt;/user&amp;gt;
              &amp;lt;group&amp;gt;root&amp;lt;/group&amp;gt;
              &amp;lt;mode&amp;gt;0644&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
            &amp;lt;entry&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;6&#34;&gt;&lt;/i&gt;&lt;b&gt;(6)&lt;/b&gt;
              &amp;lt;name&amp;gt;/usr/lib/systemd/system/sample-app.service&amp;lt;/name&amp;gt;
              &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/sample-app.service&amp;lt;/file&amp;gt;
              &amp;lt;mode&amp;gt;0644&amp;lt;/mode&amp;gt;
            &amp;lt;/entry&amp;gt;
          &amp;lt;/entries&amp;gt;
          &amp;lt;beforeInstallation&amp;gt; &lt;i class=&#34;conum&#34; data-value=&#34;7&#34;&gt;&lt;/i&gt;&lt;b&gt;(7)&lt;/b&gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/preinstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/beforeInstallation&amp;gt;
          &amp;lt;afterInstallation&amp;gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/postinstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/afterInstallation&amp;gt;
          &amp;lt;beforeRemoval&amp;gt;
            &amp;lt;file&amp;gt;${project.basedir}/src/main/dist/preuninstall.sh&amp;lt;/file&amp;gt;
          &amp;lt;/beforeRemoval&amp;gt;
          &amp;lt;license&amp;gt;All rights reserved&amp;lt;/license&amp;gt;
        &amp;lt;/configuration&amp;gt;
      &amp;lt;/plugin&amp;gt;
    &amp;lt;/plugins&amp;gt;
  &amp;lt;/build&amp;gt;

&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Throwaway Containers for Integration Testing with Java, JUnit 5 and Testcontainers.</title>
      <link>https://www.hascode.com/using-throwaway-containers-for-integration-testing-with-java-junit-5-and-testcontainers./</link>
      <pubDate>Wed, 30 Jan 2019 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-throwaway-containers-for-integration-testing-with-java-junit-5-and-testcontainers./</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A lot of boilerplate code is written when developers need to test their applications with different connected systems like databases, stream platforms and other collaborators.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Docker allows to handle those dependencies but there is still some glue code required to bind the container’s lifecycle and the configuration to the concrete integration test.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Testcontainers is a testing library that offers lightweight throwaway instances of anything able to run in a Docker container, with bindings to configure the specific containers and also provides wrappers to manage our own custom containers.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing OpenAPI Swagger Schema Compliance with Java, JUnit and assertj-swagger</title>
      <link>https://www.hascode.com/testing-openapi-swagger-schema-compliance-with-java-junit-and-assertj-swagger/</link>
      <pubDate>Fri, 31 Aug 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-openapi-swagger-schema-compliance-with-java-junit-and-assertj-swagger/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OpenAPI and Swagger API description format are becoming important standards to specify API contracts for RESTful web services and the Microservices trend pushes the need for such contracts even further.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore arises the need for software architects, testers and developers to write tests to verify if an exposed API follows such a specified contract.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I will demonstrate a setup with Java, Maven, JUnit and the designated contract-testing-library, assertj-swagger that verifies the validity of such a contract exposed by a Spring Boot application against a local stored definition.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Testing Java Applications for Resilience by Simulating Network Problems with Toxiproxy, JUnit and the Docker Maven Plugin</title>
      <link>https://www.hascode.com/testing-java-applications-for-resilience-by-simulating-network-problems-with-toxiproxy-junit-and-the-docker-maven-plugin/</link>
      <pubDate>Sun, 29 Jul 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/testing-java-applications-for-resilience-by-simulating-network-problems-with-toxiproxy-junit-and-the-docker-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When implementing distributed systems, client-server architectures and simple applications with network related functionalities, everything is fine when we’re in the development or in the testing stage because the network is reliable and the communicating systems are not as stressed as they are in production.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;But to sleep well we want to validate how resilient we have implemented our systems, how they behave when the network fails, the latency rises, the bandwidth is limited, connections time out and so on.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Setting up Kafka Brokers for Testing with Kafka-Unit</title>
      <link>https://www.hascode.com/setting-up-kafka-brokers-for-testing-with-kafka-unit/</link>
      <pubDate>Wed, 28 Mar 2018 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/setting-up-kafka-brokers-for-testing-with-kafka-unit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing test for applications that interact with Kafka brokers we often need to setup a decent environment including an instance of Kafka and ZooKeeper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though Kafka ships with some classes for testing, setting up a simple testing environment is quite easier with the kafka-unit library that offers JUnit test rule support or a fast programmatic setup within no time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short example, I’d like to show how create a simple setup using Maven, Surefire and kafka-unit.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Reactive Streams – Java 9 Flow API, RxJava, Akka and Reactor Examples</title>
      <link>https://www.hascode.com/reactive-streams-java-9-flow-api-rxjava-akka-and-reactor-examples/</link>
      <pubDate>Sun, 14 Jan 2018 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/reactive-streams-java-9-flow-api-rxjava-akka-and-reactor-examples/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Reactive Streams is an initiative trying to standardize asynchronous stream processing with non-blocking  back-pressure. With Java 9, new classes in the &lt;em&gt;java.util.concurrent.flow&lt;/em&gt; package offer a semantically equivalent counterpart to this standard that may be adopted by other frameworks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial we’re implementing examples for reactive streams with Java 9 and the Flow API, with RxJava2, with Akka, with Reactor and finally there is an example in RxJava1, too though it does not follow the standard.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Identity Management, One-Time-Passwords and Two-Factor-Auth with Spring Boot and Keycloak</title>
      <link>https://www.hascode.com/identity-management-one-time-passwords-and-two-factor-auth-with-spring-boot-and-keycloak/</link>
      <pubDate>Sun, 26 Nov 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/identity-management-one-time-passwords-and-two-factor-auth-with-spring-boot-and-keycloak/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Communicating with  identity and access management systems is a common task for many web-applications exposing secured resources.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Keycloak is an open source software that provides not also such authorization services but also offers a lot of features from Single-Sign-On, Identity-Brokering, Social-Login, User-Federation, multiple client-adapters up to the administration console or support for protocols like OpenID, SAML, OAuth2, Kerberos and more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I will demonstrate how to integrate a Spring Boot web application with Keycloak and configure an authentication flow that requires a two-factor-authentication with user credentials and also one-time-passwords.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Detecting Vulnerable Dependencies with Maven and the OWASP Dependency Check Plugin</title>
      <link>https://www.hascode.com/detecting-vulnerable-dependencies-with-maven-and-the-owasp-dependency-check-plugin/</link>
      <pubDate>Tue, 03 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/detecting-vulnerable-dependencies-with-maven-and-the-owasp-dependency-check-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;On the one hand adding dependencies to a project is easy, on the other hand securing a project and checking for vulnerable dependencies is way harder.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OWASP dependency check plugin for Maven allows us to scan our project’s dependencies for know vulnerabilities.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I will demonstrate its usage in the following short example.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;vulnerabilities-report-1024x867.png&#34; alt=&#34;vulnerabilities report 1024x867&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. OWASP Vulnerability Report&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need to add one plugin-dependency to our &lt;a href=&#34;http://maven.apache.org&#34;&gt;Mavenized&lt;/a&gt; project’s &lt;em&gt;pom.xml&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Downloading Maven Artifacts from a POM file programmatically with Eclipse Aether</title>
      <link>https://www.hascode.com/downloading-maven-artifacts-from-a-pom-file-programmatically-with-eclipse-aether/</link>
      <pubDate>Fri, 08 Sep 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/downloading-maven-artifacts-from-a-pom-file-programmatically-with-eclipse-aether/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes I need to resolve Maven dependencies programmatically. Eclipse Aether is a library for working with artifact repositories and I’ll be using it in the following example to read dependency trees from a given POM descriptor file and download each dependency from a remote Maven repository to a local directory.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;using-eclipse-aether.png&#34; alt=&#34;using eclipse aether&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Using Eclipse Aether.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re adding a bunch of dependencies to our project’s &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
    &amp;lt;aetherVersion&amp;gt;1.1.0&amp;lt;/aetherVersion&amp;gt;
    &amp;lt;mavenVersion&amp;gt;3.2.1&amp;lt;/mavenVersion&amp;gt;
&amp;lt;/properties&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Assuring Architectural Rules with ArchUnit</title>
      <link>https://www.hascode.com/assuring-architectural-rules-with-archunit/</link>
      <pubDate>Mon, 03 Jul 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/assuring-architectural-rules-with-archunit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Maintaining architecture rules and constraints for a specific software project or an application is not easy as textual documentation is easily forgotten after a while and hard to verify.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;ArchUnit is a testing library that allows developers and software architects to write down such rules as executable tests that may be run by the development teams and the integration servers.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article I will demonstrate the basic features of this library by applying rules and constraints to an existing application.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Template Driven Test POJO Generation with Fixture Factory and Java</title>
      <link>https://www.hascode.com/template-driven-test-pojo-generation-with-fixture-factory-and-java/</link>
      <pubDate>Tue, 20 Jun 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/template-driven-test-pojo-generation-with-fixture-factory-and-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In our tests we often need to create a bunch of test-objects that are populated with random-data. This data needs to follow specific rules as identifiers need to be unique or must be incremented, string-properties must follow special conventions and so on. In the following short tutorial I will demonstrate how to generate such test data using the Fixture Factory library.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;fixture-factory-running-with-junit-in-intellij-1024x752.png&#34; alt=&#34;fixture factory running with junit in intellij 1024x752&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Fixture Factory and JUnit&lt;/div&gt;</description>
    </item>
    <item>
      <title>Handling System Properties, Environment Variables, STDOUT/STDERR in JUnit Tests with System Rules</title>
      <link>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</link>
      <pubDate>Mon, 19 Dec 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When important data is written to STDIN/STDOUT and an application relies on specific system properties or environment variables, writing tests is getting more complicated.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;System Rules is a collection of JUnit rules that helps us writing Java tests for everything that deals with java.lang.System.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like to demonstrate how to deal with system properties, environment variables, STDOUT and STDERR and capturing both for testing e.g. for some golden master refactoring.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating Microservices with Bootique</title>
      <link>https://www.hascode.com/creating-microservices-with-bootique/</link>
      <pubDate>Sun, 18 Sep 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-microservices-with-bootique/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When it comes to writing microservices in Java, plenty of tools and frameworks exist. In the following tutorial, I’d like to demonstrate another minimalistic framework called Bootique by implementing a simple microservice exposing its functions either as a RESTful web-service or as a runnable command executed using the command line.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Bootique Command Line&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;bootique-command-line.png&#34; alt=&#34;bootique command line&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven here, we’re adding the following elements to our project’s &lt;em&gt;pom.xml:&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Bootiques Bill of Materials as dependency management: &lt;em&gt;bootique-bom&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootique Jersey for our REST service: &lt;em&gt;bootique-jersey&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bootique Logback for logging: &lt;em&gt;bootique-logback&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://maven.apache.org/plugins/maven-shade-plugin/&#34;&gt;Maven Shade Plugin&lt;/a&gt; to assemble our fat-jar&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Elasticsearch Integration Testing with Java</title>
      <link>https://www.hascode.com/elasticsearch-integration-testing-with-java/</link>
      <pubDate>Tue, 23 Aug 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/elasticsearch-integration-testing-with-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When building up search engines, indexing tons of data into a schema-less, distributed data store, Elasticsearch has always been a favourite tool of mine.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition to its core features, it also offers tools and documentation for us developers when we need to write integration tests for our Elasticsearch powered Java applications.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to implement a small sample application using Elasticsearch under the hood and how to write integration-tests with these tools for this application afterwards.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Layout Testing with Galen, JUnit and Maven</title>
      <link>https://www.hascode.com/layout-testing-with-galen-junit-and-maven/</link>
      <pubDate>Mon, 16 May 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/layout-testing-with-galen-junit-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Writing tests not only to verify the behaviour of a web site but also the correctness of its layout especially for responsive websites is not always easy.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Luckily the Galen Framework eases the task of writing layout tests for us, offering a specialized domain-specific-language to write layout-specifications, it integrates well with Selenium Grid, Sauce Labs or BrowserStack, it offers an easy way to deal with different browser sizes and responsive designs and it generates nice, detailed test reports.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Load Testing Web Applications with Gatling and Maven</title>
      <link>https://www.hascode.com/load-testing-web-applications-with-gatling-and-maven/</link>
      <pubDate>Fri, 06 May 2016 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/load-testing-web-applications-with-gatling-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other performance testing tools for web applications before. Nevertheless I’d like to demonstrate a library for load testing web applications named Gatling in combination with the build tool Maven.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Gatling offers a nice Scala DSL, high performance using Akka, Netty and asynchronous IO and plug-ins for all modern build tools.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’m going to show how to record simulations using an HTTP proxy, rewriting simulations in Scala and running and reporting simulations with Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Generating JUnit Tests with Java, EvoSuite and Maven</title>
      <link>https://www.hascode.com/generating-junit-tests-with-java-evosuite-and-maven/</link>
      <pubDate>Sun, 28 Feb 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/generating-junit-tests-with-java-evosuite-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Generating test suites for existing code allows us to verify the behaviour of an application before we’re making changes to its code base or for regression testing.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to derive test suites from an existing Java application using EvoSuite and the EvoSuite Maven plug-in.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;EvoSuite offers some nice features like running in a sandbox to avoid dangerous operations, virtual file-system and network and optimizing of different coverage criteria.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mocking HTTP Interaction with Java, JUnit and MockServer</title>
      <link>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</link>
      <pubDate>Tue, 05 Jan 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/mocking-http-interaction-with-java-junit-and-mockserver/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When writing tests for our software components sometimes we need to mock external services based on the HTTP protocol, might it be a RESTful web-service, an XML-RPC call or a simple GET request to some web-server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to create a mock HTTP server for testing and how to bootstrap and bind it to the life-cycle of a classical build-management tool like Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Documenting RESTful Webservices in Swagger, AsciiDoc and Plain Text with Maven and the JAX-RS Analyzer</title>
      <link>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</link>
      <pubDate>Tue, 16 Jun 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A variety of different tools exists to help us analyze RESTful web-services and create documentations for their APIs in different formats.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to document an existing JAX-RS web-service in multiple formats like Swagger, AsciiDoc or Plain Text using Maven, the JAX-RS Analyzer and the JAX-RS Analyzer Maven Plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The JAX-RS Analyzer gathers its information not only by reflection like most other tools but also by bytecode analysis and therefore does not require us to add special annotations for documentation to our code.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mutation Testing with Pitest and Maven</title>
      <link>https://www.hascode.com/mutation-testing-with-pitest-and-maven/</link>
      <pubDate>Sun, 10 May 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/mutation-testing-with-pitest-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Mutation testing makes an interesting addition to the classical test coverage metrics.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;They seed mutations (errors) into the code, run the project’s tests afterwards and if the tests fail, the mutation is killed – otherwise it lived and we have a possible indication of an issue with our tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial. I’d like to demonstrate how to setup mutation tests with the PIT/Pitest library and Maven and generate reports.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Performance Testing a Multiuser Web Application with JMeter and Maven</title>
      <link>https://www.hascode.com/performance-testing-a-multiuser-web-application-with-jmeter-and-maven/</link>
      <pubDate>Sun, 18 Jan 2015 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/performance-testing-a-multiuser-web-application-with-jmeter-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When there is the need to create load tests or performance tests for an application, Apache JMeter is a handy tool and set up with ease.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to configure JMeter to log into a Java EE web application with multiple users specified in a CSV file, how to generate some basic reports and how to integrate JMeter into a mavenized build using the JMeter Maven Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>BDD Testing with Cucumber, Java and JUnit</title>
      <link>https://www.hascode.com/bdd-testing-with-cucumber-java-and-junit/</link>
      <pubDate>Sun, 28 Dec 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/bdd-testing-with-cucumber-java-and-junit/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Whether behaviour-driven-development, specification by example or acceptance test driven development is the goal, the Cucumber framework eases our life when we need to  establish a link between the non-technical, textual description for a new feature and the tests that prove that the application fulfils these requirements.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short tutorial I’d like to demonstrate how to add Cucumber to a Java project and how to write feature descriptions and test-cases for each step of these descriptions.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE: Setting up and Testing Form-Based JDBC Authentication with Arquillian and Maven</title>
      <link>https://www.hascode.com/java-ee-setting-up-and-testing-form-based-jdbc-authentication-with-arquillian-and-maven/</link>
      <pubDate>Sun, 21 Dec 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-ee-setting-up-and-testing-form-based-jdbc-authentication-with-arquillian-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Especially when it comes to testing, setting up a decent environment for a secured Java EE web application isn’t always an easy thing to do.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to create a secured web application using form-based authentication and a JDBC realm to fetch users and roles and how to run the application in an embedded container for testing and development.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Additionally I’d like to show how to write and run integration tests to verify the security setup using a setup of Maven, Embedded GlassFish, Arquillian, jUnit and rest-assured.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating different Websocket Chat Clients in Java</title>
      <link>https://www.hascode.com/creating-different-websocket-chat-clients-in-java/</link>
      <pubDate>Sun, 09 Nov 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-different-websocket-chat-clients-in-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written two articles about different websocket based chat server implementations in Java, I was recently asked how an implementation of the client side would look like in Java.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I added this article to demonstrate how to create a websocket chat client applications within a few steps with the Java API for Websocket.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to write a text-based chat client for the console first and afterwards we’re going to program a chat client with a graphical user interface, implemented in JavaFX.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a XMPP Chat Bot with Apache Camel</title>
      <link>https://www.hascode.com/creating-a-xmpp-chat-bot-with-apache-camel/</link>
      <pubDate>Sun, 12 Oct 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-xmpp-chat-bot-with-apache-camel/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Camel not only is one of my favourite frameworks ever but it also allows the humble developer to create a full blown chat bot within a few lines of code and using the Camel XMPP component.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re going to create a simple chat bot and since Atlassian’s HipChat basic plan is now free for unlimited users, we’re using HipChat as our play- and testing ground for the bot.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using jOOQ and Build Helper Plugin to Generate Database Metamodels with Maven</title>
      <link>https://www.hascode.com/using-jooq-and-build-helper-plugin-to-generate-database-metamodels-with-maven/</link>
      <pubDate>Tue, 10 Jun 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/using-jooq-and-build-helper-plugin-to-generate-database-metamodels-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;When you need to derive meta-models from existing databases and want to create type-safe queries with an elegant, fluent-API, jOOQ definitely is a tool to consider here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to integrate the jOOQ meta-model generator into a Maven build using the jOOQ Maven Plug-in, the Build Helper Maven Plug-in and Maven profiles to finally create a running application to query an existing RDBMS using such a generated meta-model.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Allocating available random Ports in a Maven Build</title>
      <link>https://www.hascode.com/allocating-available-random-ports-in-a-maven-build/</link>
      <pubDate>Wed, 07 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/allocating-available-random-ports-in-a-maven-build/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently in a project I encountered the following problem: The development team used Git with a branch-per-feature-like workflow and the integration server, Bamboo in this case, was configured not only to run the integration-tests for the master-branch but also for every change in a feature branch.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As the team developed a Java EE web application ports like 8080 occasionally were already bound and builds failed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I knew a plug-in for Jenkins CI I to search for available ports and assign them to a build variable but I wanted to control such information directly within the Maven build life-cycle so I searched and finally found Sonatype’s Port Allocator Plug-in for Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Running JavaScript Tests with Maven, Jasmine and PhantomJS</title>
      <link>https://www.hascode.com/running-javascript-tests-with-maven-jasmine-and-phantomjs/</link>
      <pubDate>Sun, 04 May 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/running-javascript-tests-with-maven-jasmine-and-phantomjs/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes in a project there is the need to run tests for your client-side code, written in JavaScript from a Maven build.&lt;br/&gt;
One reason might be that Maven manages a complex build life-cycle in your project and you need a close integration for your JavaScript tests, another one might be that you’re in an environment where it is complicated to install and manage additional software like an integration- or build-server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Using Apache Avro with Java and Maven</title>
      <link>https://www.hascode.com/using-apache-avro-with-java-and-maven/</link>
      <pubDate>Sat, 08 Mar 2014 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/using-apache-avro-with-java-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Avro is a serialization framework similar to Google’s Protocol Buffers or Apache Thrift and offering features like rich data structures, a compact binary format, simple integration with dynamic languages and more.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short five minute tutorial, we’re going to specify a schema to serialize books in a JSON format, we’re using the Avro Maven plugin to generate the stub classes and finally we’re serializing the data into a single file.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Writing Java Integration Tests for MongoDB</title>
      <link>https://www.hascode.com/writing-java-integration-tests-for-mongodb/</link>
      <pubDate>Wed, 16 Oct 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/writing-java-integration-tests-for-mongodb/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;MongoDB is matured, document-oriented, cross-platform NoSQL database system with drivers available for a bunch of different programming languages.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’m going to write some integration tests for MongoDB using the MongoDB Java driver and the Flapdoodle library to create an embedded MongoDB instance for testing.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re going to write tests for a simple persist-and-query scenarion and for a map-reduce function and in addition I’m going to show how to bind the start and stop of a MongoDB instance to a Maven goal using the embedmongo-maven-plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Filtering Source Files using the Templating Maven Plugin</title>
      <link>https://www.hascode.com/filtering-source-files-using-the-templating-maven-plugin/</link>
      <pubDate>Tue, 03 Sep 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/filtering-source-files-using-the-templating-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Templating Maven Plugin looks useful if one needs to copy and to filter source files in a project e.g. to add property values from the build environment to a class.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For a short demonstration I’ve added the following short snippet.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Only one dependency needed .. simply add the following snippet to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;build&amp;gt;
  &amp;lt;plugins&amp;gt;
    &amp;lt;plugin&amp;gt;
      &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;templating-maven-plugin&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;1.0-alpha-3&amp;lt;/version&amp;gt;
      &amp;lt;executions&amp;gt;
        &amp;lt;execution&amp;gt;
          &amp;lt;id&amp;gt;filter-src&amp;lt;/id&amp;gt;
          &amp;lt;goals&amp;gt;
            &amp;lt;goal&amp;gt;filter-sources&amp;lt;/goal&amp;gt;
          &amp;lt;/goals&amp;gt;
        &amp;lt;/execution&amp;gt;
      &amp;lt;/executions&amp;gt;
    &amp;lt;/plugin&amp;gt;
  &amp;lt;/plugins&amp;gt;
&amp;lt;/build&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Continuous Deployment using GlassFish, Jenkins, Maven and Git</title>
      <link>https://www.hascode.com/continuous-deployment-using-glassfish-jenkins-maven-and-git/</link>
      <pubDate>Wed, 29 May 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/continuous-deployment-using-glassfish-jenkins-maven-and-git/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Recently I needed a quick solution to deploy a Java EE 6 web application on a GlassFish instance automatically and subsequent to a successful build of the project on the integration server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It took only a few steps using Jenkins, Maven and the Cargo plugin and I’d like to share this quick solution with you here.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need the following software installed and configured:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://git-scm.com/&#34;&gt;Git&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://jenkins-ci.org/&#34;&gt;Jenkins&lt;/a&gt; / &lt;a href=&#34;http://hudson-ci.org/&#34;&gt;Hudson&lt;/a&gt; + Git Plugin installed&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://glassfish.java.net/&#34;&gt;GlassFish 3.1&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://jdk7.java.net/&#34;&gt;JDK 7&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating slim Database Projections using JPA2 Constructor Expressions</title>
      <link>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</link>
      <pubDate>Sun, 14 Apr 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One common question that you may encounter one day when using object-relational-mapping in your application is how to slim down data that you’re retrieving from the persistence layer down to a specific subset for your use-case in an efficient manner and without using complex additional mapping frameworks. In some situations you might declare lazy loaded fields but another approach that I’d like to share with you here are JPA2 constructor expressions.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Micro Benchmarking your Tests using JUnit and JUnitBenchmarks</title>
      <link>https://www.hascode.com/micro-benchmarking-your-tests-using-junit-and-junitbenchmarks/</link>
      <pubDate>Sun, 10 Mar 2013 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/micro-benchmarking-your-tests-using-junit-and-junitbenchmarks/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I recently stumbled upon a nice framework that allows to convert simple JUnit tests into micro benchmarks named JUnitBenchmarks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;It allows to set basic benchmark options and and to generate charts by adding some simple annotations and a test rule to your tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One might argue if it is wise to mix the aspects, testing and benchmarking and I’d agree for sure – nevertheless I think this framework can be handy sometimes so let’s create some benchmarks using JUnit and JUnitBenchmarks..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Running categorized Tests using JUnit, Maven and Annotated-Test Suites</title>
      <link>https://www.hascode.com/running-categorized-tests-using-junit-maven-and-annotated-test-suites/</link>
      <pubDate>Thu, 06 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/running-categorized-tests-using-junit-maven-and-annotated-test-suites/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes we need to classify the tests in a project and a possible solution to achieve this goal is to assign different categories to the tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often we’re doing this to separate the execution of fast-running and long-running tests or to run a specific set of tests that is only applicable in special situations.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;To run a specific set of categorized tests there are different options and in the following tutorial we’ll be covering two of them: by configuring the Maven Surefire Plug-in or by using a JUnit Test Suite and the JUnit annotations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Content Detection, Metadata and Content Extraction with Apache Tika</title>
      <link>https://www.hascode.com/content-detection-metadata-and-content-extraction-with-apache-tika/</link>
      <pubDate>Sun, 02 Dec 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/content-detection-metadata-and-content-extraction-with-apache-tika/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Encountering the situation that you want to extract meta-data or content from a file – might it be an office document, a spreadsheet or even a mp3 or an image – or you’d like to detect the content type for a given file then Apache Tika might be a helpful tool for you.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Apache Tika supports a variety of document formats and has a nice, extendable parser and detection API with a lot of built-in parsers available.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>New features in JUnit 4.11</title>
      <link>https://www.hascode.com/new-features-in-junit-4.11/</link>
      <pubDate>Sun, 18 Nov 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/new-features-in-junit-4.11/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit is one of the most popular testing frameworks out there. Version 4.11 has just been released and offers some nice improvements that you shouldn’t miss.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In older versions of JUnit there were two dependencies .. &lt;em&gt;junit:junit&lt;/em&gt; contained an old version of hamcrest and could cause some nasty trouble .. &lt;em&gt;junit:junit-dep&lt;/em&gt; just referenced hamcrest the maven way.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now with version 4.11 there is just &lt;em&gt;junit:junit&lt;/em&gt; with clean references to hamcrest and &lt;em&gt;junit:junit-dep&lt;/em&gt; is relocated to &lt;em&gt;junit:junit&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Lucene Snippets: Faceting Search</title>
      <link>https://www.hascode.com/lucene-snippets-faceting-search/</link>
      <pubDate>Tue, 28 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/lucene-snippets-faceting-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The latest snippet from my Lucene examples demonstrates how to achieve a facet search using the Lucene 4.0 API and how easy it is to define multiple category paths to aggregate search results for different possible facets.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following example we’re indexing some books as a classical example and create multiple category paths for author, publication date and category afterwards ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_lucene_dependencies&#34;&gt;Lucene Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We simply need two dependencies here .. &lt;em&gt;lucene-core&lt;/em&gt; of course and in addition the &lt;em&gt;lucene-facet&lt;/em&gt; library .. I’ve added the declarations needed for Maven and SBT here .. if you’re using Gradle or Buildr you should’t have a problem to transfer the information needed ;)&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a Windows Executable from a Jar using Maven</title>
      <link>https://www.hascode.com/creating-a-windows-executable-from-a-jar-using-maven/</link>
      <pubDate>Tue, 07 Aug 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-a-windows-executable-from-a-jar-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in the life of a developer there is the need to create a windows executable for a Java application that is build and packaged in a Jar file.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following short example shows how to create an executable Jar first and a windows executable containing vendor information, a nice icon and other stuff afterwards by using a combination of the Maven Shade Plugin and the launch4j Plugin for Maven.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integration Testing IMAP, SMTP and POP3 with GreenMail</title>
      <link>https://www.hascode.com/integration-testing-imap-smtp-and-pop3-with-greenmail/</link>
      <pubDate>Mon, 30 Jul 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integration-testing-imap-smtp-and-pop3-with-greenmail/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written some e-mail handling, sending or receiving library you’d like to run some integration tests against a real mail server?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Then GreenMail might help you out here .. the framework is not quite new on the market but it is really easy to setup IMAP,SMTP or POP3 services with it and it comes with some helpful libraries making your life a bit easier here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That’s why I’ve come to the idea to share some examples for setting up different server instances, creating user accounts and – at last – fetching and validating e-mails…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Aspects of Functional Programming in Java</title>
      <link>https://www.hascode.com/aspects-of-functional-programming-in-java/</link>
      <pubDate>Mon, 16 Jul 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/aspects-of-functional-programming-in-java/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Functional programming is a trending topic these days and a lot of Java programmers are hot for the features that modern functional programming languages might offer.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Waiting for Java 8 and native closure support is a nice thing but for now we’re going to take a look at several Java frameworks that are trying to implement typical structures from those functional languages where possible using the capabilities of the Java language to emulate elements like higher-order-functions, closures, options and others …&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Task Scheduling in Java EE 6 on GlassFish using the Timer Service</title>
      <link>https://www.hascode.com/task-scheduling-in-java-ee-6-on-glassfish-using-the-timer-service/</link>
      <pubDate>Fri, 22 Jun 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/task-scheduling-in-java-ee-6-on-glassfish-using-the-timer-service/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Creating cronjobs or scheduled service executions is made really easy in Java EE 6. Scheduled tasks may be created in a programmatic style or simply by adding some annotations to an EJB.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re creating some simple scheduled tasks and let them run on an embedded GlassFish instance using the Maven Embedded GlassFish plugin..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_java_ee_6_maven_project_from_archetype&#34;&gt;Java EE 6 Maven Project from Archetype&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First of all we’re creating a new maven-ized project using one of the appropriate jee6 Maven archetypes&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating updatable Java Applications using Getdown and the Getdown Maven Plugin</title>
      <link>https://www.hascode.com/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/</link>
      <pubDate>Sun, 27 May 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Many programmers have suffered when trying to setup an environment to handle updates for their application without much effort. Some tried Java Web Start for this purpose and many encountered difficulties with this approach.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now there is getdown that aims to replace Java Web Start by offering a simple architecture to handle updates that is fast, realiable and the only thing you need is a normal http server. Though getdown lets us handle our updates really easy it is possible to make this process even easier with the getdown maven plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Compiling CoffeeScript with Maven</title>
      <link>https://www.hascode.com/compiling-coffeescript-with-maven/</link>
      <pubDate>Fri, 18 May 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/compiling-coffeescript-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;CoffeeScript is a neat language that is transcompiled into JavaScript but is more predictable and allows to write the same code with 1/3 fewer lines and of course with a (imho) nicer syntax.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;CoffeeScript is nice but a vivid integration into our application build lifecycle with Maven is better and that is what the following example is all about.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_dependencies&#34;&gt;Maven Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Though there are some alternatives, we’re using &lt;strong&gt;brew&lt;/strong&gt; here so please add the following dependency to your Maven project:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Wiring made easy using OSGi Blueprint and Apache Karaf</title>
      <link>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</link>
      <pubDate>Mon, 16 Apr 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OSGi Blueprint Container specification allows us to use dependency injection in our OSGi environment, declarative import and export of OSGi services, registering lifecycle listeners and wiring dependencies into our services with a few lines of XML code.&lt;br/&gt;
In the following tutorial we’re first building an OSGi bundle classical style and afterwards take a trip into the advantages of the Blueprint specification.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our OSGi container of choice here will be Apache Karaf a lightweight container with a lot of nice features and – of course – blueprint enabled…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Mixing Scala, Java in a Maven Project</title>
      <link>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</link>
      <pubDate>Fri, 23 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/snippet-mixing-scala-java-in-a-maven-project/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having just returned from the Atlassian Camp 2012 I just toyed around with Java and Scala and wanted to share the following snippet that demonstrates how to mix code from both languages in a Maven project using the maven-scala-plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setting_up_the_maven_project&#34;&gt;Setting up the Maven Project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;First create a new Maven project in your IDE or by running &lt;em&gt;mvn archetype:generate.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the next step, add the dependency for &lt;em&gt;scala-library&lt;/em&gt; and the scala maven repositories to your &lt;em&gt;pom.xml&lt;/em&gt; and hook the &lt;em&gt;maven-scala-plugin&lt;/em&gt; to Maven’s lifecycle. My &lt;em&gt;pom.xml&lt;/em&gt; finally looks like this one:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Selenium WebDriver, Selenium Server and PageObjects by Example</title>
      <link>https://www.hascode.com/selenium-webdriver-selenium-server-and-pageobjects-by-example/</link>
      <pubDate>Tue, 06 Mar 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/selenium-webdriver-selenium-server-and-pageobjects-by-example/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A lot has changed since Selenium RC and WebDriver has given us a new syntax to write tests for our web pages. PageObjects add an abstraction to the pages under test and finally we’re able to programmatically start Selenium server instances and use them to run the tests.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial, we’re writing some tests using PageObjects, WebDriver, Selenium Server and finally we’re even taking some screenshots of our tested web pages..&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Create Mobile Websites using Java Server Faces and PrimeFaces Mobile</title>
      <link>https://www.hascode.com/create-mobile-websites-using-java-server-faces-and-primefaces-mobile/</link>
      <pubDate>Sun, 08 Jan 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/create-mobile-websites-using-java-server-faces-and-primefaces-mobile/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The more smartphones and tablets are sold the bigger the need for a mobile version of a modern website. PrimeFaces Mobile helps us developers here and allows us to quickly create mobile websites that display well on an iPhone, Android, Palm, Blackberry, Windows Mobile and others.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to create a web application that is using Java Server Faces 2.1, PrimeFaces 3.1 and PrimeFaces Mobile 1.0 and runs on a simple web container like Tomcat or Jetty.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Maven Tomcat Plugin: Adding Authentication to an Embedded Tomcat</title>
      <link>https://www.hascode.com/maven-tomcat-plugin-adding-authentication-to-an-embedded-tomcat/</link>
      <pubDate>Wed, 12 Oct 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/maven-tomcat-plugin-adding-authentication-to-an-embedded-tomcat/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Tomcat Maven Plugin not only allows us to deploy our mavenized application to an existing Tomcat server but also to run our web application with an embedded instance from our project’s directory. Recently I needed to add basic authentication to such an instance and wanted to share the steps necessary here&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We just need Maven and a JDK …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit &amp;gt;= 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven 3&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;I am using the &lt;em&gt;webapp&lt;/em&gt; archetype here&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We’re adding the following configuration for the Tomcat plugin to your &lt;em&gt;pom.xml&lt;/em&gt; – my final descriptor is this one&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;pom.xml&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java EE 6 Development using the Maven Embedded GlassFish Plugin</title>
      <link>https://www.hascode.com/java-ee-6-development-using-the-maven-embedded-glassfish-plugin/</link>
      <pubDate>Tue, 20 Sep 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-ee-6-development-using-the-maven-embedded-glassfish-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Today we’re going to take a look at the Maven Embedded GlassFish Plugin and how it allows us quick creation of GlassFish server instances in no time and Java EE 6 application deployment.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. GlassFish + Maven&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With a few lines of configuration in your Maven’s pom.xml we’ve got a running GlassFish instance and are able to redeploy our application fast by pressing enter in our console.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to build a Java EE 6 Web Application with a stateless session bean and a web servlet and finally deploy – and redeploy the application using the Maven GlassFish Plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Screenscraping made easy using jsoup and Maven</title>
      <link>https://www.hascode.com/screenscraping-made-easy-using-jsoup-and-maven/</link>
      <pubDate>Tue, 30 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/screenscraping-made-easy-using-jsoup-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo2.png&#34; alt=&#34;logo2&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes in a developer’s life there is no clean API available to gather information from a web application .. no SOAP, no XML-RPC and no REST .. just a website hiding the information we’re looking for somewhere in its DOM hierarchy – so the only solution is screenscraping.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Screenscraping always leaves me with a bad feeling – but luckily there is a tool that makes this job at least a bit easier for a developer .. jsoup to the rescue!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Contract-First Web-Services using JAX-WS, JAX-B, Maven and Eclipse</title>
      <link>https://www.hascode.com/contract-first-web-services-using-jax-ws-jax-b-maven-and-eclipse/</link>
      <pubDate>Tue, 23 Aug 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/contract-first-web-services-using-jax-ws-jax-b-maven-and-eclipse/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the contract-first approach to define a web service offers some advantages in contrast to the code-first approach.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial we’re going to take a look at some details of this approach and we’re going to implement a real SOAP service using JAX-WS, Maven and the Eclipse IDE.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Finally we’re going to run our service implementation on an embedded Jetty instance and we’re going to take a look at soapUI and how to test our service using this neat tool.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Integrating Groovy in your Maven builds using GMaven</title>
      <link>https://www.hascode.com/integrating-groovy-in-your-maven-builds-using-gmaven/</link>
      <pubDate>Tue, 12 Jul 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/integrating-groovy-in-your-maven-builds-using-gmaven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image left&#34;&gt;&lt;img src=&#34;gmaven.png&#34; alt=&#34;gmaven&#34;/&gt;&lt;/span&gt; Often ant tasks are used in Maven builds but wouldn’t it be more attractive to integrate the Groovy language into our build process?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;GMaven is the answers to this problem and brings together Maven and Groovy. It allows us to execute Groovy scripts inline from our Maven configuration, from a local script or even from a remote location. In the following short examples I am going to show how to configure Maven to execute Groovy scripts from different locations.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a sample Java EE 6 Blog Application with JPA, EJB, CDI, JSF and Primefaces on GlassFish</title>
      <link>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</link>
      <pubDate>Tue, 08 Feb 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-sample-java-ee-6-blog-application-with-jpa-ejb-cdi-jsf-and-primefaces-on-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Java EE 6 is out and it indeed offers an interesting stack of technologies. So in today’s tutorial we are going to build a small sample web application that builds on this stack using Enterprise JavaBeans, Java Persistence API, Bean Validation, CDI and finally Java Server Faces and PrimeFaces.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The application we’re going to develop is a simple blog app that allows us to create new articles, list them and – finally delete them. We’re also covering some additional topics like JSF navigation, i18n, Ajax-enabled components and the deployment on the GlassFish application server.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Enterprise Java Bean EJB 3.1 Testing using Maven and embedded Glassfish</title>
      <link>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</link>
      <pubDate>Sat, 01 Jan 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/enterprise-java-bean-ejb-3.1-testing-using-maven-and-embedded-glassfish/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Are you playing around with the shiny new 3.1 EJB API?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven for your Java projects?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Need an easy way to write and execute tests for your EJBs that depends on an Java Application Server?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;No problem using Maven Archetypes, the Maven EJB Plugin and the GlassFish embedded Application Container..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;EJB_3.1_Embedded_Application_Server_Components.png&#34; alt=&#34;EJB 3.1 Embedded Application Server Components&#34;/&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For the following tutorial we’re going to need an installation of &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; and of course – the &lt;a href=&#34;http://www.oracle.com/technetwork/java/index.html&#34;&gt;Java Development Kit&lt;/a&gt;!&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating a REST Client Step-by-Step using JAX-RS, JAX-B and Jersey</title>
      <link>https://www.hascode.com/creating-a-rest-client-step-by-step-using-jax-rs-jax-b-and-jersey/</link>
      <pubDate>Thu, 25 Nov 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/creating-a-rest-client-step-by-step-using-jax-rs-jax-b-and-jersey/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Often in a developer’s life there is a REST service to deal with and nowadays one wants a fast and clean solution to create a client for such a service.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following tutorial shows a quick approach using JAX-RS with its reference implementation, Jersey in combination with JAX-B for annotation driven marshalling between XML or JSON structures and our Java-Beans.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following stuff is needed to run the following examples and code samples&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple Messaging Application using RabbitMQ 2 and Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-messaging-application-using-rabbitmq-2-and-maven/</link>
      <pubDate>Sun, 05 Sep 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-messaging-application-using-rabbitmq-2-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having read an interesting &lt;a href=&#34;http://wiki.secondlife.com/wiki/Message_Queue_Evaluation_Notes#RabbitMQ&#34;&gt;comparison by Lindenlabs&lt;/a&gt; evaluating modern message broker systems like ActiveMQ, ApacheQpid and amongst others – RabbitMQ – I wanted to take a quick look at the last one and built a small application producing and consuming some sample messages.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you need some lecture on getting started with RabbitMQ or the key concepts of messaging I strongly recommend reading this &lt;a href=&#34;http://www.rabbitmq.com/how.html&#34;&gt;list of introductional articles&lt;/a&gt; from the RabbitMQ homepage.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring 3, Maven and Annotation Based Configuration</title>
      <link>https://www.hascode.com/spring-3-maven-and-annotation-based-configuration/</link>
      <pubDate>Sun, 22 Aug 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/spring-3-maven-and-annotation-based-configuration/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is still the urban myth that using Spring IoC container without thousands lines of XML code isn’t possible – so today we’re taking a look at annotation based configuration with Spring 3 and of course we’re using Maven..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup_your_project&#34;&gt;Setup your project&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a simple Maven project using&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:generate // or
mvn archetype:create&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a lot of dependencies and reference them to the Spring version defined as a property in your &lt;em&gt;pom.xml.&lt;/em&gt; A good reference on Spring 3 and Maven artifacts can be found at &lt;a href=&#34;http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/&#34;&gt;Springsource.com&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
     &amp;lt;org.springframework.version&amp;gt;3.0.0.RELEASE&amp;lt;/org.springframework.version&amp;gt;
 &amp;lt;/properties&amp;gt;
 &amp;lt;dependencies&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-core&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-expression&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;

     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-beans&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-aop&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-context&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;spring-context-support&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;${org.springframework.version}&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
     &amp;lt;dependency&amp;gt;
         &amp;lt;groupId&amp;gt;org.aspectj&amp;lt;/groupId&amp;gt;
         &amp;lt;artifactId&amp;gt;com.springsource.org.aspectj.runtime&amp;lt;/artifactId&amp;gt;
         &amp;lt;version&amp;gt;1.6.8.RELEASE&amp;lt;/version&amp;gt;
     &amp;lt;/dependency&amp;gt;
 &amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple OSGi Web Application using Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</link>
      <pubDate>Sun, 25 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we will take a look at the development of a simple OSGi Web Application and what tools can save us some time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Maven Bundle Plugin makes our life much easier here as does the OSGi Bundle Repository that offers some nice bundles – in our case the servlet API and an embedded Jetty web server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets develop some bundles ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You are going to need a &lt;a href=&#34;http://java.sun.com/javase/downloads/index.jsp&#34;&gt;JDK&lt;/a&gt; (&amp;gt;=5), &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven2&lt;/a&gt;, the &lt;a href=&#34;http://felix.apache.org&#34;&gt;Apache Felix OSGi implementation&lt;/a&gt; and and text editor/http://eclipse.org/[IDE] of your choice.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a Template Bundle Plugin in Confluence</title>
      <link>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</link>
      <pubDate>Mon, 12 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-template-bundle-plugin-in-confluence/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Since Confluence 3.2. there is a new plugin module type that allows you to deploy templates in a bundle via the plugin API.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition it is possible to assign these templates to specific spaces and preview available templates in the Confluence administration area.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So let’s build some sample templates..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_a_template_bundle_plugin&#34;&gt;Creating a Template Bundle Plugin&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Creating a template bundle is easy – just create a class implementing &lt;em&gt;TemplatePackage&lt;/em&gt; – there are two methods: one returns a list of bundled &lt;em&gt;PageTemplate&lt;/em&gt; Objects the other the name for the template bundle.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A look at Google’s Protocol Buffers</title>
      <link>https://www.hascode.com/a-look-at-googles-protocol-buffers/</link>
      <pubDate>Tue, 06 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/a-look-at-googles-protocol-buffers/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Protocol Buffers are a serialization format developed by Google- you might ask if another IDL is really needed here – is Google barking at the wrong tree?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;But protocol buffers offer some advantages over data serialization via XML or JSON – Google says they (compared to XML)..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;are 3 to 10 times smaller&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;are 20 to 100 times faster&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide generated data access classes for programmatic use&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide backward compatibility&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Server Faces/JSF 2 Tutorial – Step 1: Project setup, Maven and the first Facelet</title>
      <link>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</link>
      <pubDate>Sat, 05 Jun 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-server-faces/jsf-2-tutorial-step-1-project-setup-maven-and-the-first-facelet/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this short tutorial we are going to build a Java Server Faces Web-Application using JSF2.0, Facelets, Maven and Hibernate as ORM Mapper.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The goals for this first step are: Setting up the project structure using Maven, defining a frame template/decorator and a registration facelet, creating a managed bean and mapping it’s values to the facelet, adding some basic validation, displaying validation errors and finally adding a navigation structure.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In step2 of this tutorial we are going to add persistence using Hibernate, add some security, create a custom UI component and add some AJAX.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Dependency management in Grails 1.2</title>
      <link>https://www.hascode.com/dependency-management-in-grails-1.2/</link>
      <pubDate>Sun, 23 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/dependency-management-in-grails-1.2/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes I get the impression that there are many Maven haters in the Groovy/Grails community – now with version 1.2 of the Grails framework they are able to abandon the evil satanic &lt;a href=&#34;http://grails.org/Maven+Integration&#34;&gt;Grails Maven Plugin&lt;/a&gt; and embrace the neverending joys of a slim, nice, sexy dependency resolution dsl .. here we go .. lets define some dependencies wheee …&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Our dependency configuration is defined in &lt;em&gt;grails-app/config/BuildConfig.groovy&lt;/em&gt; as a property named &lt;em&gt;grails.project.dependency.resolution:&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-groovy&#34; data-lang=&#34;groovy&#34;&gt;grails.project.dependency.resolution = {
// here will be some dependencies
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Extending the Confluence Search Index</title>
      <link>https://www.hascode.com/extending-the-confluence-search-index/</link>
      <pubDate>Sun, 23 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/extending-the-confluence-search-index/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Developing plugins for the Confluence Wiki a developer sometimes needs to save additional metadata to a page object using Bandana or the ContentPropertyManager. Wouldn’t it be nice if this metadata was available in the built-in Lucene index?&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;That is were the Confluence Extractor Module comes into play..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_overview&#34;&gt;Overview&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An extractor allows the developer to add new fields to the lucene search index. Creating a new extractor is quite simple – just implement the interface &lt;em&gt;com.atlassian.bonnie.search.Extractor&lt;/em&gt; or &lt;em&gt;bucket.search.lucene.extractor.BaseAttachmentContentExtractor&lt;/em&gt; if you want to build a new file extractor.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>A look at Maven 3 alpha</title>
      <link>https://www.hascode.com/a-look-at-maven-3-alpha/</link>
      <pubDate>Sat, 22 May 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/a-look-at-maven-3-alpha/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We are all waiting for a stable release of Maven3 with following updates ..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;faster, more performant .. save us time building our software and some precious memory ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;improved artifact resolution api and plugin api&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;better osgi integration&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;a few bugfixes&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;no mixing of application dependencies and tooling dependencies&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;though it does not matter that much to me: polyglot features .. e.g.: &lt;a href=&#34;http://www.wakaleo.com/blog/236-writing-your-pom-files-in-groovy-a-sneek-preview-of-maven-3s-polyglot-features&#34;&gt;“Writing your pom files in Groovy”&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;version-less parent elements for multi-module or multi-pom projects, no need to define the parent version in every submodule&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;better artifact resolution, which dependency or pom supplied which artifact to the outcome .. got that information from: &lt;a href=&#34;http://javasplitter.blogspot.com/2009/11/whats-new-in-maven-3.html&#34;&gt;“Splitter from the world of Java”&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Signing APK with the Maven-Jar-Signer Plugin</title>
      <link>https://www.hascode.com/signing-apk-with-the-maven-jar-signer-plugin/</link>
      <pubDate>Sat, 17 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/signing-apk-with-the-maven-jar-signer-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;There is a nice Maven plugin helping you signing your Android app – the &lt;em&gt;Maven Jar Signer Plugin&lt;/em&gt;. If you want to learn more about Maven integration in an android project take a look at &lt;a href=&#34;https://www.hascode.com/how-to-integrate-android-development-tools-and-maven/&#34;&gt;this article&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_profile_setup&#34;&gt;Maven Profile Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add the following code to your &lt;em&gt;pom.xml&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34;?&amp;gt;
&amp;lt;profiles&amp;gt;
    &amp;lt;profile&amp;gt;
        &amp;lt;id&amp;gt;sign&amp;lt;/id&amp;gt;
        &amp;lt;build&amp;gt;
            &amp;lt;plugins&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-jarsigner-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;version&amp;gt;1.2&amp;lt;/version&amp;gt;
                    &amp;lt;executions&amp;gt;
                        &amp;lt;execution&amp;gt;
                            &amp;lt;id&amp;gt;signing&amp;lt;/id&amp;gt;
                            &amp;lt;goals&amp;gt;
                                &amp;lt;goal&amp;gt;sign&amp;lt;/goal&amp;gt;
                            &amp;lt;/goals&amp;gt;
                            &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
                            &amp;lt;inherited&amp;gt;true&amp;lt;/inherited&amp;gt;
                            &amp;lt;configuration&amp;gt;
                                &amp;lt;archiveDirectory/&amp;gt;
                                &amp;lt;includes&amp;gt;
                                    &amp;lt;include&amp;gt;target/*.apk&amp;lt;/include&amp;gt;
                                &amp;lt;/includes&amp;gt;
                                &amp;lt;keystore&amp;gt;path/to/keystore&amp;lt;/keystore&amp;gt;
                                &amp;lt;storepass&amp;gt;storepasword&amp;lt;/storepass&amp;gt;
                                &amp;lt;keypass&amp;gt;keypassword&amp;lt;/keypass&amp;gt;
                                &amp;lt;alias&amp;gt;key-alias&amp;lt;/alias&amp;gt;
                            &amp;lt;/configuration&amp;gt;
                        &amp;lt;/execution&amp;gt;
                    &amp;lt;/executions&amp;gt;
                &amp;lt;/plugin&amp;gt;
                &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;com.jayway.maven.plugins.android.generation2&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-android-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;inherited&amp;gt;true&amp;lt;/inherited&amp;gt;
                    &amp;lt;configuration&amp;gt;
                        &amp;lt;sign&amp;gt;
                            &amp;lt;debug&amp;gt;false&amp;lt;/debug&amp;gt;
                        &amp;lt;/sign&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                &amp;lt;/plugin&amp;gt;
            &amp;lt;/plugins&amp;gt;
        &amp;lt;/build&amp;gt;
    &amp;lt;/profile&amp;gt;
&amp;lt;/profiles&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Coding Katas with Maven</title>
      <link>https://www.hascode.com/coding-katas-with-maven/</link>
      <pubDate>Thu, 15 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/coding-katas-with-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Searching for nice coding kata sites I found this one – codingkata.org – I really liked because of the quick start and nice maven integration.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just head over to the &lt;a href=&#34;http://codingkata.org/katas/&#34;&gt;kata overview&lt;/a&gt; select the kata you wish to try out, copy the generated maven command line option and run it in the console – heres the code for the &lt;em&gt;hello-world&lt;/em&gt; sample:&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_coding_katas_from_maven_archetype&#34;&gt;Coding Katas from Maven Archetype&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:generate -DinteractiveMode=false -DarchetypeRepository=http://www.codingkata.org/repo/release -DarchetypeGroupId=org.codingkata.template -DarchetypeArtifactId=solv-java-archetype -DarchetypeVersion=1.04 -DgroupId=org.codingkata.unit -DartifactId=hello-world-solv-java -DkataId=hello-world -DkataVersion=1.02 -DlangVersion=1.6 -DlibVersion=1.3.2 -Dversion=1271358&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a Confluence Macro Plugin</title>
      <link>https://www.hascode.com/how-to-build-a-confluence-macro-plugin/</link>
      <pubDate>Tue, 13 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-confluence-macro-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The goal is to build a small macro plugin deployable via the Confluence plugin API rendering some spaces.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Please note that I am going to build the plugin using just Maven and not the Atlassian Maven Wrapper called the “&lt;em&gt;Atlassian Plugin SDK&lt;/em&gt;” – more information about that is available at the &lt;a href=&#34;http://confluence.atlassian.com/display/DEVNET/Developing+your+Plugin+using+the+Atlassian+Plugin+SDK&#34;&gt;Atlassian website&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The macro output will be rendered using a Velocity template and all messages are stored for &lt;em&gt;i18n&lt;/em&gt; in properties files bundled with the plugin.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Create a SOAP client using the JAX-WS Maven Plugin</title>
      <link>https://www.hascode.com/create-a-soap-client-using-the-jax-ws-maven-plugin/</link>
      <pubDate>Thu, 08 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/create-a-soap-client-using-the-jax-ws-maven-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Having written the article “&lt;a href=&#34;https://www.hascode.com/2010/03/how-to-build-a-confluence-soap-client-in-5-minutes/&#34;&gt;How to build a Confluence SOAP client in 5 minutes&lt;/a&gt;” some readers asked me for some more information and help using the JAX-WS plugin that I mentioned in the article instead of the Axis plugin – so here we go ;)&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_steps&#34;&gt;Steps&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a simple maven project first using &lt;em&gt;archetype:create&lt;/em&gt; or &lt;em&gt;archetype:generate&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.jaxws -DartifactId=soap-tutorial&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We get a &lt;em&gt;pom.xml&lt;/em&gt; like this:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.jaxws&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;soap-tutorial&amp;lt;/artifactId&amp;gt;
     &amp;lt;version&amp;gt;0.1&amp;lt;/version&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Manage dependencies with the Maven Dependency Plugin</title>
      <link>https://www.hascode.com/manage-dependencies-with-the-maven-dependency-plugin/</link>
      <pubDate>Sun, 04 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/manage-dependencies-with-the-maven-dependency-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In a maven project there are lots of dependencies to handle – often one wants to know which version of a software comes from.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The solution to this problem is the &lt;a href=&#34;http://maven.apache.org/plugins/maven-dependency-plugin/&#34;&gt;Maven Dependency Plugin&lt;/a&gt; which helps you to find used/unused/declared/undeclared dependencies in your project.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition the plugin allows you to copy or unpack artifacts.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_maven_goals&#34;&gt;Maven Goals&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:copy&lt;/em&gt; – copies artifacts defined in the config to a specified location – details available &lt;a href=&#34;http://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html&#34;&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:resolve&lt;/em&gt; – resolves all dependencies and shows the versions&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:go-offline&lt;/em&gt; – resolves everything the project needs like dependencies, plugins and reports&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:analyze&lt;/em&gt; - parses the dependencies and shows if they are used/declared/unused/undeclared ..&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:analyze-dep-gmt&lt;/em&gt; - finds mismatches between resolved dependencies and those listed in the dependencyManagement section&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;dependency:tree&lt;/em&gt; – shows a nice dependency tree for the maven project&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Snippet: Simple One-Minute IMAP Client</title>
      <link>https://www.hascode.com/snippet-simple-one-minute-imap-client/</link>
      <pubDate>Sat, 03 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-simple-one-minute-imap-client/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Building a simple IMAP Client that displays the subject of the messages in the &lt;em&gt;“inbox&lt;/em&gt;” Folder using Maven (I just like Maven).&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup_maven&#34;&gt;Project Setup / Maven&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a new Maven project&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.imap -DartifactId=imap-client&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit your &lt;em&gt;pom.xml&lt;/em&gt; and add some dependencies&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.imap&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;imap-client&amp;lt;/artifactId&amp;gt;
     &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;
     &amp;lt;dependencies&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;4.8.1&amp;lt;/version&amp;gt;
         &amp;lt;/dependency&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;javax.mail&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;mail&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;1.4.2&amp;lt;/version&amp;gt;
         &amp;lt;/dependency&amp;gt;
     &amp;lt;/dependencies&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_creating_the_e_mail_client&#34;&gt;Creating the E-Mail Client&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a package .. something like &lt;em&gt;com.hascode.imap.client&lt;/em&gt; ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a simple mail client using &lt;em&gt;javax.mail&lt;/em&gt; in a class named &lt;em&gt;ImapClient&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;package com.hascode.imap.client;

import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Store;

public class ImapClient {
    private Session session = null;
    private Store store = null;
    private String host = null;
    private String userName = null;
    private String password = null;

    public ImapClient(String host, String userName, String password){
        this.host = host;
        this.userName = userName;
        this.password = password;
    }

    public boolean getMail() throws MessagingException {
        session = Session.getDefaultInstance(System.getProperties(),null);
        //        session.setDebug(true);
        System.out.println(&amp;#34;get store..&amp;#34;);
        store = session.getStore(&amp;#34;imaps&amp;#34;);
        System.out.println(&amp;#34;connect..&amp;#34;);
        store.connect(this.host, this.userName, this.password);
        System.out.println(&amp;#34;get default folder ..&amp;#34;);
        Folder folder = store.getDefaultFolder();
        folder = folder.getFolder(&amp;#34;inbox&amp;#34;);
        folder.open(Folder.READ_ONLY);
        System.out.println(&amp;#34;reading messages..&amp;#34;);
        Message[] messages = folder.getMessages();
        for(Message m:messages){
          System.out.println(m.getSubject());
        }
        return false;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to integrate Android Development Tools and Maven</title>
      <link>https://www.hascode.com/how-to-integrate-android-development-tools-and-maven/</link>
      <pubDate>Fri, 02 Apr 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-integrate-android-development-tools-and-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;With the Maven Android Plugin it is possible to build and deploy/undeploy your android app and start/stop the emulator – if you’re used to maven you won’t be going without it ;)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;If you’re interested in signing your apk using maven – take a look at &lt;a href=&#34;signing-apk-with-the-maven-jar-signer-plugin/&#34;&gt;this article&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_project_setup&#34;&gt;Project Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create an android project using the &lt;a href=&#34;http://developer.android.com/guide/developing/other-ide.html#CreatingAProject&#34;&gt;android tool&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We need some dependencies – so create a &lt;em&gt;pom.xml&lt;/em&gt; in the project’s root directory – I took this from the &lt;a href=&#34;http://code.google.com/p/maven-android-plugin/wiki/Samples&#34;&gt;plugin samples&lt;/a&gt; and modified it:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;UTF-8&amp;#34;?&amp;gt;
&amp;lt;!--
 Copyright (C) 2009 Jayway AB

 Licensed under the Apache License, Version 2.0 (the &amp;#34;License&amp;#34;);
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an &amp;#34;AS IS&amp;#34; BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
--&amp;gt;
&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;com.hascode.android.app&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;demo&amp;lt;/artifactId&amp;gt;
     &amp;lt;packaging&amp;gt;apk&amp;lt;/packaging&amp;gt;
     &amp;lt;name&amp;gt;hasCode.com - Sample Android App using the Maven Android Plugin&amp;lt;/name&amp;gt;
     &amp;lt;version&amp;gt;0.1&amp;lt;/version&amp;gt;
     &amp;lt;dependencies&amp;gt;
         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;android&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;android&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;2.1&amp;lt;/version&amp;gt;
             &amp;lt;scope&amp;gt;provided&amp;lt;/scope&amp;gt;
         &amp;lt;/dependency&amp;gt;

         &amp;lt;dependency&amp;gt;
             &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;
             &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;
             &amp;lt;version&amp;gt;4.8.1&amp;lt;/version&amp;gt;
             &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
         &amp;lt;/dependency&amp;gt;
     &amp;lt;/dependencies&amp;gt;

     &amp;lt;build&amp;gt;
         &amp;lt;!--&amp;lt;finalName&amp;gt;${artifactId}&amp;lt;/finalName&amp;gt;--&amp;gt;
         &amp;lt;plugins&amp;gt;
             &amp;lt;plugin&amp;gt;
                 &amp;lt;groupId&amp;gt;com.jayway.maven.plugins.android.generation2&amp;lt;/groupId&amp;gt;
                 &amp;lt;artifactId&amp;gt;maven-android-plugin&amp;lt;/artifactId&amp;gt;
                 &amp;lt;configuration&amp;gt;
                     &amp;lt;sdk&amp;gt;
                         &amp;lt;path&amp;gt;${env.ANDROID_HOME}&amp;lt;/path&amp;gt;
                         &amp;lt;platform&amp;gt;3&amp;lt;/platform&amp;gt;
                     &amp;lt;/sdk&amp;gt;
                     &amp;lt;deleteConflictingFiles&amp;gt;true&amp;lt;/deleteConflictingFiles&amp;gt;
                 &amp;lt;/configuration&amp;gt;
                 &amp;lt;extensions&amp;gt;true&amp;lt;/extensions&amp;gt;
             &amp;lt;/plugin&amp;gt;

             &amp;lt;plugin&amp;gt;
                 &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
                 &amp;lt;configuration&amp;gt;
                 &amp;lt;source&amp;gt;1.5&amp;lt;/source&amp;gt;
                 &amp;lt;target&amp;gt;1.5&amp;lt;/target&amp;gt;
                 &amp;lt;/configuration&amp;gt;
             &amp;lt;/plugin&amp;gt;

         &amp;lt;/plugins&amp;gt;
     &amp;lt;/build&amp;gt;

&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a Confluence SOAP client in 5 minutes</title>
      <link>https://www.hascode.com/how-to-build-a-confluence-soap-client-in-5-minutes/</link>
      <pubDate>Sun, 28 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-confluence-soap-client-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we are going to build a SOAP client for the popular Confluence Wiki in about five minutes. The client is going to receive rendered HTML Markup from a specified Confluence Page.&lt;br/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A running Confluence Installation with SOAP API enabled – if you don’t already have one  take a look at &lt;a href=&#34;https://www.hascode.com/2010/03/confluence-developer-instance-quick-setup/&#34;&gt;this article&lt;/a&gt; or if you’ve got the &lt;a href=&#34;https://developer.atlassian.com/display/DOCS/Set+up+the+Atlassian+Plugin+SDK+and+Build+a+Project&#34;&gt;Atlassian Plugin SDK&lt;/a&gt; installed .. start a standalone instance using &lt;em&gt;atlas-run-standalone&lt;/em&gt; ..&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven&lt;/a&gt; – never go without it ;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Five minutes of your life time ..&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to build a quick Lucene Search</title>
      <link>https://www.hascode.com/how-to-build-a-quick-lucene-search/</link>
      <pubDate>Thu, 25 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-build-a-quick-lucene-search/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Helo – today I wanted to post a small tutorial for a small index and search operation using the &lt;a href=&#34;http://lucene.apache.org/&#34;&gt;Lucene&lt;/a&gt; indexer and Maven for the project setup.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_setup&#34;&gt;Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create an empty Maven sample project using the &lt;a href=&#34;http://m2eclipse.sonatype.org/&#34;&gt;Eclipse Maven Plugin&lt;/a&gt; or use the following console command:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn archetype:create -DgroupId=com.hascode.demo.search -DartifactId=lucene-sample&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Here is my &lt;em&gt;pom.xml&lt;/em&gt; there are some dependencies for Lucene defined:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;project xmlns=&amp;#34;http://maven.apache.org/POM/4.0.0&amp;#34; xmlns:xsi=&amp;#34;http://www.w3.org/2001/XMLSchema-instance&amp;#34; xsi:schemaLocation=&amp;#34;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&amp;#34;&amp;gt;
  &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
  &amp;lt;groupId&amp;gt;com.hascode.demo.search&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;lucene-sample&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;
  &amp;lt;name&amp;gt;My Lucene Search Sample&amp;lt;/name&amp;gt;
  &amp;lt;description&amp;gt;Lucene Search Sample&amp;lt;/description&amp;gt;
  &amp;lt;dependencies&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.apache.lucene&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;lucene-core&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;2.4.1&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
    &amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;lucene&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;lucene&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;1.4.3&amp;lt;/version&amp;gt;
    &amp;lt;/dependency&amp;gt;
  &amp;lt;/dependencies&amp;gt;
&amp;lt;/project&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to add a local lib directory to Maven</title>
      <link>https://www.hascode.com/how-to-add-a-local-lib-directory-to-maven/</link>
      <pubDate>Thu, 18 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/how-to-add-a-local-lib-directory-to-maven/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Sometimes there is a dependency not available at a remote repository and one is too lazy to set up a local maven repository – that’s when one adds a directory in the project structure and wants maven to find dependencies there.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a directory called “&lt;strong&gt;lib&lt;/strong&gt;” in the project root&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the following markup to the &lt;em&gt;pom.xml&lt;/em&gt; inside the &amp;lt;repositories&amp;gt;-Tag (create if it does not exist):&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;repository&amp;gt;
    &amp;lt;id&amp;gt;lib&amp;lt;/id&amp;gt;
    &amp;lt;name&amp;gt;lib&amp;lt;/name&amp;gt;
    &amp;lt;releases&amp;gt;
        &amp;lt;enabled&amp;gt;true&amp;lt;/enabled&amp;gt;
        &amp;lt;checksumPolicy&amp;gt;ignore&amp;lt;/checksumPolicy&amp;gt;
    &amp;lt;/releases&amp;gt;
    &amp;lt;snapshots&amp;gt;
        &amp;lt;enabled&amp;gt;false&amp;lt;/enabled&amp;gt;
    &amp;lt;/snapshots&amp;gt;
    &amp;lt;url&amp;gt;file://${project.basedir}/lib&amp;lt;/url&amp;gt;
&amp;lt;/repository&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Atlassian Snippets</title>
      <link>https://www.hascode.com/atlassian-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/atlassian-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_disable_yui_compressor&#34;&gt;Disable YUI compressor&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;com.atlassian.maven.plugins&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-jira-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;${amps.version}&amp;lt;/version&amp;gt;
    &amp;lt;extensions&amp;gt;true&amp;lt;/extensions&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;compressResources&amp;gt;false&amp;lt;/compressResources&amp;gt;
        [..]
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_favourites_by_user&#34;&gt;Confluence – Get favourites by user&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the label manager.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;List getFavouriteSpaces(String username)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_determine_the_base_url&#34;&gt;Confluence – Determine the base URL&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the SettingsManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String baseUrl = settingsManager.getGlobalSettings().getBaseUrl();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_the_context_path&#34;&gt;Confluence – Get the context path&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the BootstrapManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String contextPath = bootstrapManager.getWebAppContextPath();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_using_velocity_template_for_a_macro&#34;&gt;Confluence – Using Velocity Template for a Macro&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;final VelocityContext contextMap = new VelocityContext(MacroUtils.defaultVelocityContext());

contextMap.put(&amp;#34;key&amp;#34;, obj); // references obj as variable named $key in the velocity template

VelocityUtils.getRenderedTemplate(&amp;#34;path/to/template.vm&amp;#34;, contextMap);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Snippets</title>
      <link>https://www.hascode.com/java-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_remote_debug_a_pods_java_process&#34;&gt;Remote Debug a Pod’s Java Process&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Simple steps for remote debugging a Java process running on a k8 pod:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Edit deployment and add the following parameters to the Java start line: &lt;code&gt;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Also add the following port mapping at the section &lt;code&gt;container → ports&lt;/code&gt; in the deployment:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;- containerPort: 5005
  protocol: TCP&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Safe, wait for the new pods and then add a port forward for port 5005 for this pod:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl port-forward podname 5005&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Maven Snippets</title>
      <link>https://www.hascode.com/maven-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/maven-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_extract_coordinates_from_the_pom&#34;&gt;Extract Coordinates from the POM&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Helpful for build and integration environments, pipelines etc.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Exctract the Project version from the pom.xml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_override_a_property_via_local_configuration&#34;&gt;Override a Property via local configuration&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. to override the property &lt;code&gt;xxx&lt;/code&gt; from your project’s &lt;code&gt;pom.xml&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Create a directory &lt;code&gt;.mvn&lt;/code&gt; in your project directory root&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a file named &lt;code&gt;maven.config&lt;/code&gt; in this directory&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Insert &lt;code&gt;-Dxxx=newvalue&lt;/code&gt; into the file to override this property&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
Don’t forget to add &lt;code&gt;.mvn&lt;/code&gt; to your .gitignore!
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Spring Boot Snippets</title>
      <link>https://www.hascode.com/spring-boot-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/spring-boot-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_define_and_configure_log_groups&#34;&gt;Define and Configure Log Groups&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
This allows to configure a group of loggers at the same time
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Define a log group named &lt;code&gt;myaspect&lt;/code&gt; with two packages&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;application.properties&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;logging.group.myaspect=com.hascode.package1,com.hascode.package2&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure the log group and set all loggers to level &lt;code&gt;TRACE&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;application.properties&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;logging.level.myaspect=TRACE&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;This is also possible as parameter on startup&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;java -Dlogging.level.myaspect=TRACE myapp.jar&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_use_junit_5_with_spring_boot&#34;&gt;Use JUnit 5 with Spring Boot&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Use newer versions of Surefire and Failsafe plugins:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;properties&amp;gt;
[..]
  &amp;lt;maven-failsafe-plugin.version&amp;gt;2.22.0&amp;lt;/maven-failsafe-plugin.version&amp;gt;
  &amp;lt;maven-surefire-plugin.version&amp;gt;2.22.0&amp;lt;/maven-surefire-plugin.version&amp;gt;
&amp;lt;/properties&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
