[mod] add classifier, file parser

This commit is contained in:
Andy Bunce 2026-04-22 22:29:58 +01:00
parent 9b5ea3546a
commit bd45ef17a4

View file

@ -162,7 +162,7 @@ as xs:string{
$parts[2], $parts[2],
$parts[3], $parts[3],
string-join(($parts[2] , "-" , $parts[3] , string-join(($parts[2] , "-" , $parts[3] ,
if(3<count($parts)) then "-" || $parts[4] else (), if(3<count($parts)) then "-" || $parts[4] else (), (: classifier :)
".jar"),"") ".jar"),"")
)=>string-join("/") )=>string-join("/")
}; };
@ -172,4 +172,12 @@ declare function build:write-binary($dest as xs:string,$contents as xs:base64Bin
as empty-sequence(){ as empty-sequence(){
file:create-dir(file:parent($dest)), file:create-dir(file:parent($dest)),
file:write-binary($dest,$contents) file:write-binary($dest,$contents)
};
(:~ return non-blank lines before # from $file :)
declare function build:maven-lines($filepath as xs:string) as xs:string
{
unparsed-text-lines($filepath)
!substring-before(.||"#","#")
!normalize-space(.)[0<string-length(.)]
}; };