Git Product home page Git Product logo

Comments (2)

jcflack avatar jcflack commented on July 2, 2024

This has been a perennial to-do item that keeps perennially being not done. It would certainly be desirable for the pljava-api jar to be in a public repo so it can be referred to when compiling PL/Java client code. Only that jar is needed; the pljava implementation jar only needs to be among the files installed on the PostgreSQL server, as no client code refers to it.

So, the pljava-api jar can be built easily, without the rest of the project, using mvn clean install --projects pljava-api. Likewise, mvn site --projects pljava-api will generate the javadocs for the API. A jar of the generated javadocs and a jar of the API sources must also be uploaded to the repository, according to the requirements.

I would certainly be happy to look over a pull request with a GitHub Actions workflow in it that would create and sign the necessary jars, and be triggered only when a new release is published. Perhaps even just a script that can be manually run to do it.

Some coordination is needed with Dave Cramer, who is the registrant of the org.postgresql coordinates, currently used by the PGJDBC driver. org.postgresql.pljava creates no conflict with PGJDBC, but is within the namespace he controls. We discussed it some time ago and he has no objection, but some details may need to be worked out so the repo will accept the uploads.

PGJDBC uploads are signed using personal keys of Dave or Vladimir. What key to use for pljava-api needs to be determined. If the releasing will be done in a GHA workflow, a key generated for the purpose (with the private portion secured as a GHA environment secret) might be adequate. I'm not as keen on using a personal key that way.

None of this is truly complicated, just detail-heavy. Among the details to be sorted:

The publishing requirements also require uploading the POM. Only the pljava-api POM is directly needed, but its reference to the parent POM probably requires that one to to be uploaded also. Does that, in turn, require the other subproject POMs to be published there because it refers to them, even though there is no need for any of them to be available through a repository?

Or would it be better to revise the structuring of the subprojects and POMs? That sounds like a fairly disruptive headache.

Also to keep in mind: I have argued here and here for possibly moving away from Maven entirely and building with a simple jshell script. As it stands, PL/Java (which is tiny, and has no dependencies) pulls down over a hundred megabytes of assorted Maven dependencies during a build, which have version interactions and vulnerability reports and such nonsense, all of which are headaches existing only because of Maven and not because of PL/Java.

Perhaps some later PL/Java version will have a simple jshell-based build and have only one vestigial POM file, for pljava-api, present only to satisfy the publication requirements.

I see there is not any existing open issue for this, despite it having been on the to-do list for so long, so this issue can be labeled 'enhancement' and used for discussion.

from pljava.

jcflack avatar jcflack commented on July 2, 2024

As one stopgap measure, it may be worth noting that only the pljava-api-$version.jar file is needed, and that jar is already present if PL/Java has been installed from a prebuilt package. It can be found in $(pg_config --sharedir)/pljava/

For the convenience of local projects that depend on it, it can be added to the local Maven repository, as described here.

The jar contains its own POM file, so the last, simplest command shown in that guide is sufficient to install it.

from pljava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.