0

In the context of adding capabilities to BaseX,I can see some information about a package:

nicholas@mordor:~$ 
nicholas@mordor:~$ apt show basex
Package: basex
Version: 9.0.1+ds-1
Priority: optional
Section: universe/database
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Alexander Holupirek <alex@holupirek.de>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4,059 kB
Depends: java-wrappers, default-jre | java8-runtime
Recommends: libjline2-java
Suggests: libtagsoup-java, libxml-commons-resolver1.1-java, libjing-java
Homepage: http://basex.org
Download-Size: 3,611 kB
APT-Manual-Installed: yes
APT-Sources: http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
Description: XML database and XPath/XQuery processor
 BaseX is a very fast and light-weight, yet powerful XML database and
 XPath/XQuery processor, including support for the latest W3C Full Text and
 Update Recommendations. It supports large XML instances and offers a highly
 interactive front-end (basexgui). Apart from two local standalone modes, BaseX
 offers a client/server architecture.
 .
 The package provides following commands:
  * basex  ..........  Standalone local XML database. Command line interface.
  * basexgui  .......  Standalone local XML database. Graphical user interface.
  * basexserver  ....  BaseX XML Database Server.
  * basexclient  ....  BaseX XML Database Client.
 BaseX XML database and XPath/XQuery processor

nicholas@mordor:~$ 

but how do I find out more, such as where the lib directory is for BaseX?

nicholas@mordor:~$ 
nicholas@mordor:~$ dpkg -L basex
/.
/usr
/usr/bin
/usr/bin/basex
/usr/bin/basexclient
/usr/bin/basexgui
/usr/bin/basexserver
/usr/share
/usr/share/applications
/usr/share/applications/basexgui.desktop
/usr/share/doc
/usr/share/doc/basex
/usr/share/doc/basex/changelog.Debian.gz
/usr/share/doc/basex/copyright
/usr/share/doc/basex/examples
/usr/share/doc/basex/examples/input.xml
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/128x128
/usr/share/icons/hicolor/128x128/apps
/usr/share/icons/hicolor/128x128/apps/basex.png
/usr/share/icons/hicolor/16x16
/usr/share/icons/hicolor/16x16/apps
/usr/share/icons/hicolor/16x16/apps/basex.png
/usr/share/icons/hicolor/192x192
/usr/share/icons/hicolor/192x192/apps
/usr/share/icons/hicolor/192x192/apps/basex.png
/usr/share/icons/hicolor/22x22
/usr/share/icons/hicolor/22x22/apps
/usr/share/icons/hicolor/22x22/apps/basex.png
/usr/share/icons/hicolor/24x24
/usr/share/icons/hicolor/24x24/apps
/usr/share/icons/hicolor/24x24/apps/basex.png
/usr/share/icons/hicolor/256x256
/usr/share/icons/hicolor/256x256/apps
/usr/share/icons/hicolor/256x256/apps/basex.png
/usr/share/icons/hicolor/32x32
/usr/share/icons/hicolor/32x32/apps
/usr/share/icons/hicolor/32x32/apps/basex.png
/usr/share/icons/hicolor/36x36
/usr/share/icons/hicolor/36x36/apps
/usr/share/icons/hicolor/36x36/apps/basex.png
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/hicolor/48x48/apps/basex.png
/usr/share/icons/hicolor/64x64
/usr/share/icons/hicolor/64x64/apps
/usr/share/icons/hicolor/64x64/apps/basex.png
/usr/share/icons/hicolor/72x72
/usr/share/icons/hicolor/72x72/apps
/usr/share/icons/hicolor/72x72/apps/basex.png
/usr/share/icons/hicolor/96x96
/usr/share/icons/hicolor/96x96/apps
/usr/share/icons/hicolor/96x96/apps/basex.png
/usr/share/icons/hicolor/scalable
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/scalable/apps/basex.svg
/usr/share/java
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/basex.1.gz
/usr/share/man/man1/basexclient.1.gz
/usr/share/man/man1/basexgui.1.gz
/usr/share/man/man1/basexserver.1.gz
/usr/share/maven-repo
/usr/share/maven-repo/org
/usr/share/maven-repo/org/basex
/usr/share/maven-repo/org/basex/basex
/usr/share/maven-repo/org/basex/basex/9.0.1
/usr/share/maven-repo/org/basex/basex/9.0.1/basex-9.0.1.jar
/usr/share/maven-repo/org/basex/basex/9.0.1/basex-9.0.1.pom
/usr/share/maven-repo/org/basex/basex/debian
/usr/share/maven-repo/org/basex/basex/debian/basex-debian.pom
/usr/share/maven-repo/org/basex/basex-parent
/usr/share/maven-repo/org/basex/basex-parent/9.0.1
/usr/share/maven-repo/org/basex/basex-parent/9.0.1/basex-parent-9.0.1.pom
/usr/share/maven-repo/org/basex/basex-parent/debian
/usr/share/maven-repo/org/basex/basex-parent/debian/basex-parent-debian.pom
/usr/share/pixmaps
/usr/share/pixmaps/basex_16x16.xpm
/usr/share/pixmaps/basex_32x32.xpm
/usr/share/java/basex.jar
/usr/share/maven-repo/org/basex/basex/debian/basex-debian.jar
nicholas@mordor:~$

Yet, I'm looking the lib directory to BaseX itself.

2

The lib directory can be found in the full distributions of BaseX, which can be downloaded from the official homepage. See Startup: Full Distributions for more information.

1

I don't think basex has any lib content, just the bin.

dpkg -L basex does not return anything in the lib directory, so it's certainly not in the basex package. It could be in basex-dev or something similar, but when I look for that I find:

$ apt search basex
Sorting... Done
Full Text Search... Done
basex/testing,testing 9.0.1+ds-1 all
  XML database and XPath/XQuery processor

lua-basexx/testing,testing 0.3-2 all
  baseXX encoding/decoding library for Lua

If I look at the contents of lua-basexx, I also see nothing in lib:

$ apt-file list lua-basexx
lua-basexx: /usr/share/doc/lua-basexx/changelog.Debian.gz
lua-basexx: /usr/share/doc/lua-basexx/copyright
lua-basexx: /usr/share/lua/5.1/basexx.lua
lua-basexx: /usr/share/lua/5.2/basexx.lua

Our last option is to search for libbasex.so:

$ apt-file search libbasex
$                                  

This returns nothing, so there is no file starting with libbasex in the debian archive.

  • BaseX is a Java program, so it typically wouldn’t use a libbasex.so library. apt-file search matches anywhere in a file’s path, not just at the start — see apt-file search man5/s for example. – Stephen Kitt Nov 23 '20 at 7:59
  • I'm confused, because I'm trying to find "where" to add JAR files for BaseX to pickup. Apparently, that's the "lib" folder for the db itself. – Nicholas Saunders Nov 23 '20 at 8:17
1

dpkg -L lists all the files shipped in a given package; to get a full picture of the changes made to the system, you’d also have to look at the package’s maintainer scripts, but basex doesn’t have any.

BaseX is a Java program, so its libraries aren’t in lib... files; they are provided as JARs, shipped in /usr/share/maven-repo (which is structured as a Maven repository), and linked in /usr/share/java. The BaseX “library” (which also contains all the BaseX applications) is /usr/share/maven-repo/org/basex/basex/9.0.1/basex-9.0.1.jar.

I’m not sure the packaged version of BaseX will load JARs automatically from any given directory, but you can always add JARs to the classpath; see this answer for details.

  • Right, but, to add JAR files for the db to pick-up, there's "a" lib directory. Or so is my understanding. – Nicholas Saunders Nov 23 '20 at 8:18
  • 1
    Are you referring to this feature? – Stephen Kitt Nov 23 '20 at 8:39
  • stackoverflow.com/q/64011435/4531180 so possibly that feature. The JAR for JDBC would have to go somewhere. I was expecting a "lib" folder. I added the above link to the question for context. – Nicholas Saunders Nov 23 '20 at 9:23
  • 1
    OK, I’ve answered that part of your question there. – Stephen Kitt Nov 23 '20 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.