2025-01-24 11:10:24 +00:00
|
|
|
|
|
|
|
import module namespace build = 'urn:quodatum:build1' at 'build.xqm';
|
|
|
|
|
2025-01-31 21:13:52 +00:00
|
|
|
declare variable $maven-urls := (
|
2025-01-30 16:57:25 +00:00
|
|
|
"org/apache/pdfbox/pdfbox/3.0.4/pdfbox-3.0.4.jar",
|
|
|
|
"org/apache/pdfbox/pdfbox-io/3.0.4/pdfbox-io-3.0.4.jar",
|
|
|
|
"org/apache/pdfbox/fontbox/3.0.4/fontbox-3.0.4.jar",
|
|
|
|
"commons-logging/commons-logging/1.3.4/commons-logging-1.3.4.jar"
|
|
|
|
);
|
2025-01-31 16:09:25 +00:00
|
|
|
|
2025-01-24 11:10:24 +00:00
|
|
|
let $config :=map {
|
2025-01-25 22:19:46 +00:00
|
|
|
"base": file:resolve-path("../",static-base-uri()),
|
|
|
|
"manifest-jar" : "pdfbox-3.0.4.jar",
|
2025-01-26 16:36:02 +00:00
|
|
|
"input-dir" : "jars/",
|
2025-01-27 16:56:32 +00:00
|
|
|
"output" : "dist/pdfbox-3.0.4.fat.jar",
|
2025-01-24 22:34:48 +00:00
|
|
|
"main-class": "org.expkg_zone58.Pdfbox3"
|
2025-01-24 11:10:24 +00:00
|
|
|
}
|
2025-01-26 16:36:02 +00:00
|
|
|
let $jar-path:=file:resolve-path($config?input-dir,$config?base=>trace("base "))=>trace("jar: ")
|
2025-01-31 21:13:52 +00:00
|
|
|
let $_:=build:maven-download($maven-urls,$jar-path)
|
2025-01-25 22:19:46 +00:00
|
|
|
let $fat-jar := build:fatjar-from-folder($jar-path,$config?manifest-jar)
|
2025-01-24 11:10:24 +00:00
|
|
|
|
|
|
|
let $fat-jar:=build:update-manifest($fat-jar, $config?main-class)
|
|
|
|
let $name:=replace($config?main-class,"\.","/") || ".xqm"
|
2025-01-27 16:56:32 +00:00
|
|
|
let $content:=file:read-binary($config?base || "src/Pdfbox3.xqm")
|
2025-01-24 11:10:24 +00:00
|
|
|
let $fat-jar:=archive:update($fat-jar, $name,$content)
|
2025-01-26 16:36:02 +00:00
|
|
|
let $output-file := file:resolve-path($config?output,$config?base)
|
2025-01-24 11:10:24 +00:00
|
|
|
return (file:write-binary($output-file, $fat-jar),
|
|
|
|
trace($output-file,"fat jar: "))
|
|
|
|
|