diff --git a/README.jrf b/README.jrf
index 2e4db4ae..ad7d3d50 100644
--- a/README.jrf
+++ b/README.jrf
@@ -1,5 +1,5 @@
# This is a Jamal reference file containing serialized base64 encoded macros
-# Created: 2024-10-07 21:54:28 +0200
+# Created: 2024-10-08 20:08:24 +0200
# id|openStr|closeStr|verbatim|tailParameter|pure|content|parameters
# TOC
VE9D|eyU=|JX0=|0|0|0|Ci4gPDxJbnN0YWxsYXRpb24+PgouIDw8R1M+PgouIDw8Q29uZmlndXJhdGlvbj4+Ci4gPDxGZWF0dXJlcz4+Ci4gPDxDb250cmlidXRpbmc+PgouIDw8RG9jdW1lbnRhdGlvbj4+Ci4gPDxMaWNlbnNlPj4KLiA8PENoYW5nZWxvZz4+Ci4gPDxSb2FkbWFwPj4KLiA8PFN1cHBvcnQ+PgouIDw8RkFRPj4KLiA8PE1haW50ZW5hbmNlPj4=|
diff --git a/jamal-cmd/README.adoc b/jamal-cmd/README.adoc
index 8655c6cd..c31807e3 100644
--- a/jamal-cmd/README.adoc
+++ b/jamal-cmd/README.adoc
@@ -104,4 +104,8 @@ See also the option `-from`.
* `-jamalize` will install Jamal in the `.asciidoctor/lib` directory.
It version of the installed Jamal is the same as the one installing it.
-It can also install a different version if the option `-version=xxx` is specifying a specific versions.
\ No newline at end of file
+It can also install a different version if the option `-version=xxx` is specifying a specific versions.
+
+
+
+
diff --git a/jamal-cmd/src/main/java/javax0/jamal/cmd/Jamalizer.java b/jamal-cmd/src/main/java/javax0/jamal/cmd/Jamalizer.java
index 241a05cf..4d82f1f3 100644
--- a/jamal-cmd/src/main/java/javax0/jamal/cmd/Jamalizer.java
+++ b/jamal-cmd/src/main/java/javax0/jamal/cmd/Jamalizer.java
@@ -20,20 +20,50 @@ public class Jamalizer {
private static final String version = System.getProperty("jamal.version") == null ? Processor.jamalVersionString() : System.getProperty("jamal.version");
+ private static final String DOWNLOAD_URL_TEMPLATE = "https://repo.maven.apache.org/maven2/com/javax0/jamal/jamal-asciidoc/%s/jamal-asciidoc-%s-jamal-asciidoc-distribution.zip";
static void jamalize(String version) throws IOException, BadSyntax {
- if( version == null ){
+ if (version == null) {
version = Jamalizer.version;
}
+ warnAboutSnapshot(version);
createAsccidoctorLibDir();
- extratZip(FileTools.getFileBinaryContent(
- String.format("https://repo.maven.apache.org/maven2/com/javax0/jamal/jamal-asciidoc/%s/jamal-asciidoc-%s-jamal-asciidoc-distribution.zip", version, version),
+ extractZip(FileTools.getFileBinaryContent(
+ String.format(DOWNLOAD_URL_TEMPLATE, version, version),
false,
new javax0.jamal.engine.Processor())
);
}
- private static void extratZip(final byte[] zipContent) throws IOException {
+ private static void warnAboutSnapshot(String version) {
+ if (version.contains("SNAPSHOT")) {
+ System.err.println("The version of the Jamalizer is a SNAPSHOT version.\n" +
+ "This is not recommended for production use.\n" +
+ "Since the command 'jamalize' downloads Jamal from Maven central using the URL\n\n" +
+ String.format(DOWNLOAD_URL_TEMPLATE, version, version) +
+ "\n\nit is possible that the version is not available in the repository yet.\n" +
+ "Use 'jamal -jamalize version=...' to specify a version that is available in the repository."
+ );
+ }
+ }
+
+ /**
+ * Extracts JAR files from a ZIP archive provided as a byte array.
+ *
+ *
This method processes the given byte array, which represents the content
+ * of a ZIP archive. It scans the archive, looking for entries that are JAR files
+ * (files with a ".jar" extension). For each JAR file found, it writes the content
+ * to a specified directory on the filesystem.
+ *
+ * The output JAR files are extracted to the path specified by the
+ * concatenation of {@code ASCIIDOCTOR_DIR} and {@code LIB_DIR}, using
+ * the JAR filename from the ZIP entry.
+ *
+ * @param zipContent the byte array containing the ZIP archive content
+ * @throws IOException if an I/O error occurs while reading the ZIP archive
+ * or writing the extracted JAR files to the filesystem
+ */
+ private static void extractZip(final byte[] zipContent) throws IOException {
try (final var is = new JarInputStream(new ByteArrayInputStream(zipContent))) {
ZipEntry entry;
while ((entry = is.getNextEntry()) != null) {
diff --git a/jamal-snippet/README.adoc b/jamal-snippet/README.adoc
index faabdce8..ad71d3be 100644
--- a/jamal-snippet/README.adoc
+++ b/jamal-snippet/README.adoc
@@ -3816,7 +3816,7 @@ will result in the output
.output
[source]
----
-2024-10-04 10:17:51
+2024-10-08 09:13:51
----
diff --git a/jamal-sql/demodb.mv.db b/jamal-sql/demodb.mv.db
index 2c88665d..93740a58 100644
Binary files a/jamal-sql/demodb.mv.db and b/jamal-sql/demodb.mv.db differ
diff --git a/jamal-word/src/test/resources/demoConverted.docx b/jamal-word/src/test/resources/demoConverted.docx
index 61cb542f..4389a1fd 100644
Binary files a/jamal-word/src/test/resources/demoConverted.docx and b/jamal-word/src/test/resources/demoConverted.docx differ
diff --git a/jamal-word/src/test/resources/includetestConverted.docx b/jamal-word/src/test/resources/includetestConverted.docx
index 22f289b8..c2fdd906 100644
Binary files a/jamal-word/src/test/resources/includetestConverted.docx and b/jamal-word/src/test/resources/includetestConverted.docx differ
diff --git a/jamal-word/src/test/resources/pictureConverted.docx b/jamal-word/src/test/resources/pictureConverted.docx
index 60ccbbab..1a047b22 100644
Binary files a/jamal-word/src/test/resources/pictureConverted.docx and b/jamal-word/src/test/resources/pictureConverted.docx differ
diff --git a/jamal-word/src/test/resources/sampleConverted.docx b/jamal-word/src/test/resources/sampleConverted.docx
index 9baa898d..db11d766 100644
Binary files a/jamal-word/src/test/resources/sampleConverted.docx and b/jamal-word/src/test/resources/sampleConverted.docx differ
diff --git a/jamal-xls/README.adoc b/jamal-xls/README.adoc
index 859f7853..98c000ef 100644
--- a/jamal-xls/README.adoc
+++ b/jamal-xls/README.adoc
@@ -68,7 +68,7 @@ Parameter options (parops) can be defined without parentheses.
The `(` and `)` are optional.)
* `file` (aliases are `in`, `input`, `from`) is the name of the file that contains the XLS workbook.
-Technically `file` is also an alias, thus a macro havign the name of `file` will not be considered.
+Technically, `file` is also an alias; thus a macro having the name of `file` will not be considered.
This parop must be defined.
* `out` (aliases are `output`, `to`) is the name of the file where the XLS workbook is written.
This parop is optional.
diff --git a/jamal-yaml/README.adoc b/jamal-yaml/README.adoc
index 5d9b9c80..4d36943f 100644
--- a/jamal-yaml/README.adoc
+++ b/jamal-yaml/README.adoc
@@ -17,7 +17,6 @@ To use this module, you have to add the dependency to your Maven project, as:
Following that, you can use the
-
. <>
. <[>
. <>
@@ -30,6 +29,8 @@ Following that, you can use the
. <>
. <>
. <]