Compare commits

...

15 commits

Author SHA1 Message Date
Renzo Kottmann
1e6f96dfad [maven-release-plugin] prepare for next development iteration 2025-08-29 10:52:23 +02:00
Renzo Kottmann
fc31e98da9 [maven-release-plugin] prepare release v1.5.1 2025-08-29 10:52:10 +02:00
Renzo Kottmann
05079676b5 Changed name in pom.xml 2025-08-29 10:47:10 +02:00
Philip Helger
e444a60695 Re-added latest POM changes 2025-08-29 10:45:58 +02:00
Philip Helger
cf10fa09e5 Changed back to validator 2025-08-29 10:44:12 +02:00
Renzo Kottmann
4a15af6ef2 [maven-release-plugin] rollback the release of v1.5.1 2025-08-29 10:32:39 +02:00
Philip Helger
da42b9e404 [maven-release-plugin] rollback the release of v1.5.1 2025-08-29 10:31:41 +02:00
Philip Helger
2dd5e0dbb0 [maven-release-plugin] prepare for next development iteration 2025-08-29 10:31:26 +02:00
Philip Helger
be30c80617 [maven-release-plugin] prepare release v1.5.1 2025-08-29 10:31:24 +02:00
Philip Helger
90b860d8ec [maven-release-plugin] rollback the release of v1.5.1 2025-08-29 10:29:32 +02:00
Philip Helger
eb7fc87f07 [maven-release-plugin] prepare for next development iteration 2025-08-29 10:29:22 +02:00
Philip Helger
f4f0d9eceb [maven-release-plugin] prepare release v1.5.1 2025-08-29 10:28:37 +02:00
Philip Helger
269862503e Added Maven Central plugin 2025-08-29 10:27:42 +02:00
Renzo Kottmann
02d12b614e Merge branch '151-release-docs' into 'release/1.5.x'
Release documentation update

See merge request kosit/validator!73
2025-08-29 10:15:40 +02:00
Philip Helger
740a880276 Release documentation update 2025-08-29 10:15:40 +02:00
4 changed files with 68 additions and 57 deletions

View file

@ -1,4 +1,5 @@
# KoSIT Validator
- [Introduction](#introduction)
- [Validation Configurations](#validation-configurations)
* [Third Party Validation Configurations](#third-party-validation-configurations)
@ -9,17 +10,18 @@
- [Packages](#packages)
## Introduction
The validator is an XML validation engine to validate and process XML files in various formats. It basically does the following in order:
1. identify actual xml format
1. validate the xml file (using schema and schematron rules)
1. generate a custom report / extract custom data from the xml file
1. identify actual XML format
1. validate the XML file (using schema and schematron rules)
1. generate a custom report / extract custom data from the XML file
1. compute an acceptance status (according the supplied schema and rules)
The validator depends on self defined [scenarios](docs/configurations.md) which are used to fully configure the process.
It always creates a [validation report in XML](docs/configurations.md#validators-report). The actual content of this is controlled by the scenario.
The validator depends on self defined [scenarios](docs/configurations.md) in order to fully configure the whole process.
It always creates a [validation report in XML](docs/configurations.md#validators-report). The actual content of the report can also be controlled by the scenario.
See [architecture](docs/architecture.md) for information about the actual validation process.
See [architecture](docs/architecture.md) for information about the whole validation process.
## Validation configurations
@ -30,7 +32,7 @@ All configurations are self-contained modules which are deployed and developed o
### Third party validation configurations
Currently, there are two public third party validation configurations available.
Here are two public third party validation configurations available which might serve as examples:
* Validation Configuration for [XRechnung](http://www.xoev.de/de/xrechnung):
* Source code is available on [GitHub](https://github.com/itplr-kosit/validator-configuration-xrechnung)
@ -43,23 +45,25 @@ Currently, there are two public third party validation configurations available.
The validator can be used in three different ways:
* as standalone application running from the cli
* as standalone application running from the CLI
* as library embedded within a custom application
* as a daemon providing a http interface
### Standalone Command-Line Interface
### Standalone Command Line Interface (CLI)
**Important hint**: since v1.5.1 the filename has been changed from `validationtool-*` to `validator-*`
The general way using the CLI is:
```shell
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> -r <repository-path>
java -jar validator-<version>-standalone.jar -s <scenario-config-file> -r <repository-path>
[OPTIONS] [FILE] [FILE] [FILE] ...
```
The help option displays further CLI options to customize the process:
```shell
java -jar validationtool-<version>-standalone.jar --help
java -jar validator-<version>-standalone.jar --help
```
A concrete example with a specific validator configuration can be found on
@ -93,7 +97,7 @@ will thus not be resolved transitively.
You can also start the validator as a HTTP-Server. Just start it in _Daemon-Mode_ with the `-D` option.
```shell
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> -D
java -jar validator-<version>-standalone.jar -s <scenario-config-file> -D
```
@ -103,7 +107,7 @@ The [daemon documentation](./docs/daemon.md) shows more usage details and furthe
The validator distribution contains the following artifacts:
1. **validationtool-`<version>`.jar**: Java library for embedded use within an application
1. **validationtool-`<version`>-standalone.jar**: Uber-JAR for standalone usage containing all dependencies in one jar file. This file comes with JAXB *embedded* and can be used with Java 8 and Java >= 11)
1. **validationtool-`<version`>-java8-standalone.jar**: Uber-JAR for standalone usage with Java JDK 8 containing all dependencies in one jar file. This file file *does not* contain JAXB and depends on the bundled version of the JDK.
1. **validator-`<version>`.jar**: Java library for embedded use within an application
1. **validator-`<version`>-standalone.jar**: Uber-JAR for standalone usage containing all dependencies in one jar file. This file comes with JAXB *embedded* and can be used with Java 8 and Java >= 11)
1. **validator-`<version`>-java8-standalone.jar**: Uber-JAR for standalone usage with Java JDK 8 containing all dependencies in one jar file. This file file *does not* contain JAXB and depends on the bundled version of the JDK.
1. **libs/***: directory containing all (incl. optional) dependencies of the validator

View file

@ -1,27 +1,29 @@
# Validator CLI
# Validator Command Line Interface (CLI)
The validator comes with a commandline interface (CLI) which allows validating any number of input xml files.
The `validator` comes with a command line interface (CLI) which allows validating any number of input XML files.
**Important hint**: since v1.5.1 the filename has been changed from `validationtool-*` to `validator-*`
The general way using the CLI is:
```shell
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> [OPTIONS] [FILE] [FILE] [FILE] ...
java -jar validator-<version>-standalone.jar -s <scenario-config-file> [OPTIONS] [FILE] [FILE] [FILE] ...
```
The validator can also read the xml file from the standard input
```shell script
# via redirection
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> [OPTIONS] < my-input.xml
# read from pipe
cat my-input.xml | validationtool-<version>-standalone.jar -s <scenario-config-file> [OPTIONS]
```
The help option displays further CLI options to customize the process:
The validator can also read the XML file from the standard input
```shell
java -jar validationtool-<version>-standalone.jar --help
# via redirection
java -jar validator-<version>-standalone.jar -s <scenario-config-file> [OPTIONS] < my-input.xml
# read from pipe
cat my-input.xml | validator-<version>-standalone.jar -s <scenario-config-file> [OPTIONS]
```
The help option displays further CLI options:
```shell
java -jar validator-<version>-standalone.jar --help
```
You can also use multiple scenario configurations and multiple repositories with resources for these. The validator either supports
@ -29,17 +31,17 @@ supplying the parameters in order or using named configuration. Valid usages are
```shell
# multiple scenarios, implicit repository
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file1> -s <scenario-config-file2> [OPTIONS] [FILE]
java -jar validator-<version>-standalone.jar -s <scenario-config-file1> -s <scenario-config-file2> [OPTIONS] [FILE]
# multiple scenarios, single defined repository
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file1> -s <scenario-config-file2> -r <path-to-repo> [OPTIONS] [FILE]
java -jar validator-<version>-standalone.jar -s <scenario-config-file1> -s <scenario-config-file2> -r <path-to-repo> [OPTIONS] [FILE]
# multiple scenarios, multiple repositories ordered
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file1> -r <path-to-repo1> -s <scenario-config-file2> -r <path-to-repo2> [OPTIONS] [FILE]
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file1> -s <scenario-config-file2> -r <path-to-repo1> -r <path-to-repo2> [OPTIONS] [FILE]
java -jar validator-<version>-standalone.jar -s <scenario-config-file1> -r <path-to-repo1> -s <scenario-config-file2> -r <path-to-repo2> [OPTIONS] [FILE]
java -jar validator-<version>-standalone.jar -s <scenario-config-file1> -s <scenario-config-file2> -r <path-to-repo1> -r <path-to-repo2> [OPTIONS] [FILE]
# multiple scenarios, multiple repositories (named)
java -jar validationtool-<version>-standalone.jar -s "NAME1=<scenario-config-file1>" -s "NAME2=<scenario-config-file2>" -r "NAME1=<path-to-repo1>" -r "NAME2=<path-to-repo2>" [OPTIONS] [FILE]
java -jar validator-<version>-standalone.jar -s "NAME1=<scenario-config-file1>" -s "NAME2=<scenario-config-file2>" -r "NAME1=<path-to-repo1>" -r "NAME2=<path-to-repo2>" [OPTIONS] [FILE]
```
## Special features
@ -57,7 +59,7 @@ generated reports. This is mainly useful for scenario developers. Ask KoSIT for
| code | description |
|-|-|
| 0 | All validated xml files are acceptable according to the scenario configurations |
| 0 | All validated xml files are acceptable according to the scenario configurations or application usage was requested |
| positive integer | Number of rejected (e.g. not acceptable) xml files according to the scenario configurations|
| -1 | Parsing error. The commandline arguments specified are incorrect |
| -2 | Configuration error. There is an error loading the configuration and/or validation targets |

View file

@ -8,8 +8,10 @@ and should work with OpenJDK based distributions. Keep this in mind, if you want
To use the validator daemon as is, start the _Daemon-Mode_ with the `-D` option and supply a suitable
[validator configuration](configurations.md).
**Important hint**: since v1.5.1 the filename has been changed from `validationtool-*` to `validator-*`
```shell
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> -D
java -jar validator-<version>-standalone.jar -s <scenario-config-file> -D
```
Per default the HTTP-Server listens on _localhost_ at Port 8080.
@ -17,7 +19,7 @@ Per default the HTTP-Server listens on _localhost_ at Port 8080.
You can configure the daemon with `-H` for IP Adress and `-P` for port number:
```shell
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> -D -H 192.168.1.x -P 8081
java -jar validator-<version>-standalone.jar -s <scenario-config-file> -D -H 192.168.1.x -P 8081
```
## Customized usage
@ -135,5 +137,5 @@ The daemon provides a simple GUI when issuing `GET` requests providing the follo
The GUI can be disabled using the API (see above) or via CLI:
```shell script
java -jar validationtool-<version>-standalone.jar -s <scenario-config-file> -D --disable-gui
java -jar validator-<version>-standalone.jar -s <scenario-config-file> -D --disable-gui
```

15
pom.xml
View file

@ -15,15 +15,14 @@
~ limitations under the License.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>KoSIT XML Prüftool Implementierung</name>
<name>KoSIT XML Validator</name>
<groupId>org.kosit</groupId>
<artifactId>validator</artifactId>
<version>1.5.1-SNAPSHOT</version>
<version>1.5.2-SNAPSHOT</version>
<description>KoSIT XML Validator against XSD and Schematron based on defined scenarios.</description>
<developers>
@ -464,14 +463,14 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.3</version>
<configuration>
<!--suppress MavenModelInspection -->
<argLine>-Dfile.encoding=UTF-8 ${jacocoSurefire}</argLine>
<systemProperties>
<property>
<name>java.net.useSystemProxies</name>
<value>true</value>
</property>
</systemProperties>
<!--suppress MavenModelInspection -->
<argLine>-Dfile.encoding=UTF-8 ${jacocoSurefire}</argLine>
</configuration>
</plugin>
@ -639,6 +638,10 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>