|
| 1 | += Java 9 Jigsaw modules - Changelog |
| 2 | +include::.asciidoctorconfig[] |
| 3 | +ifdef::env-github[] |
| 4 | +:tip-caption: :bulb: |
| 5 | +:note-caption: :information_source: |
| 6 | +:important-caption: :heavy_exclamation_mark: |
| 7 | +:caution-caption: :fire: |
| 8 | +:warning-caption: :warning: |
| 9 | +endif::[] |
| 10 | + |
| 11 | +This changelog documents significant changes and migrations in the xref:README.adoc[Java 9 Jigsaw examples] repository. |
| 12 | + |
| 13 | +== October 2025 Refactoring and Modernization |
| 14 | + |
| 15 | +This major refactoring modernized the repository with comprehensive documentation migration to AsciiDoc, automated testing infrastructure via golden master tests, and improved development environment setup. |
| 16 | +The changes ensure better maintainability, consistent cross-platform behavior, and streamlined onboarding for new contributors. |
| 17 | + |
| 18 | +=== Golden Master Testing Framework |
| 19 | + |
| 20 | +* Implemented golden master (characterization) testing framework for automated output verification |
| 21 | +* Added `expected-result/run.txt` files capturing expected output for 35+ examples |
| 22 | +* Created `verify.sh` scripts to compare actual vs. expected output during test runs |
| 23 | +* Enhanced examples to generate deterministic, platform-independent output: |
| 24 | +** Normalized file paths across Windows, macOS, and Linux |
| 25 | +** Made object ID generation deterministic based on constructor caller |
| 26 | +** Sorted JAR execution order for consistent output |
| 27 | +** Removed environment-specific information (timestamps, absolute paths) |
| 28 | +* Fixed Windows CRLF handling in test files |
| 29 | +* Integrated golden master verification into GitHub Actions CI pipeline |
| 30 | +* Documented testing approach in main README with cross-references from all examples |
| 31 | + |
| 32 | +=== Documentation Migration to AsciiDoc |
| 33 | + |
| 34 | +* Converted all documentation from Markdown to AsciiDoc format: |
| 35 | +** Main `README.adoc` with enhanced formatting and cross-references |
| 36 | +** 40+ example `README.adoc` files with consistent structure |
| 37 | +** Created separate `CHANGELOG.adoc` for version history |
| 38 | +* Established AsciiDoc infrastructure: |
| 39 | +** Added `.asciidoctorconfig` for common configuration |
| 40 | +** Configured Maven AsciiDoctor plugin for HTML generation |
| 41 | +** Set up automatic deployment to GitHub Pages and Netlify |
| 42 | +** Added GitHub-compatible icons for admonitions |
| 43 | +* Enhanced documentation quality: |
| 44 | +** Converted all example references to AsciiDoc cross-references (`xref:`) |
| 45 | +** Added module dependency diagrams to example overview table |
| 46 | +** Converted all HTTP links to HTTPS |
| 47 | +** Translated remaining German content to English |
| 48 | +** Established consistent authorship attribution |
| 49 | + |
| 50 | +=== Build Tool and Environment Modernization |
| 51 | + |
| 52 | +* Added Maven Wrapper 3.9.11 to all Maven examples: |
| 53 | +** xref:jigsaw-examples/example_maven-project/README.adoc[example_maven-project] (created parent POM for multi-module support) |
| 54 | +** xref:jigsaw-examples/example_maven-test-blackbox/README.adoc[example_maven-test-blackbox] |
| 55 | +** xref:jigsaw-examples/example_maven-test-whitebox/README.adoc[example_maven-test-whitebox] |
| 56 | +** xref:jigsaw-examples/example_spring-hibernate/README.adoc[example_spring-hibernate] |
| 57 | +* Updated Gradle Wrapper to 9.1.0 in xref:jigsaw-examples/example_gradle-project/README.adoc[example_gradle-project]: |
| 58 | +** *Breaking change*: Gradle 9.x requires *JDK 17 or later* (previously JDK 11) |
| 59 | +** Updated build scripts for Gradle 9.x compatibility: |
| 60 | +*** Replaced deprecated `jcenter()` with `mavenCentral()` |
| 61 | +*** Updated `sourceSets.test.java.outputDir` to `sourceSets.test.java.classesDirectory` |
| 62 | +*** Migrated `mainClassName` property to `application { mainClass }` block |
| 63 | +* Environment simplification: |
| 64 | +** Manual installation of Maven and Gradle no longer required |
| 65 | +** `MAVEN_HOME` and `GRADLE_HOME` removed from `env.sh` (no longer needed due to wrapper usage) |
| 66 | +** Use `./mvnw` (Maven) or `./gradlew` (Gradle) instead of system-installed tools |
| 67 | +** Introduced `.envrc` support for https://direnv.net/[direnv] users |
| 68 | +** Enhanced `env.sh` to only set variables when not already configured |
| 69 | +** Fixed Windows path conversion in `.envrc` creation for GitHub Actions |
| 70 | +* All builds tested and verified on macOS with the xref:README.adoc#recommended-jdk[recommended JDK version] (Maven) and JDK 17 (Gradle) |
| 71 | + |
| 72 | +=== SDKMAN Support and JDK Version Alignment |
| 73 | + |
| 74 | +* Added `.sdkmanrc` for developers using https://sdkman.io/[SDKMAN] |
| 75 | +** Automatically configures the xref:README.adoc#recommended-jdk[recommended JDK version] when `sdkman_auto_env=true` is enabled |
| 76 | +** May interfere with `JAVA_HOME` settings in `.envrc` or `env.sh` - see setup documentation |
| 77 | +* Established single source of truth for recommended JDK version: |
| 78 | +** Updated GitHub Actions workflow to use specific JDK version (tagged as `java-version-minimal`) |
| 79 | +** Created `[[recommended-jdk]]` anchor in README with AsciiDoc include from workflow file |
| 80 | +** All JDK version references use cross-references to this anchor |
| 81 | +** Documented xref:README.adoc#recommended-jdk[recommended JDK version] for full compatibility with CI and golden master testing |
| 82 | +* Aligned JDK version across development environments: |
| 83 | +** Some examples produce JDK version-specific output validated by `verify.sh` scripts |
| 84 | +** Newer JDKs may be used for local development but full test execution requires the recommended version |
| 85 | +** Upgraded reference JDK from 11.0.27 to 11.0.28 |
| 86 | + |
| 87 | +=== Eclipse IDE Support |
| 88 | + |
| 89 | +Removed deprecated Eclipse IDE support |
| 90 | + |
| 91 | +* Deleted Eclipse project files and launch configurations |
| 92 | +* Removed Eclipse-specific setup documentation |
| 93 | +* Focused on command-line and modern IDE-agnostic workflows |
| 94 | + |
| 95 | +=== GitHub Actions and CI Improvements |
| 96 | + |
| 97 | +* Upgraded `actions/setup-java` to v5 for better reliability |
| 98 | +* Enhanced CI workflow to use `setup-java` outputs for JDK path configuration |
| 99 | +* Fixed Windows path conversion in `.envrc` creation for cross-platform compatibility |
| 100 | +* Configured artifact upload to always run (not just on failure) for documentation generation |
| 101 | +* Added artifact download step in docs job to include run-result files in generated documentation |
| 102 | +* Improved shellcheck integration for script validation across all platforms |
| 103 | + |
| 104 | +== Example for layer module resolution |
| 105 | + |
| 106 | +* Example demonstrating the resolution of modules across layers added |
| 107 | + |
| 108 | +== Migration to JDK 11 |
| 109 | + |
| 110 | +* Migrated examples to Java 11. |
| 111 | +* Tested with Eclipse Temurin-11.0.27+6 (build 11.0.27+6) |
| 112 | +* Currently xref:jigsaw-examples/example_spring-hibernate/README.adoc[example_spring-hibernate] is not working. |
| 113 | + |
| 114 | +== Migration to Eclipse 4.7.3a Oxygen.3a |
| 115 | + |
| 116 | +* Eclipse 4.7.3a Oxygen.3a as of April 2018 has been tested, all start*.sh scripts have hence be renamed. |
| 117 | +Eclipse 4.7.1a Oxygen.1a should still work (despite the script name). |
| 118 | +Note that from 4.7.3a on, Eclipse is supposed to work with JDK10. |
| 119 | + |
| 120 | +[IMPORTANT] |
| 121 | +==== |
| 122 | +Note that Eclipse 4.7.1a Oxygen.1a still works fine with all examples. |
| 123 | +==== |
| 124 | + |
| 125 | +== Migration to Eclipse 4.7.3 Oxygen.3 |
| 126 | + |
| 127 | +* Eclipse 4.7.3 Oxygen.3 as of March 2018 has been tested, all start*.sh scripts have hence be renamed. |
| 128 | +Eclipse 4.7.1a Oxygen.1a should still work (despite the script name). |
| 129 | +Note that Eclipse only works with JDK9: Though Eclipse can be started with JDK10, one then sees compile errors when compiling the examples in Eclipse. |
| 130 | + |
| 131 | +[IMPORTANT] |
| 132 | +==== |
| 133 | +Note that Eclipse 4.7.1a Oxygen.1a still works fine with all examples. |
| 134 | +==== |
| 135 | + |
| 136 | +== Migration to final JDK 10 (Release) |
| 137 | + |
| 138 | +* Migrated examples to Java 10 2018-03-20, Java(TM) SE Runtime Environment 18.3 (build 10+46) |
| 139 | + |
| 140 | +[WARNING] |
| 141 | +==== |
| 142 | +All works fine except the xref:jigsaw-examples/example_spring-hibernate/README.adoc[example_spring-hibernate] because of a compile problem. |
| 143 | +See xref:jigsaw-examples/example_spring-hibernate/README.adoc[readme] for details. |
| 144 | +Needs probably Maven/Plugin updates, to be done soon. |
| 145 | +==== |
| 146 | + |
| 147 | +[IMPORTANT] |
| 148 | +==== |
| 149 | +Note that JDK 9 (like 9.0.4) still works fine with all examples. |
| 150 | +==== |
| 151 | + |
| 152 | +== Migration to JDK 10+43 (OpenJDK) (Release) |
| 153 | + |
| 154 | +* Gradle needed an update to 4.6 as the JDK 10 class format could not be read with Gradle 4.2.1 (see also https://github.com/gradle/gradle/issues/3770[here]). |
| 155 | +* Gradle scripts in xref:jigsaw-examples/example_gradle-project/README.adoc[example_gradle-project] now also include a `--info --stacktrace` for more info and error output |
| 156 | + |
| 157 | +== Migration to JDK 9.0.4 (Release) |
| 158 | + |
| 159 | +No changes necessary |
| 160 | + |
| 161 | +== Cleanup |
| 162 | + |
| 163 | +All kinds of scripts, code, environment settings etc. were checked and lots of cleanup was done. |
| 164 | +Nothing critical but looks "fresher" now. |
| 165 | +Some changes: |
| 166 | + |
| 167 | +* Maven 3.7.0 compiler plugin used now in all maven projects |
| 168 | +* Refactoring of the maven test examples: New name is now xref:jigsaw-examples/example_maven-test-blackbox/README.adoc[example_maven-test-blackbox] and xref:jigsaw-examples/example_maven-test-whitebox/README.adoc[example_maven-test-whitebox] |
| 169 | +* Maven settings template file checked to all maven projects |
| 170 | +* Gradle build without the daemon |
| 171 | +* Gradle environment variable GRADLE_USER_HOME introduced, as $HOME is not handled correctly on cygwin systems |
| 172 | +* Refactoring of the example which shows that automatic modules can access the classpath, now in xref:jigsaw-examples/example_unnamed-module_access-from-automatic-module/README.adoc[example_unnamed-module_access-from-automatic-module] |
| 173 | +* All scripts' calls to java, javac, jar etc. now redirected STDERR to STDOUT to make sure that both standard and error output are printed in order (otherwise some exception output is printed very early and now below the call as expected) |
| 174 | +* Cleanup of Eclipse dependencies and Build paths whereever possible (not easy when e.g. a mixture of explicit modules and/or automatic modules and/or classpath code has to be built in Eclipse) |
| 175 | +* Cleanup of Eclipse launch files (and also renamed them not to have any whitespace in their .launch file name) |
| 176 | +* All kind of cleanup like better comments, a bit more separating whitespaces or separating lines in the output |
| 177 | +* Deleted `example_requires-transitive_exports` (obsolete as all of its contents is covered by xref:jigsaw-examples/example_requires_exports_requires-transitive_exports-to/README.adoc[example_requires_exports_requires-transitive_exports-to] already) |
| 178 | + |
| 179 | +== Migration to JDK 9.0.1 (Release) |
| 180 | + |
| 181 | +No changes necessary |
| 182 | + |
| 183 | +== Upgrade to DepVis 0.3 |
| 184 | + |
| 185 | +Now with print and visualization output like printing uses and provides, printing concealed packages, showing opens and opens-to etc. |
| 186 | +See https://github.com/accso/java9-jigsaw-depvis[DepVis Readme] for details |
| 187 | + |
| 188 | +== New and enhanced examples |
| 189 | + |
| 190 | +* xref:jigsaw-examples/example_unnamed-module-reflection-illegal-access/README.adoc[example_unnamed-module-reflection-illegal-access] is new, shows the usage of the "kill switch" |
| 191 | +* xref:jigsaw-examples/example_requires-static/README.adoc[example_requires-static] is new, shows the usage of the "requires static" |
| 192 | + |
| 193 | +== Enhanced examples |
| 194 | + |
| 195 | +* xref:jigsaw-examples/example_resources/README.adoc[example_resources] is fixed, now works as expected |
| 196 | +* Various other cleanups, refactorings, corrections all over the place |
| 197 | +* xref:jigsaw-examples/example_jerrymouse/README.adoc[example_jerrymouse] limits its apps to a whitelist and only uses them, if they work |
| 198 | +* All examples which can be used as an app in xref:jigsaw-examples/example_jerrymouse/README.adoc[example_jerrymouse]: Its `modmain` is now an "open module" (instead of "opens pkgmain") |
| 199 | + |
| 200 | +== Migration to JDK 9 b181 (Release) |
| 201 | + |
| 202 | +* --patch-module replaces -Xmodule for javac |
| 203 | +* Upgrade maven-compiler-plugin to 3.6.2 |
| 204 | +* Adapted to new automatic module name algorithm |
| 205 | + |
| 206 | +== Migration to JDK 9 b162 |
| 207 | + |
| 208 | +* changes in API (java.lang.reflect.Module is now java.lang.Module, java.lang.reflect.Layer is now java.lang.ModuleLayer) |
| 209 | + |
| 210 | +== Migration to JDK 9 b156 |
| 211 | + |
| 212 | +* changes in API (Configuration.resolve instead of Configuration.resolveRequires) |
| 213 | +* no more java.compact1 profile available (was used in xref:jigsaw-examples/example_resolved-modules/README.adoc[example_resolved-modules]) |
| 214 | +* all javac calls now use -Xlint |
| 215 | +* note that compiler and launcher now show various warnings (not sure if this is because of b156 or because of "javac -Xlint") |
| 216 | + |
| 217 | +== Migration to JDK 9 b148 |
| 218 | + |
| 219 | +* no changes necessary, everything seems still to work as in b144 |
| 220 | + |
| 221 | +== Migration to JDK 9 b144 |
| 222 | + |
| 223 | +* "opens" instead of "exports dynamic" and "weak modules" |
| 224 | +* "requires transitive" instead of "requires public" |
0 commit comments