[mod] update to pdfbox 3.0.5
This commit is contained in:
parent
196ffa7526
commit
a3bef9d6f4
7 changed files with 54 additions and 61 deletions
|
|
@ -9,6 +9,8 @@ declare namespace pkg='http://expath.org/ns/pkg';
|
|||
declare variable $build:archive-opts:= map { "format" : "zip", "algorithm" : "deflate" };
|
||||
|
||||
declare variable $build:base:= file:resolve-path("../",static-base-uri())=>trace("base ");
|
||||
|
||||
(:~ load "npm style" package.json :)
|
||||
declare variable $build:PKG:=json:doc(file:resolve-path("package.json",$build:base),map{"format":"xquery"});
|
||||
|
||||
(:~ return binary for fat jar from jars in $input-dir
|
||||
|
|
|
|||
|
|
@ -3,29 +3,18 @@ import module namespace build = 'urn:quodatum:build1' at 'build.xqm';
|
|||
|
||||
declare variable $base:= file:resolve-path("../",static-base-uri())=>trace("base ");
|
||||
|
||||
declare variable $maven-urls := (
|
||||
"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"
|
||||
);
|
||||
|
||||
let $config :=map {
|
||||
"manifest-jar" : "pdfbox-3.0.4.jar",
|
||||
"input-dir" : "jars/",
|
||||
"output" : "dist/pdfbox-3.0.4.fat.jar",
|
||||
"main-class": "org.expkg_zone58.Pdfbox3"
|
||||
}
|
||||
|
||||
let $jar-path:=file:resolve-path($config?input-dir,$base)=>trace("jar: ")
|
||||
let $_:=build:maven-download($maven-urls,$jar-path)
|
||||
let $fat-jar := build:fatjar-from-folder($jar-path,$config?manifest-jar)
|
||||
let $jar-path:=$build:base || "jars/"=>trace("jar: ")
|
||||
let $_:=build:maven-download($build:PKG?expkg_zone58?maven2=>array:flatten(),
|
||||
$build:base || "jars/")
|
||||
|
||||
let $fat-jar:=build:update-manifest($fat-jar, $config?main-class)
|
||||
let $name:=replace($config?main-class,"\.","/") || ".xqm"
|
||||
let $fat-jar := build:fatjar-from-folder($jar-path,$build:PKG?expkg_zone58?manifest-jar)
|
||||
|
||||
let $fat-jar:=build:update-manifest($fat-jar, $build:PKG?expkg_zone58?main-class)
|
||||
let $name:=replace($build:PKG?expkg_zone58?main-class,"\.","/") || ".xqm"
|
||||
let $content:=file:read-binary($base || "src/Pdfbox3.xqm")
|
||||
let $fat-jar:=archive:update($fat-jar, $name,$content)
|
||||
let $output-file := file:resolve-path($config?output,$base)
|
||||
let $output-file := file:resolve-path($build:PKG?expkg_zone58?output,$base)
|
||||
return (build:write-binary($output-file, $fat-jar),
|
||||
trace($output-file,"fat jar: "))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue