Axway-API-Management-Plus / yamles-utils

Utilities for YAML Entity Store
https://axway-api-management-plus.github.io/yamles-utils/
Apache License 2.0
2 stars 0 forks source link

Docker images are not working - java.lang.NoClassDefFoundError #26

Closed mlookaxw closed 3 months ago

mlookaxw commented 3 months ago

Executing the tool using Docker images fails.

$ docker run -ti --rm ghcr.io/axway-api-management-plus/yamles-utils:0.7.0
Error: Could not find or load main class com.axway.yamles.utils.YamlEsUtils
Caused by: java.lang.NoClassDefFoundError: picocli/CommandLine$IExecutionExceptionHandler
mlookaxw commented 3 months ago

Building the package via GitHub Actions generates a corrupt package.

Workaround: Build local until pipeline is fixed.

$ ./mvnw clean package
$ docker build -t yamles-utils:latest .
$ docker run -ti --rm yamles-utils:latest -h
Usage: yamlesutils [-hqVv] [-a=FILE] [COMMAND]
YAML Entity Store Utilities
  -a, --audit=FILE   Audit file.
  -h, --help         Show this help message and exit.
  -q, --quiet        Disable info log message to the console.
  -v, --verbose      Increase logging verbosity.
  -V, --version      Print version information and exit.
Commands:
  help    Display help information about the specified command.
  merge   Merge configuration from various sources.
  lint    Lint YAML entity store.
  config  Configure YAML-ES. Combines the 'lint', 'merge config' and 'merge
            certs' commands.
  eval    Evalulates a template expression.
mlookaxw commented 3 months ago

Docker image fixed.

$ docker run -ti --rm \
  -e "NAME=Martin" \
  ghcr.io/axway-api-management-plus/yamles-utils:0.7.1 \
  -q eval "Hello {{ _env('NAME') }}!" \
&& echo
Hello Martin!