<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Chandra Guntur on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/author/c-guntur/</link><description>Articles written by Chandra Guntur on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 10 Dec 2021 12:31:03 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/author/c-guntur/index.xml" rel="self" type="application/rss+xml"/><item><title>JUnit 5 Display Names</title><link>https://foojayio.github.io/website/today/junit-5-display-names/</link><pubDate>Fri, 10 Dec 2021 12:31:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/junit-5-display-names/</guid><description>&lt;p&gt;In &lt;a href="https://foojayio.github.io/website/today/junit-5-introduction/"&gt;Part 1&lt;/a&gt;
 of this series, we looked at several annotations used in JUnit 5. We covered test methods as well as lifecycle methods.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://foojayio.github.io/website/today/junit-5-testing-basics/"&gt;Part 2&lt;/a&gt;
, we looked at the basics of testing using JUnit 5. We covered test annotations such as marking a test method and asserting. We saw how a test method could be tagged and how assumptions can be used. We finally wrapped up with test execution ordering mechanisms.&lt;/p&gt;</description></item><item><title>JUnit 5 Testing Basics</title><link>https://foojayio.github.io/website/today/junit-5-testing-basics/</link><pubDate>Fri, 03 Dec 2021 12:29:06 +0000</pubDate><guid>https://foojayio.github.io/website/today/junit-5-testing-basics/</guid><description>&lt;p&gt;In &lt;a href="https://foojayio.github.io/website/today/junit-5-introduction/"&gt;Part 1&lt;/a&gt;
 of this series of articles, we looked at several annotations used in JUnit5. We covered test methods as well as lifecycle methods.&lt;/p&gt;
&lt;p&gt;This article will share examples of a JUnit test which makes use of a few of these annotations.&lt;/p&gt;
&lt;h2 id="h2-0-testing"&gt;Testing&lt;/h2&gt;
&lt;h3 id="h3-1-marking-a-method-as-a-test"&gt;Marking a method as a Test&lt;/h3&gt;
&lt;p&gt;Tests in JUnit5 are annotated with the &lt;strong&gt;@Test&lt;/strong&gt; annotation. &lt;em&gt;Unlike prior versions of JUnit, the JUnit5 &lt;code&gt;@Test&lt;/code&gt; annotation does not have any attributes. Prior versions supported extensions via attributes, while JUnit5 fosters a custom annotation based extension&lt;/em&gt; (more on this in a future article).&lt;/p&gt;</description></item><item><title>JUnit 5 Introduction</title><link>https://foojayio.github.io/website/today/junit-5-introduction/</link><pubDate>Fri, 26 Nov 2021 15:22:59 +0000</pubDate><guid>https://foojayio.github.io/website/today/junit-5-introduction/</guid><description>&lt;p&gt;Code Katas are a great way of teaching programming practices. The effectiveness of a code kata is to &amp;ldquo;solve&amp;rdquo; something repeatedly in order to gain a &amp;ldquo;muscle memory&amp;rdquo; of sorts on the subject matter.&lt;/p&gt;
&lt;p&gt;Nothing stresses repeatability more than unit tests. Code Katas thus, in many cases can be associated with or run via unit tests.&lt;/p&gt;
&lt;p&gt;Many of us have been long used to JUnit 4 as a formidable unit testing framework. This article is not going to be a comparison between JUnit 4 and JUnit 5, but you will notice some differences as italicized text.&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 9): Versions in Maven</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-9-versions-in-maven/</link><pubDate>Sat, 20 Nov 2021 11:40:35 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-9-versions-in-maven/</guid><description>&lt;p&gt;In the final part, Part 9 of the series, versions in Maven are covered!&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://foojayio.github.io/website/today/understanding-apache-maven-part-3-maven-coordinates-pom-inheritance/"&gt;Part 3&lt;/a&gt;
, version schemes in Maven were briefly covered. A quick recap: a version is a string that uniquely identifies a set of changes made to the project. Maven &lt;strong&gt;does not understand version schemes&lt;/strong&gt; and &lt;strong&gt;cannot compare versions&lt;/strong&gt; using numeric (or alphanumeric) comparisons. Some plugins may build additional intelligence for such.&lt;/p&gt;
&lt;p&gt;Maven uses the &lt;strong&gt;version as a coordinate&lt;/strong&gt; in identifying an artifact.&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 8): Maven Plugins</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-8-maven-plugins/</link><pubDate>Fri, 12 Nov 2021 13:34:48 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-8-maven-plugins/</guid><description>&lt;p&gt;In Part 8 of the series, below, a deeper dive on Maven Plugins is covered.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://foojayio.github.io/website/today/understanding-apache-maven-part-4-maven-lifecycle/"&gt;Part 4&lt;/a&gt;
, Maven Lifecycles and Phases were introduced. A brief overview of Plugins and Goals were also included.&lt;/p&gt;
&lt;p&gt;A quick recap:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Apache Maven provides standard &lt;strong&gt;lifecycles&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lifecycles&lt;/strong&gt; have &lt;strong&gt;phases&lt;/strong&gt; that execute sequentially.&lt;/li&gt;
&lt;li&gt;Execution of maven is done via &lt;strong&gt;plugins&lt;/strong&gt; which define &lt;strong&gt;goals&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Goals&lt;/strong&gt; can be associated with &lt;strong&gt;phases&lt;/strong&gt; (or may simply be run independent of phases).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="h2-0-what-are-plugins"&gt;What are plugins?&lt;/h2&gt;
&lt;p&gt;Maven is a plugin-execution framework. Plugins are an assembly of goals, code written as MOJOs (&lt;em&gt;Maven&amp;rsquo;s plain Old Java Objects, Modern MOJOs are not restricted to being written in Java&lt;/em&gt;). Goals have names and can be bound to phases. A MOJO declares its goal name and optionally, a phase association, which binds the class to a part of a lifecycle.
&lt;img src="https://cgunturme.files.wordpress.com/2020/07/mavenplugins.png?w=1024" alt="Image displays a plugin-lifecycle relationship. Plugins define goals. Goals can be bound to phases. Goals from multiple plugins can be bound to a single phase." loading="lazy"&gt;
 Plugins define goals. Goals can be bound to phases. Goals from multiple plugins can be bound to a single phase.&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 7): Configuring Apache Maven</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-7-configuring-apache-maven/</link><pubDate>Fri, 05 Nov 2021 16:51:36 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-7-configuring-apache-maven/</guid><description>&lt;p&gt;In this, &lt;a href="https://foojayio.github.io/website/today/author/c-guntur/"&gt;part 7 of the series&lt;/a&gt;
, various means of configuring Apache Maven are covered!&lt;/p&gt;
&lt;h2 id="h2-0-why-configure-apache-maven"&gt;Why Configure Apache Maven?&lt;/h2&gt;
&lt;p&gt;Over several parts in this series, Maven was touted to be &lt;em&gt;&lt;strong&gt;convention-over-configuration&lt;/strong&gt;&lt;/em&gt;. Maven assumes defaults and allows for overrides where possible.&lt;/p&gt;
&lt;p&gt;However, Maven can depend on constraints external to what is packaged. Examples include &lt;strong&gt;&lt;em&gt;the&lt;/em&gt; &lt;em&gt;JDK to use&lt;/em&gt;&lt;/strong&gt; (assuming there are several JDKs on the computing device), &lt;strong&gt;the flags to set (memory, garbage collection flags for tests etc.)&lt;/strong&gt; , &lt;em&gt;&lt;strong&gt;system / environment variables&lt;/strong&gt;&lt;/em&gt; , &lt;em&gt;&lt;strong&gt;repository information&lt;/strong&gt;&lt;/em&gt; , &lt;em&gt;&lt;strong&gt;extensions to Maven&lt;/strong&gt;&lt;/em&gt; and so on.&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 6): POM Reference</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-6-pom-reference/</link><pubDate>Fri, 29 Oct 2021 08:20:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-6-pom-reference/</guid><description>&lt;p&gt;In Part 6 &lt;a href="https://foojayio.github.io/website/today/author/c-guntur/"&gt;of the series&lt;/a&gt;
, a walkthrough of POM content (XML) is covered!&lt;/p&gt;
&lt;p&gt;This article is not meant for a full dissection of a &lt;code&gt;pom.xml&lt;/code&gt;, since the Apache Maven doc does the job so well that anything else written will at best be a copy of that content. It is strongly recommended to peruse the linked doc below.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Excellent documentation of a &lt;code&gt;pom.xml&lt;/code&gt; on the Apache Maven site: &lt;a href="https://maven.apache.org/ref/3.6.3/maven-model/maven.html" target="_blank" rel="noopener noreferrer"&gt;https://maven.apache.org/ref/3.6.3/maven-model/maven.html&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 5): Dependencies in Maven</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-5-dependencies-in-maven/</link><pubDate>Fri, 22 Oct 2021 20:48:59 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-5-dependencies-in-maven/</guid><description>&lt;p&gt;In this, &lt;a href="https://foojayio.github.io/website/today/author/c-guntur/"&gt;part 5 of the series&lt;/a&gt;
, a walkthrough of the topic of Maven dependencies is covered!&lt;/p&gt;
&lt;h2 id="h2-0-what-are-dependencies"&gt;What are dependencies&lt;/h2&gt;
&lt;p&gt;Dependencies are the basic building blocks of a Maven project.&lt;/p&gt;
&lt;p&gt;Imagine writing code that requires logging output or using String utilities or parsing JSON text. The logic can be coded into the project&amp;hellip; or a library can be used. Most of the time, it makes sense to harness an existing library to minimize the amount of code needed. This also encourages reuse.&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 4): Maven Lifecycle</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-4-maven-lifecycle/</link><pubDate>Fri, 08 Oct 2021 09:00:35 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-4-maven-lifecycle/</guid><description>&lt;p&gt;In Part 4 of the series, a walkthrough of the Maven lifecycles and executions is covered.&lt;/p&gt;
&lt;p&gt;Apache Maven executions are tied to &lt;strong&gt;lifecycles&lt;/strong&gt;. A lifecycle groups a sequence of activities. Maven provides three basic lifecycles for its standard build management. More lifecycles can be created as needed, though that is a rare need. There are three standard lifecycles provided by Maven.&lt;/p&gt;
&lt;h2 id="h2-0-standard-lifecycles"&gt;Standard lifecycles&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;clean&lt;/strong&gt; &amp;ndash; Intended for clean-up of any prior build-managed outputs and artifacts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;default (build)&lt;/strong&gt; &amp;ndash; Intended for project build, test and deployment of artifacts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;site&lt;/strong&gt; &amp;ndash; Intended for project site documentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="h3-1-what-s-in-a-lifecycle"&gt;What&amp;rsquo;s in a lifecycle?&lt;/h3&gt;
&lt;p&gt;A lifecycle is a collection of related activities pertaining to a specific type of build-management. Standard lifecycles include generation of build output artifacts, creation of a documentation site as well as cleaning any artifacts produced from a prior execution.&lt;/p&gt;</description></item><item><title>Understanding Apache Maven: Maven Coordinates &amp; POM Inheritance</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-3-maven-coordinates-pom-inheritance/</link><pubDate>Fri, 01 Oct 2021 10:05:15 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-3-maven-coordinates-pom-inheritance/</guid><description>&lt;p&gt;In Part 3 of the series, an explanation of dependency coordinates and &amp;ldquo;distinguishers&amp;rdquo; as well as a more detailed look at POM hierarchies are covered.&lt;/p&gt;
&lt;h2 id="h2-0-what-are-dependency-coordinates"&gt;What are dependency coordinates?&lt;/h2&gt;
&lt;p&gt;There are hundreds or thousands of projects that produce artifacts. Some such artifacts can potentially be used in a current project as libraries. For instance, a project may depend on a logging framework or a JSON library. It is possible to host many such dependency artifacts on a central repository. Maven&amp;rsquo;s primary such repository is called &lt;strong&gt;Maven Central&lt;/strong&gt;. Many other such repositories also exist. More on this later!&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 2): POM Hierarchy and Effective POM</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-2-pom-hierarchy/</link><pubDate>Fri, 03 Sep 2021 08:57:41 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-2-pom-hierarchy/</guid><description>&lt;p&gt;Following on from &lt;a href="https://foojayio.github.io/website/today/understanding-apache-maven-part-1-the-basics/"&gt;the first article on Maven basics&lt;/a&gt;
, the Project Object Model (POM) is explored, below.&lt;/p&gt;
&lt;h2 id="h2-0-what-is-the-project-object-model"&gt;What is the Project Object Model?&lt;/h2&gt;
&lt;p&gt;First, a maven POM is not a &lt;a href="https://www.pomwonderful.com/" target="_blank" rel="noopener noreferrer"&gt;popular pomegranate juice&lt;/a&gt;
 nor is it related to the colorful &lt;a href="https://www.bing.com/images/search?q=pom&amp;#43;poms" target="_blank" rel="noopener noreferrer"&gt;pom-poms&lt;/a&gt;
. A Maven POM is definitely is wonderful and brings as much joy to a developer as does a pom-pom to a kid.&lt;/p&gt;
&lt;p&gt;A POM describes build management needs of a project:&lt;/p&gt;</description></item><item><title>Understanding Apache Maven (Part 1): The Basics</title><link>https://foojayio.github.io/website/today/understanding-apache-maven-part-1-the-basics/</link><pubDate>Fri, 27 Aug 2021 09:52:13 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-apache-maven-part-1-the-basics/</guid><description>&lt;p&gt;Apache Maven (commonly referred to as &amp;ldquo;Maven&amp;rdquo;) is a &lt;strong&gt;Build Management&lt;/strong&gt; tool. Maven is primarily used to build Java projects. Other language projects can also be built using Maven. Apache Maven is written in Java, for the most part. It is &lt;a href="https://maven.apache.org/" target="_blank" rel="noopener noreferrer"&gt;an open source project&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Maven follows a &lt;strong&gt;convention-over-configuration&lt;/strong&gt; philosophy. More on this follows.&lt;/p&gt;
&lt;h3 id="block-26a619e1-4ead-4d98-9783-d0af7673e045"&gt;Why is Maven a Build Management tool?&lt;/h3&gt;
&lt;p&gt;Maven aims at achieving the following for a project:&lt;/p&gt;</description></item></channel></rss>