From da0c3d8d5f14cd4c896ba93b35b698f14eecbef5 Mon Sep 17 00:00:00 2001 From: Maurits Silvis Date: Fri, 6 Oct 2023 16:09:47 +0200 Subject: [PATCH 01/89] Improve the readability of parent project references --- java/executable-jar-maven-intellij/README.md | 2 +- java/java-project-cli/README.md | 6 +++--- java/java-project-intellij/README.md | 6 +++--- java/java-project-maven-intellij/README.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/java/executable-jar-maven-intellij/README.md b/java/executable-jar-maven-intellij/README.md index 423c027..f9730f1 100644 --- a/java/executable-jar-maven-intellij/README.md +++ b/java/executable-jar-maven-intellij/README.md @@ -4,7 +4,7 @@ ## Introduction -With this part of the [Challenges](../..) > [Java](..) project, I provide the code and settings for a project that can create an executable JAR using Maven and IntelliJ IDEA. +With this part of the [Java challenges](..) project, I provide the code and settings for a project that can create an executable JAR using Maven and IntelliJ IDEA. Below, I give [background information](#1-background) on the project's [code](#11-java), [IntelliJ IDEA's configuration](#12-intellij-idea) and the used [Maven configuration](#13-maven). I also detail some [issues](#2-issues-and-solutions) that can occur when creating an executable JAR using Maven, for which I provide possible solutions. diff --git a/java/java-project-cli/README.md b/java/java-project-cli/README.md index 7c10bfe..22e32b2 100644 --- a/java/java-project-cli/README.md +++ b/java/java-project-cli/README.md @@ -4,21 +4,21 @@ ## Introduction -With this part of the [Challenges](../..) > [Java](..) project, I provide the code and settings for a Java project, set up using the command line. +With this part of the [Java challenges](..) project, I provide the code and settings for a Java project, set up using the command line. Below, I give detailed [background information](#1-background) on the project's [code](#11-java). In addition, I list several [issues](#2-issues-and-solutions) that can occur when setting up a Java project. I also describe solutions to these issues. Listed commands can, for example, be executed using Bash. -I describe this command-line interface in the [Bash section](../#22-bash) of the [Challenges](../..) > [Java](..) project. +I describe this command-line interface in the [Bash section](../#22-bash) of the [Java challenges](..) project. ## 1. Background ### 1.1 Java This project makes use of Java. -I describe this programming language in the [Java section](../#21-java) of the [Challenges](../..) > [Java](..) project. +I describe this programming language in the [Java section](../#21-java) of the [Java challenges](..) project. #### 1.1.1 Code diff --git a/java/java-project-intellij/README.md b/java/java-project-intellij/README.md index ed70290..1dc031e 100644 --- a/java/java-project-intellij/README.md +++ b/java/java-project-intellij/README.md @@ -4,7 +4,7 @@ ## Introduction -With this part of the [Challenges](../..) > [Java](..) project, I provide the code and settings for a Java project set up using IntelliJ IDEA. +With this part of the [Java challenges](..) project, I provide the code and settings for a Java project set up using IntelliJ IDEA. Below, I give [background information](#1-background) on the project's [code](#11-java) and [IntelliJ IDEA's configuration](#12-intellij-idea). @@ -13,7 +13,7 @@ Below, I give [background information](#1-background) on the project's [code](#1 ### 1.1 Java This project makes use of Java. -I describe this programming language in the [Java section](../#21-java) of the [Challenges](../..) > [Java](..) project. +I describe this programming language in the [Java section](../#21-java) of the [Java challenges](..) project. #### 1.1.1 Code @@ -31,7 +31,7 @@ public class Main { ### 1.2 IntelliJ IDEA -This project is set up using IntelliJ IDEA (see, e.g., the [IntelliJ IDEA section](../#23-intellij-idea) of the [Challenges](../..) > [Java](..) project). +This project is set up using IntelliJ IDEA (see, e.g., the [IntelliJ IDEA section](../#23-intellij-idea) of the [Java challenges](..) project). The used IntelliJ IDEA configuration is described in what follows. diff --git a/java/java-project-maven-intellij/README.md b/java/java-project-maven-intellij/README.md index e4b2a6f..d04d358 100644 --- a/java/java-project-maven-intellij/README.md +++ b/java/java-project-maven-intellij/README.md @@ -4,7 +4,7 @@ ## Introduction -With this part of the [Challenges](../..) > [Java](..) project, I provide the code and settings for a Java project set up using Maven and IntelliJ IDEA. +With this part of the [Java challenges](..) project, I provide the code and settings for a Java project set up using Maven and IntelliJ IDEA. Below, I give detailed [background information](#1-background) on the project's [code](#11-java), [IntelliJ IDEA's configuration](#12-intellij-idea) and the used [Maven configuration](#13-maven). I also describe several [issues](#2-issues-and-solutions) that can occur when setting up a Maven project, for which I provide possible solutions. @@ -45,7 +45,7 @@ Note that execution of the JAR will [fail](#24-maven-jar-plugin-issues). ### 1.3 Maven -This Java project is managed and built using Maven (see, e.g., the [Maven section](../#24-maven) of the [Challenges](../..) > [Java](..) project). +This Java project is managed and built using Maven (see, e.g., the [Maven section](../#24-maven) of the [Java challenges](..) project). The Maven configuration of the current project is detailed in what follows. From 8e977ee1d009835c8689c26be0e4031345e21273 Mon Sep 17 00:00:00 2001 From: Maurits Silvis Date: Sun, 8 Oct 2023 13:49:28 +0200 Subject: [PATCH 02/89] Update the keep a changelog version --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 723d111..0d48119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the [Challenges](https://github.com/mauritssilvis/challenges) project are documented in this file. -The file format is based on [keep a changelog](https://keepachangelog.com/en/1.0.0/), +The file format is based on [keep a changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html). ## [0.3.1] - 2023-09-16 From 379153c0fad19a49a15cc74b8d284fe09204e59a Mon Sep 17 00:00:00 2001 From: Maurits Silvis Date: Mon, 9 Oct 2023 16:52:08 +0200 Subject: [PATCH 03/89] Add a list of solved challenges to the top-level readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 1abf2c8..4f14dd3 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ Currently, solutions to common programming challenges are available for the foll - [Java](java) +Specifically, I solved the following challenges: + +- [Setting up a Java project using the command line](java/java-project-cli) +- [Setting up a Java project using IntelliJ IDEA](java/java-project-intellij) +- [Setting up a Java project using Maven and IntelliJ IDEA](java/java-project-maven-intellij) +- [Creating an executable JAR using Maven and IntelliJ IDEA](java/executable-jar-maven-intellij) + ## License Copyright © 2021–2023 Maurits Silvis From ff4d03176e32ed96aab093982cc0d4060bad45e9 Mon Sep 17 00:00:00 2001 From: Maurits Silvis Date: Mon, 9 Oct 2023 17:31:18 +0200 Subject: [PATCH 04/89] Add a Git attributes file --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0a0f148 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# https://help.github.com/articles/dealing-with-line-endings/ +* text eol=lf + +*.bat text eol=crlf From 6171279bd08b70a20a42367f33f282d40fa851c8 Mon Sep 17 00:00:00 2001 From: Maurits Silvis Date: Mon, 9 Oct 2023 17:40:28 +0200 Subject: [PATCH 05/89] Add IntelliJ IDEA inspections --- .../.idea/inspectionProfiles/All.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/java/java-project-intellij/.idea/inspectionProfiles/All.xml b/java/java-project-intellij/.idea/inspectionProfiles/All.xml index a2b8fc5..bcdaa4a 100644 --- a/java/java-project-intellij/.idea/inspectionProfiles/All.xml +++ b/java/java-project-intellij/.idea/inspectionProfiles/All.xml @@ -202,6 +202,8 @@ + + @@ -215,6 +217,7 @@ + @@ -247,6 +250,7 @@ + @@ -362,6 +366,7 @@ + @@ -514,7 +519,6 @@ - @@ -640,6 +644,7 @@ + @@ -655,7 +660,6 @@ - @@ -681,7 +685,6 @@ -