How to use the generator to generate an entity class from an OPT template?
java -jar generator-version.jar
-h show help
-opt <arg> path to opt file
-out <arg> path to output directory
-package <arg> package name
-config <arg> optional Path to config file
When trying to do this in the syntax above, I got an error message:
Error: Failed to initialize the Main Class org.ehrbase.openehr.sdk.generator.ClassGeneratorRunner
Reason: java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
@linforest are you using the jar downloaded from maven central?
Can you try building the jar from the source code? Just clone the openEHR SDK, do a mvn clean install of the project and then try with the openEHR_SDK\generator\target\generator-2.17.0.jar.
Not sure why it’s not working with the jar from maven central, or if it’s supposed to work directly from there.