On 28/01/2022 23:43, Bruno Kinoshita wrote:
Build passed from tag, with:


Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /opt/apache-maven-3.8.2
Java version: 11.0.13, vendor: Ubuntu, runtime:
/usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-96-generic", arch: "amd64", family: "unix"


Looked inside .jar and .tar.gz files in the dist area (binaries and
sources), and everything looks good (checked the new -ui module, didn't
find node_modules or any other unnecessary files). The jena-fuseki-ui
module creates a jar that only contains metadata. Maybe we could skip
releasing it in the future? I think as it is, it should be available in the
Maven repository as a jar dependency for users, even though it's not usable
in any way in Java I think.

We can make it a POM artifact then no jar generated.

Or.

Use the jar to deliver the UI files.

They can be served from the jar. No files on disk. No copying from ../jena-fuseki-ui/target/dist/ during jena-fuseki-webapp.

The Jetty content-serving servlet takes URL string - and a jar is accessed with URL <jar:file:/pathname.../!/path-in-jar/>.

The path can be determined automatically by looking up the path-in-jar as the server starts. The files are places under "src/main/resources/"

I have, experimentally, done a Fuseki module for the UI. This is a drop-in to FusekiMain (ditto the admin functions as a drop-in).

These will convert the standalone Fuseki server to being a Fuseki/Main + Mod_UI + Mod_Admin, not a webapp+Jetty to run it.

Good for docker.

What I haven't looked at is how to get the WAR file setup with this change of build. A war file unpacks its contents to disk and has jars in WEB-INF/lib which is the webapps classpath. "Should" work if start-up can set the location of static content.
An alternative is have a prepare step in the build to unpack the jar.

Anyone got experience of delivering JS into a WAR file in a multi-module build?

    Andy

Reply via email to