Saturday, November 5, 2022

Jib Maven Plugin, Docker Desktop, Containers

In order to try and get my Spring Boot App running in a container, next step was installing Docker Desktop and looking at Jib Maven Plugin, which was created by Google.

It seems have been created to support pushing Containers to Google Container Registry (GCR), but also has first class support for:

  •  Amazon Elastic Container Registry (ECR)
  • Azure Container Registry (ACR) 
  • JFrog Artifactory
  • Docker Hub

As of today (2022-11-05), the latest version is 3.3.1.  

I went to the GitHub Readme Page for Jib Maven Plugin documentation: and tried running the command-line quickstart to build to my Docker Daemon running on my dev machine:

./mvnw compile -Dimage=demo-test-app

running the command-line quickstart to build to my Docker Daemon running on my dev machine.

I did this and verified that I could see the Docker Image in Docker Desktop (a bit confused on the "Created" date being 53 years ago lol, but that's a different mystery to solve later).

Git Commit ID Maven Plugin

I found this plugin recently and absolutely love it: git-commit-id-maven-plugin

It generates a properties file (can select format, I use properties instead of json) under target/classes directory. 

Here is the setup I am using on my home demo project:


The best way to make use of this plugin is to run it without the includeOnlyProperties section and see all the git information it generates.

From there, figure out which properties you actually want, and add the includeOnlyProperties section and specify just those properties.

AWS, Docker, ECR, ECS and Spring Boot weekend fun (Part 1)

It's a lovely, foggy Saturday. Perfect time to start digging into AWS.  

I figured I would try and get a demo/Hello World Spring Boot App running inside a Docker Container, push the Docker Image up to ECR and try and get it running in Amazon Fargate and blog my experience.

1. Amazon Corretto.  I have a slightly-outdated version of Amazon's OpenJDK 17 running on my home Dev machine.

c:\>java -version
openjdk version "17.0.1" 2021-10-19 LTS
OpenJDK Runtime Environment Corretto- (build 17.0.1+12-LTS)
OpenJDK 64-Bit Server VM Corretto- (build 17.0.1+12-LTS, mixed mode, sharing)

I guess I could run on this, but decided to get the latest.  cURL command to get the latest AmazonCorretto JDK for Windows:

curl -LO

At home I run WSL2 on my Windows Dev machine.  I have a MacBook Pro also and jump between the 2 of them for personal development.

(don't forget to run a checksum to make sure the file was not tampered with, this actually saved me once)

I then manually went to and verified that the SHA-256 checksum is the same:


After unzipping and setting up JAVA_HOME and Windows Path:

c:\>java -version
openjdk version "17.0.5" 2022-10-18 LTS
OpenJDK Runtime Environment Corretto- (build 17.0.5+8-LTS)
OpenJDK 64-Bit Server VM Corretto- (build 17.0.5+8-LTS, mixed mode, sharing)

2. Spring Initializr + IntelliJ

I bought a JetBrains All Products Pack earlier this week (previously had been using IntelliJ CE + VS Code for Java + Angular personal development).

IntelliJ Ultimate Edition has great support for Spring Initializr.

Here I am creating a new Spring Boot JAR project, specifying the Amazon Corretto JDK 17 that I just installed.

And selecting Spring Boot Starters (Spring Web, Spring Boot Actuator).

3. Since my goal this weekend is to study and learn about various aspects of AWS, I just need a quick and dirty Spring Boot App that exposes a REST endpoint.

I went to and copied over the HelloWorldController and Greeting model, ran it locally through IntelliJ and verified I could hit the REST endpoint on port 8080.

4. Confirmed I could run through IDE and hit the REST endpoint.

Also built the Spring Boot JAR and confirmed I could run that and hit the REST endpoint:

PS C:\work\spring-boot-aws\demo> ./mvnw package  
PS C:\work\spring-boot-aws\demo> java -jar .\target\demo-0.0.1-SNAPSHOT.jar

Sunday, May 22, 2022


I've started learning ReactJS.  

Reading through React JS Foundations

I'm coming from years of Angular development, both professional and personally (TypeScript Angular, but AngularJS 1.x before that). 

The toolchain ... Node.js, NPM, NPX, node_modules all are good commonalities across both frameworks. 

However, React feels much "closer to the rails" than Angular.  In the first Hello World example, I'm already going at the DOM by way of document.querySelector. 

Monday, October 30, 2017

The most productive of evenings

It has been an extremely productive evening, both on the code front and on the DevOps front.


I had a bug where I was clearing a div and then attempting to repopulate it.  For the life of me, I could not get it to populate any HTML after calling jQuery's empty() function.


    function removeAllSections() {
        var agendaId = $('#AgendaId').val();
                "agendaId": agendaId
            function () {
                var agendaDiv = $("[name='agenda-nestable']");
            }, "json");

Oh, haha, silly me. The div contains an ol, and I was clearing the contents of the div, and then attempting to add list elements to an ol that did not exist. Fixed:

    function removeAllSections() {
        var agendaId = $('#AgendaId').val();
                "agendaId": agendaId
            function () {
                var agendaRoot = $("[name='agenda-nestable'] ol#agenda-root");
            }, "json");

On the DevOps front, I was wondering why my Razor Views take so long to load, even with Azure "Always On" enabled.

Well, tonight I found this beauty:

(then click Configure link)

Boom, precompiled Razor CSHTML views stored in their own Managed Assembly.  

Things are running much faster now!!!  No more initial page load taking forever (while the .cshtml compiles).  

Friday, September 8, 2017

Govern CMS EDMX Diagram

I'm making good progress on my new Government Content Management System (Govern CMS).

Probably have another 1-2 weeks of development before I have a minimum viable product.

Here is my Entity Framework EDMX for that System:

Thursday, September 7, 2017

HTML Helpers - ASP.NET MVC's equivalent of JSTL Custom Taglibs

I have found the equivalent of Java's JSTL Custom Taglibs: HTML Helpers.

I started moving logic out of my Razor Views and into HTML Helper classes.

Here's my first, and it's a beauty (uses recursion to build out nested lists):

    public static class CategoryExtensions
        public static IHtmlString CategoryDisplay(this HtmlHelper helper, IEnumerable categories, int indentSize)
            string indentString = "";
            for (int i = 0; i < indentSize; i++)
                indentString += " ";
            StringBuilder stringBuilder = new StringBuilder();
\n"); stringBuilder.Append(BuildList(categories, indentString)); stringBuilder.Append(indentString).Append("
"); return new HtmlString(stringBuilder.ToString()); } private static IHtmlString BuildList(IEnumerable categories, string indentString) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(indentString).Append("
    \n"); foreach (Category category in categories) { stringBuilder.Append(indentString).Append("
  1. \n"); stringBuilder.Append(indentString).Append("
    \n"); stringBuilder.Append(indentString).Append(" " + category.CategoryName + "\n"); stringBuilder.Append(indentString).Append("
    \n"); if (category.SubCategories.Any()) { indentString += " "; stringBuilder.Append(BuildList(category.SubCategories, indentString)); } stringBuilder.Append(indentString).Append("
  2. \n"); } stringBuilder.Append(indentString).Append("
\n"); return new HtmlString(stringBuilder.ToString()); } }
I'm glad to get the logic out of the Razor views (which should not have such complex logic) and into proper C# classes.