Currently trying to get JAXB up and running. Dev tool of choice is IntelliJ IDEA.
I found Dariawan quite helpful on this topic, and basically cloned that code into a IDEA/maven project: https://github.com/ldericher/jaxb_experiment.
If I run JAXB_Experiment.java:main()
from the IDE, it works and produces the desired output.
However, while mvn clean package
completes successfully and a JAR is created, I cannot run the resulting archive:
% java -jar target/jaxb-experiment-1.0.jar
Error: Unable to initialize main class de.rwth_aachen.swc.miehe.experiments.jaxb.JAXB_Experiment
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
Searching for the Error yields tons of advice to add a variety of JAXB dependencies to the pom.xml, of which I have tried most over the course of today, none of which has done me any better.
This is quite unsatisfactory, and I feel like I might be missing something more general.