using shadowJar to build a runnable version

This commit is contained in:
jotty
2024-11-01 20:20:00 +01:00
parent 9ad9d315b5
commit 131c23b3e7
3 changed files with 27 additions and 3 deletions

View File

@ -7,6 +7,15 @@ package de.jottyfan.csv2camt;
*/
public class Main {
public static void main(String[] args) throws Exception {
new Converter().readCsv(args[1]).writeCamt();
Package pkg = Main.class.getPackage();
String version = (pkg == null || pkg.getImplementationVersion() == null) ? "?" : pkg.getImplementationVersion();
System.out.println("--------------------------------------");
System.out.println(String.format("- csv2camt - version %s", version));
System.out.println("--------------------------------------");
if (args.length < 1) {
System.out.println(String.format("usage: java -jar csv2camt-%s-all.jar filename.csv", version));
} else {
new Converter().readCsv(args[0]).writeCamt();
}
}
}