diff --git a/_clojure_jvm/02_basic_java.md b/_clojure_jvm/02_basic_java.md index 61ca875..d9139d1 100644 --- a/_clojure_jvm/02_basic_java.md +++ b/_clojure_jvm/02_basic_java.md @@ -8,7 +8,7 @@ Interfaces can declare any number of super-interfaces, along with methods that i __Hello.java__ {% highlight java %} -{% include code/basic_java/Hello.java %} +{% include code/basic_java/Hello.java -%} {% endhighlight %} This defines a class `Hello` in the package `test`. This class contains a single static `main` method which writes a short message to the console. @@ -78,7 +78,7 @@ disk. They can be loaded from the network, a database or defined dynamically dep core Java classes and loads them as required. Older JVMs (before version 9) did ship core Java classes in a Java archive. This was usually located at `jre/lib/rt.jar` within the JVM distribution. The bootstrap class loader -was additionally configured with a 'bootstrap classpath' containing this core archive. Since the advent of Java modules in Java 9, core classes are distributed in a more efficient +was additionally configured with a 'bootstrap classpath' containing this core archive. Since the advent of Java modules in Java 9, core classes are distributed in a more efficient format. You can tell the `java` command to log more information on the class loading process with the `-verbose` option. diff --git a/_clojure_jvm/03_class_files.md b/_clojure_jvm/03_class_files.md index 6cba6db..3fabd7b 100644 --- a/_clojure_jvm/03_class_files.md +++ b/_clojure_jvm/03_class_files.md @@ -8,7 +8,7 @@ Here's the simple Java class from the previous chapter: __Hello.java__ {% highlight java %} -{% include code/basic_java/Hello.java %} +{% include code/basic_java/Hello.java -%} {% endhighlight %} When compiled with `javac`: @@ -18,7 +18,7 @@ When compiled with `javac`: it creates a `test/Hello.class` file in the current directory. Opening this file with `javap` shows a brief summary of the `test.Hello` class: ``` -{% include code/basic_java/hello_summary %} +{% include code/basic_java/hello_summary -%} ``` The `.class` file contains all the information required to load the class and execute its methods. The full contents of the file can be displayed @@ -29,7 +29,7 @@ using the `-verbose` option: This shows much more detail: ``` -{% include code/basic_java/hello_full %} +{% include code/basic_java/hello_full -%} ``` The format of `.class` files is described in full in the [JVM specification](https://docs.oracle.com/javase/specs/jvms/se20/html/jvms-4.html). @@ -54,7 +54,7 @@ Note `.class` files are stored in big-endian order which may differ from the arc od --endian=big -x test/Hello.class ``` -{% include code/basic_java/hello_dump %} +{% include code/basic_java/hello_dump -%} ``` ## Version number @@ -63,7 +63,7 @@ The first information displayed by `javap` is the major and minor version of the which means it is only supported by versions 14 or higher of the JVM. Attempting to load this class on an older version of the JVM will result in an error e.g. ``` -{% include code/basic_java/version_error %} +{% include code/basic_java/version_error -%} ``` ## Class properties @@ -78,7 +78,7 @@ code. These names and their types are recorded in the constant pool. ### Binary names -The format of binary names within `.class` files differs slightly from those in `.java` files. The `.` separator used by Java is replaced within `.class` files. +The format of binary names within `.class` files differs slightly from those in `.java` files. The `.` separator used by Java is replaced within `.class` files. For example the class `java.lang.Object` will be refered to as `java/lang/Object` within class files. ### Descriptors diff --git a/_clojure_jvm/04_jar_files.md b/_clojure_jvm/04_jar_files.md index 29d554d..f823dd7 100644 --- a/_clojure_jvm/04_jar_files.md +++ b/_clojure_jvm/04_jar_files.md @@ -22,24 +22,24 @@ After some back-and-forth, we settle on defining interfaces for sources and dest __src/libhello/MessageSource.java__ ``` java -{% include code/jar/src/libhello/MessageSource.java %} +{% include code/jar/src/libhello/MessageSource.java -%} ``` __src/libhello/MessageSink.java__ ``` java -{% include code/jar/src/libhello/MessageSink.java %} +{% include code/jar/src/libhello/MessageSink.java -%} ``` In addition, we define a source of messages read from the command-line, and a sink which writes messages to a `PrintStream`: __src/libhello/CommandLineMessageSource.java__ ```java -{% include code/jar/src/libhello/CommandLineMessageSource.java %} +{% include code/jar/src/libhello/CommandLineMessageSource.java -%} ``` __src/libhello/PrintStreamMessageSink.java__ ```java -{% include code/jar/src/libhello/PrintStreamMessageSink.java %} +{% include code/jar/src/libhello/PrintStreamMessageSink.java -%} ``` We compile these classes as usual and output the corresponding class files to the `libhello` directory: @@ -62,7 +62,7 @@ This shows the archive contains the `.class` files as their expected locations o This file is called the _manifest_ file and is described [below](#manifest-files). ``` -{% include code/jar/jar_list %} +{% include code/jar/jar_list -%} ``` Note that JAR files are also zip files, so their contents can be listed with the `unzip` command: @@ -73,7 +73,7 @@ Now we have build our library, we can re-write our application to use it: __src/app/Echo.java__ ```java -{% include code/jar/src/app/Echo.java %} +{% include code/jar/src/app/Echo.java -%} ``` As before, we compile it with `javac`. Since the application references the classes in `libhello.jar`, we have to place it on the classpath @@ -89,7 +89,7 @@ available by adding the jar file to the classpath. We also add the build output As expected, the application reads each message from the command line and writes it to the console ``` -{% include code/jar/app_output %} +{% include code/jar/app_output -%} ``` Of course we should also create a JAR for the application: @@ -113,7 +113,7 @@ The `jar` tool can be used to extract the contents of the default manifest file: this is fairly minimal by default: ``` -{% include code/jar/default_manifest.mf %} +{% include code/jar/default_manifest.mf -%} ``` There are two additional manifest properties we would like to set when building the application JAR: @@ -125,7 +125,7 @@ We can add these properties to a file to be added to the manifest when building __echo-manifest.mf__ ``` -{% include code/jar/echo-manifest.mf %} +{% include code/jar/echo-manifest.mf -%} ``` > jar --create --file echo.jar --manifest=echo-manifest.mf -C classes/app . @@ -154,7 +154,7 @@ since all classes are contained within the new JAR. __uber-manifest.mf__ ``` -{% include code/jar/uber-manifest.mf %} +{% include code/jar/uber-manifest.mf -%} ``` We can now build the new JAR: diff --git a/_clojure_jvm/05_dependencies.md b/_clojure_jvm/05_dependencies.md index c56ecd8..f8efd65 100644 --- a/_clojure_jvm/05_dependencies.md +++ b/_clojure_jvm/05_dependencies.md @@ -23,7 +23,7 @@ After a frenetic caffeine-fueled 10-hour coding session, we finally have our new __src/libhello/JSONMessageSource.java__ ``` -{% include code/java_dependencies/JSONMessageSource.java %} +{% include code/java_dependencies/JSONMessageSource.java -%} ``` As before, we compile the library, updating the build classpath to include the dependency JAR: @@ -35,12 +35,12 @@ We write a small test application and data file for the new source __EchoJSON.java__ ```java -{% include code/java_dependencies/EchoJSON.java %} +{% include code/java_dependencies/EchoJSON.java -%} ``` __messages.json__ ```json -{% include code/java_dependencies/messages.json %} +{% include code/java_dependencies/messages.json -%} ``` and run it to check the input messages are displayed as expected: @@ -78,7 +78,7 @@ where JARs can be published and retrieved, along with their dependencies. Maven projects are defined by a Project Object Model (POM) file in XML format called `pom.xml`. This defines all aspects of the project, such as where to find source and test files, build and packaging information, and dependency definitions. All project `pom.xml` files implicitly inherit -from a '[super POM](https://maven.apache.org/ref/3.0.4/maven-model-builder/super-pom.html)' file defined by the Maven distribution. This defines +from a '[super POM](https://maven.apache.org/ref/3.0.4/maven-model-builder/super-pom.html)' file defined by the Maven distribution. This defines the standard layout of a Maven project. ### Dependencies @@ -109,7 +109,7 @@ determined by the artifact packaging type - this is usually `jar` for Java artif #### Maven Central -Maven defines a single repository `central` in the [super POM](https://maven.apache.org/ref/3.0.4/maven-model-builder/super-pom.html). This is located at `http://repo.maven.apache.org/maven2` and it means that Maven +Maven defines a single repository `central` in the [super POM](https://maven.apache.org/ref/3.0.4/maven-model-builder/super-pom.html). This is located at `http://repo.maven.apache.org/maven2` and it means that Maven projects can reference dependencies published to this repository without any further configuration. #### Local repositories @@ -120,7 +120,7 @@ Therefore, version `0.2.6` of the `data.json` JAR would be fetched to `~/.m2/rep ## Maven library development Now that we understand the basics of Maven we can create a project for our library. First we create a directory for the project and set it up in the -standard Maven layout. As defined in the [super POM](https://maven.apache.org/ref/3.0.4/maven-model-builder/super-pom.html), Java source files go under +standard Maven layout. As defined in the [super POM](https://maven.apache.org/ref/3.0.4/maven-model-builder/super-pom.html), Java source files go under `${project.basedir}/src/main/java`. ``` @@ -139,14 +139,14 @@ Our `pom.xml` file defines the coordinates for the library itself along with its **pom.xml** ```xml -{% include code/java_dependencies/maven/pom.xml %} +{% include code/java_dependencies/maven/pom.xml -%} ``` Now we can compile and package the library as a JAR: mvn package -The super POM sets the default build directory to `${project.basedir}/target` and if we look there we can see a `libhello-1.0.0.jar` file has been +The super POM sets the default build directory to `${project.basedir}/target` and if we look there we can see a `libhello-1.0.0.jar` file has been created. This can be installed into our local repository with @@ -174,7 +174,7 @@ json-test/ **pom.xml** ```xml -{% include code/java_dependencies/app/pom.xml %} +{% include code/java_dependencies/app/pom.xml -%} ``` The application POM declares a dependency on the version of the library we want to use. As before the JAR can be built with @@ -207,17 +207,17 @@ during development: mvn exec:java -Dexec.mainClass=test.EchoJSON -Dexec.args="messages.json" -Another option is to build uber JARs using the [Maven shade plugin](https://maven.apache.org/plugins/maven-shade-plugin/index.html). +Another option is to build uber JARs using the [Maven shade plugin](https://maven.apache.org/plugins/maven-shade-plugin/index.html). ## Publishing Now the library and application are working locally, it's time to share the library with our colleagues. Our chief architect is convinced it constitutes a key competitive advantage for the company and is unwilling to unleash it on an unsuspecting public. She arranges for a private -Maven repository to be set up, and our CI process to publish there instead of the Maven Central repository. We advise any teams wishing to use +Maven repository to be set up, and our CI process to publish there instead of the Maven Central repository. We advise any teams wishing to use it to configure the private repository in their application POM files with the following fragment: ```xml -{% include code/java_dependencies/private_repository.xml %} +{% include code/java_dependencies/private_repository.xml -%} ``` ### Repository settings @@ -229,5 +229,5 @@ repository, we just need to configure the credentials to use: **~/.m2/settings.xml** ```xml -{% include code/java_dependencies/settings.xml %} +{% include code/java_dependencies/settings.xml -%} ``` \ No newline at end of file diff --git a/_clojure_jvm/06_common_issues.md b/_clojure_jvm/06_common_issues.md index b718fbc..57c0121 100644 --- a/_clojure_jvm/06_common_issues.md +++ b/_clojure_jvm/06_common_issues.md @@ -58,21 +58,21 @@ This error usually occurs when an application is compiled against one version of **version1/Greeter.java** ```java -{% include code/common_issues/version1/Greeter.java %} +{% include code/common_issues/version1/Greeter.java -%} ``` After some time, a new version of this class is created with a new method: **version2/Greeter.java** ```java -{% include code/common_issues/version2/Greeter.java %} +{% include code/common_issues/version2/Greeter.java -%} ``` An application is created which uses the newer version: **GreetApp.java** ```java -{% include code/common_issues/GreetApp.java %} +{% include code/common_issues/GreetApp.java -%} ``` Compiling both class versions and the application against the newer version @@ -91,7 +91,7 @@ Running with the old version on the classpath results in an error: ``` > java -cp .:version1 GreetApp -{% include code/common_issues/nosuchmethoderror.txt %} +{% include code/common_issues/nosuchmethoderror.txt -%} ``` Some libraries deprecate and subsequently remove methods from classes, so it is possible that diff --git a/_clojure_jvm/07_evaluating_clojure.md b/_clojure_jvm/07_evaluating_clojure.md index 84aac54..61b10ef 100644 --- a/_clojure_jvm/07_evaluating_clojure.md +++ b/_clojure_jvm/07_evaluating_clojure.md @@ -52,7 +52,7 @@ If we define the above namespace **src/org/picosoft/lib_hello/core.clj** ```java -{% include code/evaluating_clojure/src/org/picosoft/lib_hello/core.clj %} +{% include code/evaluating_clojure/src/org/picosoft/lib_hello/core.clj -%} ``` and place it in the appropriate place on the classpath, we can invoke it via `clojure.main` diff --git a/_clojure_jvm/08_compiling_clojure.md b/_clojure_jvm/08_compiling_clojure.md index 1cf48f3..59bb661 100644 --- a/_clojure_jvm/08_compiling_clojure.md +++ b/_clojure_jvm/08_compiling_clojure.md @@ -9,7 +9,7 @@ two classes with `gen-class`: **src/greet.clj** ```clojure -{% include code/compiling_clojure/greet/src/greet.clj %} +{% include code/compiling_clojure/greet/src/greet.clj -%} ``` This can be compiled with the [compile](https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/compile) function. As described in the documentation, @@ -26,12 +26,12 @@ with `javap`: **greet.Greeter** ```java -{% include code/compiling_clojure/Greeter_decompiled.java %} +{% include code/compiling_clojure/Greeter_decompiled.java -%} ``` **greet.main** ```java -{% include code/compiling_clojure/main_decompiled.java %} +{% include code/compiling_clojure/main_decompiled.java -%} ``` The generated class methods simply delegate to Clojure functions with the appropriately-prefixed names. For example the `greet.Greeter` class defines a function prefix @@ -57,12 +57,12 @@ This allows us to write straightforward Clojure code which is compiled into a Ja **src/greet/core.clj** ```clojure -{% include code/compiling_clojure/main/src/greet/core.clj %} +{% include code/compiling_clojure/main/src/greet/core.clj -%} ``` **src/greet/main.clj** ```clojure -{% include code/compiling_clojure/main/src/greet/main.clj %} +{% include code/compiling_clojure/main/src/greet/main.clj -%} ``` This can be compiled and run as before: @@ -81,7 +81,7 @@ the application source files and any compiled classes. As before, we need to def **manifest.mf** ``` -{% include code/compiling_clojure/uberjar/manifest.mf %} +{% include code/compiling_clojure/uberjar/manifest.mf -%} ``` The fat JAR can then be built with diff --git a/_clojure_jvm/09_deps.md b/_clojure_jvm/09_deps.md index 749971c..ced89ee 100644 --- a/_clojure_jvm/09_deps.md +++ b/_clojure_jvm/09_deps.md @@ -9,7 +9,7 @@ classpath to make them all available. The existing Java ecosystem is built around publishing JARs to binary repositories, and, like Java, Clojure code can be packaged into JAR files, whether it has been compiled ahead-of-time or is being distributed as source. Many Clojure libraries are published to the [Clojars](https://clojars.org/) -repository instead of Maven Central. However, since directories can be placed on the classpath, and Clojure code can be located +repository instead of Maven Central. However, since directories can be placed on the classpath, and Clojure code can be located and evaluated directly from source, the extra packaging and publish steps are not necessary for developing Clojure libraries and programs. The [tools.deps](https://github.com/clojure/tools.deps) library is used to declare dependencies from various sources and build the required @@ -18,34 +18,36 @@ classpath for execution. ## Basic example In the previous two chapters, we fetched the required Clojure JARs locally, and added them along with our source directories to the classpath -when executing the program. This can be simplified by using the Clojure CLI and deps. +when executing the program. This can be simplified by using the Clojure CLI and deps. -First install the [Clojure CLI](https://clojure.org/guides/install_clojure) from the instructions on the Clojure site. After installation, running +First install the [Clojure CLI](https://clojure.org/guides/install_clojure) from the instructions on the Clojure site. After installation, running the `clojure` command should start a Clojure REPL: ``` > clojure +Clojure 1.11.1 user=> (+ 1 2) 3 +user=> ``` Now we can create a basic deps project. The structure of the project is defined in a `deps.edn` file in the project root directory. **deps.edn** ```clojure -{% include code/deps/basic/deps.edn %} +{% include code/deps/basic/deps.edn -%} ``` -This declares a dependency on the main `clojure` JAR. This JAR is published to Maven Central so should be resolved as a Maven dependency. +This declares a dependency on the main `clojure` JAR. This JAR is published to Maven Central so should be resolved as a Maven dependency. This JAR and all of its transitive dependencies should be available on the classpath at runtime. The `src` directory should also be placed on the classpath since that is where our application namespaces are defined. Define the main namespace within this directory: **src/greet/main.clj** ```clojure -{% include code/deps/basic/src/greet/main.clj %} +{% include code/deps/basic/src/greet/main.clj -%} ``` -The `clojure` CLI allows us to invoke `clojure.main` with the project classpath with the `-M` option: +The `clojure` CLI allows us to invoke `clojure.main` with the project classpath with the `-M` option: ``` > clojure -M -m greet.main everyone @@ -70,6 +72,7 @@ refered to as the `system` and `user` files. You can find the locations of all t > clojure -Sdescribe {:version "1.11.1.1267" :config-files ["/install/dir/deps.edn", "~/.clojure/deps.edn", "deps.edn"] + ,,,} ``` If you open the first of these (the system project file), you will see it has default settings for the `:paths` and `:deps` properties @@ -80,7 +83,8 @@ If you open the first of these (the system project file), you will see it has de :deps { org.clojure/clojure {:mvn/version "1.11.1"} } - ... + ,,, +} ``` This means we could use these defaults in our project and our project `deps.edn` file could simply contain @@ -94,20 +98,21 @@ This means we could use these defaults in our project and our project `deps.edn` At different points of the development process, you might want to make additional dependencies available or add more directories to the classpath. This can be done by specifying _aliases_ within the project `deps.edn` and supplying them to the `clojure` command where required. For example, during -development, you might want to use [scope capture](https://github.com/vvvvalvalval/scope-capture) to help with debugging at the REPL. This isn't a dependency +development, you might want to use [scope capture](https://github.com/vvvvalvalval/scope-capture) to help with debugging at the REPL. This isn't a dependency of the main application, so shouldn't be distributed with it. You can define a `dev` alias within the project `deps.edn` file **deps.edn** ```clojure -{% include code/deps/aliases/deps.edn %} +{% include code/deps/aliases/deps.edn -%} ``` Then supply it when starting the REPL: ``` > clojure -A:dev +Clojure 1.11.1 user=> (require '[sc.api :as sc]) nil user=> @@ -115,7 +120,7 @@ user=> ## Other dependency sources -The Clojure JARs are published to Maven Central so are declared as Maven dependencies in the previous `deps.edn`. Deps supports other dependency +The Clojure JARs are published to Maven Central so are declared as Maven dependencies in the previous `deps.edn`. Deps supports other dependency types such as Git repositories and local directories. We've decided to improve our greeting application by adding an optional command-line flag to show enthusiasm (or not). We also decided to split the @@ -126,12 +131,12 @@ We define the library first: **lib/deps.edn** ```clojure -{% include code/deps/sources/lib/deps.edn %} +{% include code/deps/sources/lib/deps.edn -%} ``` **lib/src/greet/core.clj** ```clojure -{% include code/deps/sources/lib/src/greet/core.clj %} +{% include code/deps/sources/lib/src/greet/core.clj -%} ``` We decide to use [tools.cli](https://github.com/clojure/tools.cli) for the command-line parsing. We need to use a specific commit for legal reasons, so @@ -139,12 +144,12 @@ add it as a Git dependency rather than depend on the published JAR. This results **main/deps.edn** ```clojure -{% include code/deps/sources/main/deps.edn %} +{% include code/deps/sources/main/deps.edn -%} ``` **main/src/greet/main.clj** ```clojure -{% include code/deps/sources/main/src/greet/main.clj %} +{% include code/deps/sources/main/src/greet/main.clj -%} ``` This can then be run as before: diff --git a/_clojure_jvm/10_tools_build.md b/_clojure_jvm/10_tools_build.md index c7716bc..9e09ada 100644 --- a/_clojure_jvm/10_tools_build.md +++ b/_clojure_jvm/10_tools_build.md @@ -28,14 +28,14 @@ Then define the Java library: **java/src/com/picosoft/greet/Greeter.java** ```java -{% include code/build/java/src/com/picosoft/greet/Greeter.java %} +{% include code/build/java/src/com/picosoft/greet/Greeter.java -%} ``` The main Clojure namespace imports this class for the greet implementation **clojure/src/greet/main.clj** ```clojure -{% include code/build/clojure/src/greet/main.clj %} +{% include code/build/clojure/src/greet/main.clj -%} ``` The Clojure source location needs to be specified in the `deps.edn` file along with the `tools.cli` dependency. There is also @@ -43,14 +43,14 @@ a `build` alias used by our build definition. **deps.edn** ```clojure -{% include code/build/deps.edn %} +{% include code/build/deps.edn -%} ``` Finally our `tools.build` script defines an `uber` task which compiles the Java and Clojure code and packages it into an uberjar. **build.clj** ```clojure -{% include code/build/build.clj %} +{% include code/build/build.clj -%} ``` This task can be invoked with diff --git a/_includes/code/basic_java/Hello.java b/_includes/code/basic_java/Hello.java index f756cd9..7ba9db5 100644 --- a/_includes/code/basic_java/Hello.java +++ b/_includes/code/basic_java/Hello.java @@ -4,4 +4,4 @@ public class Hello { public static void main(String[] args) { System.out.println("Hello world!"); } -} \ No newline at end of file +} diff --git a/_includes/code/common_issues/DumpClasspath.java b/_includes/code/common_issues/DumpClasspath.java index 34980b6..23c016e 100644 --- a/_includes/code/common_issues/DumpClasspath.java +++ b/_includes/code/common_issues/DumpClasspath.java @@ -2,4 +2,4 @@ public class DumpClasspath { public static void main(String[] args) { System.out.println(System.getProperty("java.class.path")); } -} \ No newline at end of file +} diff --git a/_includes/code/common_issues/GreetApp.java b/_includes/code/common_issues/GreetApp.java index 6cf8f18..a2d0922 100644 --- a/_includes/code/common_issues/GreetApp.java +++ b/_includes/code/common_issues/GreetApp.java @@ -2,4 +2,4 @@ public class GreetApp { public static void main(String[] args) { new Greeter().longGreet("world"); } -} \ No newline at end of file +} diff --git a/_includes/code/common_issues/Wait.java b/_includes/code/common_issues/Wait.java index 5a11575..2094893 100644 --- a/_includes/code/common_issues/Wait.java +++ b/_includes/code/common_issues/Wait.java @@ -8,4 +8,4 @@ public static void main(String[] args) { System.out.println("Bye!"); } -} \ No newline at end of file +} diff --git a/_includes/code/common_issues/version1/Greeter.java b/_includes/code/common_issues/version1/Greeter.java index c9e41c4..6737009 100644 --- a/_includes/code/common_issues/version1/Greeter.java +++ b/_includes/code/common_issues/version1/Greeter.java @@ -2,4 +2,4 @@ public class Greeter { public void greet(String who) { System.out.println("Hello " + who + "!"); } -} \ No newline at end of file +} diff --git a/_includes/code/common_issues/version2/Greeter.java b/_includes/code/common_issues/version2/Greeter.java index d744a82..a8925d4 100644 --- a/_includes/code/common_issues/version2/Greeter.java +++ b/_includes/code/common_issues/version2/Greeter.java @@ -6,4 +6,4 @@ public void greet(String who) { public void longGreet(String who) { System.out.println("Hello " + who + ", nice to meet you!"); } -} \ No newline at end of file +} diff --git a/_includes/code/deps/basic/deps.edn b/_includes/code/deps/basic/deps.edn index 04dc717..663e02f 100644 --- a/_includes/code/deps/basic/deps.edn +++ b/_includes/code/deps/basic/deps.edn @@ -1,2 +1,2 @@ -{:deps {org.clojure/clojure {:mvn/version "1.11.1"}} - :paths ["src"]} +{:paths ["src"] + :deps {org.clojure/clojure {:mvn/version "1.11.1"}}} diff --git a/_includes/code/jar/src/app/Echo.java b/_includes/code/jar/src/app/Echo.java index 7137728..2b78fb7 100644 --- a/_includes/code/jar/src/app/Echo.java +++ b/_includes/code/jar/src/app/Echo.java @@ -17,4 +17,4 @@ public static void main(String[] args) { System.err.println("Error processing messages"); } } -} \ No newline at end of file +} diff --git a/_includes/code/jar/src/libhello/CommandLineMessageSource.java b/_includes/code/jar/src/libhello/CommandLineMessageSource.java index c7be4e5..07e2e37 100644 --- a/_includes/code/jar/src/libhello/CommandLineMessageSource.java +++ b/_includes/code/jar/src/libhello/CommandLineMessageSource.java @@ -38,4 +38,4 @@ public Reader next() { } } } -} \ No newline at end of file +} diff --git a/_includes/code/jar/src/libhello/MessageSink.java b/_includes/code/jar/src/libhello/MessageSink.java index 8a5f514..8922d82 100644 --- a/_includes/code/jar/src/libhello/MessageSink.java +++ b/_includes/code/jar/src/libhello/MessageSink.java @@ -5,4 +5,4 @@ public interface MessageSink { void writeMessage(Reader message) throws IOException; -} \ No newline at end of file +} diff --git a/_includes/code/jar/src/libhello/MessageSource.java b/_includes/code/jar/src/libhello/MessageSource.java index c60d4bf..a36f072 100644 --- a/_includes/code/jar/src/libhello/MessageSource.java +++ b/_includes/code/jar/src/libhello/MessageSource.java @@ -5,4 +5,4 @@ public interface MessageSource { Iterable messages() throws IOException; -} \ No newline at end of file +} diff --git a/_includes/code/jar/src/libhello/PrintStreamMessageSink.java b/_includes/code/jar/src/libhello/PrintStreamMessageSink.java index faa7b0a..b79188b 100644 --- a/_includes/code/jar/src/libhello/PrintStreamMessageSink.java +++ b/_includes/code/jar/src/libhello/PrintStreamMessageSink.java @@ -24,4 +24,4 @@ public void writeMessage(Reader message) throws IOException { this.dest.println(); this.dest.flush(); } -} \ No newline at end of file +} diff --git a/_includes/code/java_dependencies/EchoJSON.java b/_includes/code/java_dependencies/EchoJSON.java index cdaebf9..72e9412 100644 --- a/_includes/code/java_dependencies/EchoJSON.java +++ b/_includes/code/java_dependencies/EchoJSON.java @@ -17,4 +17,4 @@ public static void main(String[] args) { System.err.println("Error processing messages"); } } -} \ No newline at end of file +} diff --git a/_includes/code/java_dependencies/JSONMessageSource.java b/_includes/code/java_dependencies/JSONMessageSource.java index 16c5cae..afa8df3 100644 --- a/_includes/code/java_dependencies/JSONMessageSource.java +++ b/_includes/code/java_dependencies/JSONMessageSource.java @@ -52,4 +52,4 @@ public Reader next() { } } } -} \ No newline at end of file +} diff --git a/_includes/code/java_dependencies/app/pom.xml b/_includes/code/java_dependencies/app/pom.xml index 4765d5c..e7005aa 100644 --- a/_includes/code/java_dependencies/app/pom.xml +++ b/_includes/code/java_dependencies/app/pom.xml @@ -12,4 +12,4 @@ 1.0.0 - \ No newline at end of file + diff --git a/_includes/code/java_dependencies/maven/pom.xml b/_includes/code/java_dependencies/maven/pom.xml index 1cfbc0e..654bc16 100644 --- a/_includes/code/java_dependencies/maven/pom.xml +++ b/_includes/code/java_dependencies/maven/pom.xml @@ -13,4 +13,4 @@ 20230618 - \ No newline at end of file + diff --git a/_includes/code/java_dependencies/private_repository.xml b/_includes/code/java_dependencies/private_repository.xml index 51c4c6f..4273d0c 100644 --- a/_includes/code/java_dependencies/private_repository.xml +++ b/_includes/code/java_dependencies/private_repository.xml @@ -3,4 +3,4 @@ picosoft-internal https://maven.picosoft.com/ default - \ No newline at end of file + diff --git a/_includes/code/java_dependencies/settings.xml b/_includes/code/java_dependencies/settings.xml index b07a3b8..b337583 100644 --- a/_includes/code/java_dependencies/settings.xml +++ b/_includes/code/java_dependencies/settings.xml @@ -7,4 +7,4 @@ ${env.MAVEN_INTERNAL_PASSWORD} - \ No newline at end of file + diff --git a/assets/main.scss b/assets/main.scss new file mode 100644 index 0000000..67c46e9 --- /dev/null +++ b/assets/main.scss @@ -0,0 +1,10 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- + +@import "minima"; + +p > code, +li > code { + white-space: nowrap; +}