Open coret opened 2 years ago
Hi Bob, I know this might not be the best practice, but I only use maven for importing libraries. For creating the runnable JAR file (burgerLinker.jar), I simply use the export interface from the Eclipse IDE. Here's an example for creating the runnable JAR using Eclipse.
Thanks for the Eclipse IDE tip. Guess that's where the https://github.com/CLARIAH/burgerLinker/blob/main/.project file comes in? Will consider installing this IDE, but in general prefer an automated build instead of manual steps :-)
The documentation doesn't describe the build (and release) process. As this is a Java project and Maven is used, I figured the standard command to use is
mvn clean package
(which assumes you have installed Maven before, eg.sudo apt install maven
).As a non-Java-programmer, I only got this working if I deleted the entire
src/test/
directory, otherwise themvn clean package
failed with an[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project wp4-links: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags
message.mvn clean package
produces the filetarget/wp4-links-0.0.1-SNAPSHOT-jar-with-dependencies.jar
. To get this Jar to work like theburgerLinker.jar
as released in this repo, the file pom.xml needs to be changed in 2 places.https://github.com/CLARIAH/burgerLinker/blob/616accbb3f96e0715ec8b30f0734491e8cf8b1ed/pom.xml#L34 should we changed to
iisg.amsterdam.burgerlinker.App
Next, after the following line https://github.com/CLARIAH/burgerLinker/blob/616accbb3f96e0715ec8b30f0734491e8cf8b1ed/pom.xml#L36
<manifestEntries><Class-Path>.</Class-Path></manifestEntries>
should be added.With these changes
mvn clean package
will produce a working Jar.Please have an experienced Java programmer have a look at the build process (an fix the mentioned issues) and include documentation.