Hi,
As part of the basex-gradle-starter scripts [1] I am now looking at how to deal with the repo.
Until now I have always developed by putting modules under webapp. It allows to just edit a file and query away.
I like to have the same workflow during development and take advantage of having modules not depend on a fixed import path. When working with the repo modules have to be installed first. Just copying them under the repo doesn't make basex aware of them.
Of course I could arrange it so that I run a build task that does this via repo:install but that involves the extra step of copying files from the install location into the repo instead of just registering the files that are already in the repo location.
I would like to have, for example, a 'src' directory with the repo module directory structure. Is there a way to say to basex that my repo lives in 'src' and that it auto registers what it finds there. Say a command like repo:register('dir') or maybe even an auto-register option.
Once a module is already installed editing and saving is enough for basex to pick up the change. No issue there.
Of course for production I probably want to compile the code to jar or xar in order to install it and share it. But during development I would like to be able to just have the code be picked up so that I can edit, save and query.
I am not sure if what I'm asking is a feature or if I just have to do things differently.
BTW one more thing I noticed. When I sometimes get into a situation where individual empty directories are also recognized as packages (but I cannot delete them from the GUI package manager). With repo:list() I then see something like this.
<package name="org." type="Internal"/> <package name="org.basex." type="Internal"/> <package name="org.xokomola." type="Internal"/> <package name="org.xokomola.xq.Hello" type="Internal"/>
[1] https://github.com/theapsgroup/basex-gradle-starter
--Marc