[mod] download jars
This commit is contained in:
parent
52942a5ce1
commit
0c3e9482cb
15 changed files with 32 additions and 102 deletions
17
scripts/download.xq
Normal file
17
scripts/download.xq
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
import module namespace build = 'urn:quodatum:build1' at 'build.xqm';
|
||||
|
||||
declare variable $files := (
|
||||
"https://repo1.maven.org/maven2/org/apache/pdfbox/pdfbox/3.0.4/pdfbox-3.0.4.jar",
|
||||
"https://repo1.maven.org/maven2/org/apache/pdfbox/pdfbox-io/3.0.4/pdfbox-io-3.0.4.jar",
|
||||
"https://repo1.maven.org/maven2/org/apache/pdfbox/fontbox/3.0.4/fontbox-3.0.4.jar",
|
||||
"https://repo1.maven.org/maven2/commons-logging/commons-logging/1.3.4/commons-logging-1.3.4.jar"
|
||||
);
|
||||
|
||||
|
||||
|
||||
let $base:= file:resolve-path("../",static-base-uri())
|
||||
let $target:=file:resolve-path("jars/",$base)
|
||||
for $f in $files
|
||||
let $n:=replace($f,"^.*/","") =>trace("N")
|
||||
return file:write-binary($target || $n, fetch:binary($f))
|
||||
|
|
@ -8,7 +8,7 @@ let $config :=map {
|
|||
"base": file:resolve-path("../",static-base-uri()),
|
||||
"manifest-jar" : "pdfbox-3.0.4.jar",
|
||||
"input-dir" : "jars/",
|
||||
"output" : "lib/pdfbox-3.0.4.fat.jar",
|
||||
"output" : "dist/pdfbox-3.0.4.fat.jar",
|
||||
"main-class": "org.expkg_zone58.Pdfbox3"
|
||||
}
|
||||
let $jar-path:=file:resolve-path($config?input-dir,$config?base=>trace("base "))=>trace("jar: ")
|
||||
|
|
@ -16,7 +16,7 @@ let $fat-jar := build:fatjar-from-folder($jar-path,$config?manifest-jar)
|
|||
|
||||
let $fat-jar:=build:update-manifest($fat-jar, $config?main-class)
|
||||
let $name:=replace($config?main-class,"\.","/") || ".xqm"
|
||||
let $content:=file:read-binary($jar-path || "Pdfbox3.xqm")
|
||||
let $content:=file:read-binary($config?base || "src/Pdfbox3.xqm")
|
||||
let $fat-jar:=archive:update($fat-jar, $name,$content)
|
||||
let $output-file := file:resolve-path($config?output,$config?base)
|
||||
return (file:write-binary($output-file, $fat-jar),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue