Skip to content

Commit

Permalink
release 1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
verhas committed Feb 28, 2021
1 parent da25b13 commit 171730e
Show file tree
Hide file tree
Showing 25 changed files with 171 additions and 168 deletions.
6 changes: 3 additions & 3 deletions BUILTIN.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You need the following dependency in your project:
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-api</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</dependency>
----

Expand All @@ -50,7 +50,7 @@ In later versions, when we will do a bit more in our macros we will also need th
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-tools</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</dependency>
----

Expand Down Expand Up @@ -105,7 +105,7 @@ To do that you have to add the dependency to your `pom.xml` file:
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-testsupport</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<scope>test</scope>
</dependency>
----
Expand Down
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2613,7 +2613,7 @@ will result

[source]
----
The current version 1.7.2-SNAPSHOT is older than the required version. It has to be newer.
The current version 1.7.2 is older than the required version. It has to be newer.
----

Expand Down Expand Up @@ -2727,7 +2727,7 @@ For example to add the pomlib library JAR to the classpath you can use the follo
<plugin>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-maven-plugin</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<executions>
<execution>
<id>execution</id>
Expand Down Expand Up @@ -2820,7 +2820,7 @@ If you use Maven, you can simply have
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-engine</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</dependency>
----

Expand Down
4 changes: 2 additions & 2 deletions jamal-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<name>jamal api</name>
<packaging>jar</packaging>
<artifactId>jamal-api</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Jamal macro library API interfaces</description>
<build>
Expand Down
4 changes: 2 additions & 2 deletions jamal-cmd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<name>jamal command line</name>
<packaging>jar</packaging>
<artifactId>jamal-cmd</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Jamal macro library command line interface</description>
<build>
Expand Down
4 changes: 2 additions & 2 deletions jamal-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<name>jamal core</name>
<packaging>jar</packaging>
<artifactId>jamal-core</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Jamal macro library built-in macros</description>
<build>
Expand Down
4 changes: 2 additions & 2 deletions jamal-engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<name>jamal engine</name>
<packaging>jar</packaging>
<artifactId>jamal-engine</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Jamal macro library execution engine</description>
<build>
Expand Down
4 changes: 2 additions & 2 deletions jamal-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<packaging>jar</packaging>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-extensions</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Jamal macro library extra macros</description>
<build>
Expand Down
67 changes: 34 additions & 33 deletions jamal-groovy/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To use this module you have to add the dependency to you Maven project, as:
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-groovy</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</dependency>
----
Expand Down Expand Up @@ -358,39 +358,40 @@ The second evaluation is performed in a different shell, but the definition of t
=== Sample Application, Converting this `README.adoc`


In this chapter I will tell the story, and the technology used to maintain this documentation file.
There are several macros used during the maintenance of the documentation to ensure that the documentation is correct and up-to-date.
The processing of this special document uses Groovy scripts, which are used instead of some built-in macros for demonstration purposes.
In this chapter, I will tell the story and the technology used to maintain this documentation file.
Several macros are used during the maintenance of the documentation to ensure that the documentation is correct and up-to-date.
This particular document's processing uses Groovy scripts, which are used instead of some built-in macros for demonstration purposes.


The documentation of Jamal is a series of Asccidoc files.
The Asciidoc format was invented to be a documentation source format that is easy to read and edit.
The same time it can also be converted to many different output formats.
Asciidoc, however, is provides only limited possibility to eliminate redundancy, and to ensure consistency.
At the same time, Jamal can also convert it to many different output formats.
Asciidoc, however, provides only limited possibility to eliminate redundancy and to ensure consistency.
This is where Jamal comes into play.

The documentation of Jamal is maintained in `xxx.adoc.jam` files, and they are converted to `xxx.adoc` files.
With this workflow the Asciidoc files are not source files, rather intermediate files along the conversion path.
Jamal's documentation is maintained in `xxx.adoc.jam` files, and they are converted to `xxx.adoc` files.
With this workflow, the Asciidoc files are not source files.
They are intermediate files along the conversion path.
Jamal `define` macros are used to eliminate text repetition, redundancy whenever it is possible.
The Jamal snippet library macros are used to keep the sample codes included in the document up-to-date.

[NOTE]
====
When reading this part of the documentation, you are probably familiar with the basic functionalities of Jamal.
If you need to refresh the memory then read the link:README.adoc[documentation] in root folder of the project.
The documentation of the Snippet macros are documented in the link:jamal-snippet/README.adoc[Snippet README.adoc] file.
It is not necessary to know and understand how the snippet macros work in order to read this chapter, but in general, it is a recommended read.
If you need to refresh the memory, then read the link:README.adoc[documentation] in the project's root folder.
Snippet macros are documented in the link:jamal-snippet/README.adoc[Snippet README.adoc] file.
It is unnecessary to know and understand how the snippet macros work to read this chapter, but it is a recommended read in general.
====

The technical documentations using Jamal and the snippet macros usually generate the documentation in multiple steps.
Technical documentation using Jamal and the snippet macros usually generates the documentation in multiple steps.

* Run the tests including the sample code and capture the sample output in one or more output file.
* Run the tests, including the sample code, and capture the sample output in one or more output files.

* Process the Jamal source of the documentation and include from the source code and from the generated sample output files the samples.
* Process the Jamal source of the documentation and include from the source code and the generated sample output files the samples.

For example, a Java application can support the documentation with unit test samples.
Some of the unit tests serve the purpose of testing only, while others are there to document certain part of the code.
The output of the documentation purposed tests are captured into output files.
Some of the unit tests serve the purpose of testing only, while others are there to document specific code parts.
The output of the documentation purposed tests is captured into output files.
The test file `jamal-groovy/src/test/java/javax0/jamal/groovy/TestGroovyMacros.java` contains

[source,java]
Expand All @@ -417,14 +418,14 @@ To get this content into the document what we have to write is the following:

The output generated (none in this case) can also be included using the `snip` macro.

This is absolutely logical to run the tests, and generate the test output in a prior test in case of Java.
When we test and document Jamal processing, however, it is a logical idea to use the Jamal environment, which is converting the documentation.
The external approach with a proir step is also possible, but it is not needed.
It is logical to run the tests and generate the test output in an initial step in the case of Java.
However, when we test and document Jamal processing, it is a logical idea to use the Jamal environment, which is converting the documentation.
The external approach with an initial step is also possible, but it is not needed.

The sample Jamal code can be included in the documentation as code sample.
Using Jamal macros it can also be converted to the corresponding output, which can also be included into the resulting document without saving it into an intermediate file.
The sample Jamal code can be included in the documentation as a code sample.
Using Jamal macros, Jamal can also convert it to the corresponding output, which can also be included in the resulting document without saving it into an intermediate file.

To do that the Jamal Snippet package unit test file
To do that, the Jamal Snippet package unit test file
`jamal-snippet/src/test/java/javax0/jamal/documentation/TestConvertReadme.java`
uses a built-in macro, implemented in the file:

Expand All @@ -434,11 +435,11 @@ This Java implemented macro is available on the classpath when the unit test run

[NOTE]
====
Executing the Jamal processing of the documentation of a Java software package via the unit tests has other advantages.
Executing the Jamal processing of a Java software package documentation via the unit tests has other advantages.
The macros `java:class` and `java:method` can check that the class and method names referenced in the document are valid.
Class and method names may change during refactoring.
The documentation many times does not follow this change and becomes stale.
When the classes and methods are referenced using these macros then they throw an exception if the class or method does not exits.
When the classes and methods are referenced using these macros, they throw an exception if the class or method does not exist.
====

This class is very simple:
Expand All @@ -456,17 +457,17 @@ public class Output implements Macro {
----

It creates a single Jamal processor instance and uses it to evaluate the input passed to it.
This way this macro runs a Jamal processor separate from the Jamal processor that is converting the document.
The two Jamal processors, however, run in the same JVM and one is invoking the other through this built-in macro.
This macro runs a Jamal processor separate from the Jamal processor that is converting the document.
However, the two Jamal processors run in the same JVM, and one is invoking the other through this built-in macro.

To simplify the use there is a `readmemacros.jim` macro import file that defines the user defined macro `sample` and `output`.
(A built-in macro can have the same name as a user defined.)
The macro `sample` results the content of it in Asciidoc code sample format adding `[source]\n----` before and `----` after the sample code.
The same time it also saves the sample code in a user defined variable called `lastCode`.
The macro `output` uses the `lastCode` and using the buil-in `output` from the `Output.java` displays the calculated result as a code block.
To simplify the use, there is a `readmemacros.jim` macro import file that defines the user-defined macro `sample` and `output`.
(A built-in macro can have the same name as a user-defined.)
The macro `sample` results in its content in Asciidoc code sample format, adding `[source]\n----` before and `----` after the sample code.
At the same time, it also saves the sample code in a user-defined variable called `lastCode`.
The macro `output` uses the `lastCode` and using the built-in `output` from the `Output.java` displays the calculated result as a code block.

This is very similar when we are using Groovy, but in this case we do not need the built-in macro `output`.
When this very document is converted the readmemacros.jim` inside the `jamal-groovy` directory contains some Groovy scripts instead of the built-in macros.
It is very similar when we are using Groovy, but in this case, we do not need the built-in macro `output`.
When Jamal converts this document, the readmemacros.jim` inside the `jamal-groovy` directory contains some Groovy scripts instead of the built-in macros.

The unit test code that invokes the Jamal processor to convert this document is the following:

Expand Down
8 changes: 4 additions & 4 deletions jamal-groovy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<modelVersion>4.0.0</modelVersion>
<name>jamal groovy</name>
<artifactId>jamal-groovy</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Groovy module for Jamal</description>
<build>
Expand Down Expand Up @@ -46,13 +46,13 @@
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-testsupport</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-snippet</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions jamal-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<name>jamal maven plugin</name>
<packaging>maven-plugin</packaging>
<artifactId>jamal-maven-plugin</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Jamal macro library maven plugin</description>
<build>
Expand Down
2 changes: 1 addition & 1 deletion jamal-plantuml/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The maven coordinates for the Jamal module are:
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-plantuml</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</dependency>
----

Expand Down
6 changes: 3 additions & 3 deletions jamal-plantuml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<name>jamal plantuml</name>
<packaging>jar</packaging>
<artifactId>jamal-plantuml</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<parent>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-parent</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
</parent>
<description>Jamal macro library snippet macros</description>
<build>
Expand Down Expand Up @@ -57,7 +57,7 @@
<dependency>
<groupId>com.javax0.jamal</groupId>
<artifactId>jamal-snippet</artifactId>
<version>1.7.2-SNAPSHOT</version>
<version>1.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Loading

0 comments on commit 171730e

Please sign in to comment.