( And I needed to generate replacement list from the shell using ‘find … -newer basex/data/collection’ )
I pulled the basex/lib/basex-api-9.2.1-SNAPSHOT.jar file out of the snapshot zip file and copied it to home-brew
/usr/local/Cellar/basex/9.2/libexec/lib/basex-api-9.2.jar and replacement from the basex shell command appears to work now.
Previously, I was getting this error, trying several variations of absolute/relative filenames or file: URIs.
published$ basex -i published -c "replace jmu/vihart00338.xml /projects/vh-migrate/published/jmu/vihart00338.xml"
Improper use? Potential bug? Your feedback is welcome:
Version: BaseX 9.2
Java: Oracle Corporation, 1.8.0_201
OS: Mac OS X, x86_64
Stack Trace:
java.lang.RuntimeException: published: lock file does not exist.
at org.basex.util.Util.notExpected(Util.java:61)
at org.basex.data.DiskData.finishUpdate(DiskData.java:246)
at org.basex.core.cmd.ACreate.update(ACreate.java:97)
at org.basex.core.cmd.Replace.run(Replace.java:55)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.core.CLI.execute(CLI.java:76)
at org.basex.core.CLI.execute(CLI.java:63)
at org.basex.BaseX.<init>(BaseX.java:80)
at org.basex.BaseX.main(BaseX.java:42)