I see that I can just directly install the individual module files, i.e.:
repo install file:/Users/eliot.kimber/git/dita-build-tools/src/main/xquery/modules/now-dita-utils.xqm
And that works, so I think I was just overthinking the problem.
In the context of an Ant deployment script on the server can just run the repo install command or, as Christian suggests, use a zip package that reflects the result of this install.
Cheers,
E. _____________________________________________ Eliot Kimber Sr Staff Content Engineer O: 512 554 9368 M: 512 554 9368 servicenow.comhttps://www.servicenow.com LinkedInhttps://www.linkedin.com/company/servicenow | Twitterhttps://twitter.com/servicenow | YouTubehttps://www.youtube.com/user/servicenowinc | Facebookhttps://www.facebook.com/servicenow
From: Christian Grün christian.gruen@gmail.com Date: Monday, January 24, 2022 at 11:43 AM To: Eliot Kimber eliot.kimber@servicenow.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] Unable to Make My Custom EXPath Module Work [External Email]
How best to manage deployment of XQuery modules and top-level scripts from a source environment to a running remote server so that using scripts can import modules using just the module namespace?
If you don’t care about version conflicts and other potential dependency errors, you could use the following expression (the argument of fetch:binary can be an arbitrary URI):
basex "archive:extract-to(db:option('repopath'), fetch:binary('....zip'))"
I looked quickly at the code for EXPath package processing but I didn’t spent much time in it, but it probably wouldn’t be too hard to enhance it to behave as I expected. I could possibly pursue that if anyone else would use it.
Thanks for the offer, that would certainly be appreciated.