Skip to content

Conversation

@adamretter
Copy link
Contributor

@adamretter adamretter commented Jun 23, 2025

The Java code previously did not compile against eXist-db 6.x.x. This PR fixes that.
Once we have 6.x.x working again, we would hope for a release of the Crypto module. After that we will backport code from our fork for Elemental to get this also working against eXist-db 7.0.0-SNAPSHOT, and then another release could be made...

NOTE - This first requires a version 2.0.0 of exist-apps-parent to be produced by merging the PR - eXist-db/exist-apps-parent#93 and creating a release of it.

For the first time in a very long time (3+ years?), now all of the tests pass 100% :-)

Closes #64
Closes #86


Additionally:
Closes #88
Closes #85
Closes #84
Closes #83
Closes #82
Closes #81
Closes #80
Closes #79
Closes #78
Closes #77

@adamretter adamretter force-pushed the feature/6.x.x-elemental-existdb-compatibility branch 3 times, most recently from 950fb46 to 1b5325f Compare June 23, 2025 20:07
@adamretter adamretter marked this pull request as ready for review June 23, 2025 20:11
@adamretter
Copy link
Contributor Author

@reinhapa I also took care of CI in here too.

Copy link
Member

@line-o line-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR changes the parent POM to

  <groupId>xyz.elemental.expath</groupId>
  <artifactId>elemental-expath-package-parent</artifactId>
  <version>1.0.0</version>

Where can this new "dependency" be reviewed?

@adamretter
Copy link
Contributor Author

adamretter commented Jun 24, 2025

This PR changes the parent POM

@line-o Yes, unfortunately there are quite a few issues with the previous parent that was used (https://github.com/exist-db/exist-apps-parent). So I started from scratch and created the more modern elemental-expath-package-parent to address those issues.

Where can this new "dependency" be reviewed?

@line-o Same place as all the others:

  1. Assuming you have run the PR code, (if I recall correctly, you use macOS?), that would be: ~/.m2/repository/xyz/elemental/expath/elemental-expath-package-parent/1.0.0/elemental-expath-package-parent-1.0.0.pom on your computer

  2. Otherwise if you haven't run it yet, then the same place as all other good Open Source Maven dependencies, Maven Central - https://central.sonatype.com/artifact/xyz.elemental.expath/elemental-expath-package-parent

@line-o
Copy link
Member

line-o commented Jun 24, 2025

here is the GitHub link https://www.github.com/evolvedbinary/elemental-expath-package-parent

I am strongly in favour of fixing / changing the exist-db apps parent POM for packages hosted here. But I do know of at least one really big issue: It declares OSS-sonatype as its parent POM.
While the expath-package-parent does not do that it still wants to publish jars to Maven central it seems.

@adamretter adamretter force-pushed the feature/6.x.x-elemental-existdb-compatibility branch from 1b5325f to 5dee06b Compare June 24, 2025 07:39
@adamretter
Copy link
Contributor Author

adamretter commented Jun 24, 2025

the exist-db apps parent POM for packages hosted here. But I do know of at least one really big issue: It declares OSS-sonatype as its parent POM

@line-o That is just one of several problems in there. Honestly, it was easier to just start again. There is nothing Elemental specific in the elemental-expath-package-parent so it would be easiest for you to just switch to that, as it is maintained and fixes the issue with the older elemental-expath-package-parent. We put it under the Apache 2.0 license so that it can be used by anyone.

While the expath-package-parent does not do that

@line-o Nobody should be doing that any more as the oss-parent has been deprecated now for many years and is unmaintained.

it still wants to publish jars to Maven central it seems.

@line-o Yes, that is where almost all Open Source jar files are published. It is where developers expect to find libraries and is the default in the JVM ecosystem. It is also where all of the eXist-db releases have been published since 5.x.x. What is the problem?
If you have some closed source projects you want to publish elsewhere to some private repo it is trivial to override that behaviour in your own pom.xml that inherits from elemental-expath-package-parent.

@reinhapa
Copy link
Member

@adamretter @line-o why do we need a parent POM in the first place? I think this introduces unnecessary coupling. I see that only in a multi-module scenario within the same repository.

@adamretter
Copy link
Contributor Author

why do we need a parent POM in the first place

@reinhapa Yes. Without it you end up copying and pasting a lot of config into each individual project's pom.xml file, which then over time become out of sync with each other and you have an even larger mess to maintain.

Copy link

@aljopainter aljopainter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite a few changes that look good and simplify things. Tests working. Thanks.

@adamretter
Copy link
Contributor Author

adamretter commented Jun 30, 2025

Thanks @aljopainter for your review and kind feedback :-)

Copy link

@marmoure marmoure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :) Tests are passing locally and on CI, the build is working.
Thanks @adamretter

@adamretter adamretter force-pushed the feature/6.x.x-elemental-existdb-compatibility branch from 5dee06b to 5088012 Compare July 11, 2025 11:11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change of this file seems unrelated to the Java issues...

Copy link
Contributor Author

@adamretter adamretter Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reinhapa it is related to the packaging, assembly, and test changes. It simply reflects that the module now works on eXist-db and Elemental. Where do you see an issue please?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamretter I see mainly the addition of Elemental, except to be the reference to the version >= 6.0.0 for eXist-db (and in this case may be Elemental with the same version)

I appreciate your work, but those changes, are one of those things, that will make me hesitate to approve. Or would you allow eXist-db reference additions on Elemental in one of your repositories?

Copy link
Contributor Author

@adamretter adamretter Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reinhapa Thanks :-) I'm not sure if I understand your question/concern or not though. This PR has two concerns:

  1. Fix the module and make it work correctly with eXist-db 6 (including passing CI)
  2. Add a minimal processor declaration to the XAR descriptor so that it also works with Elemental.

Adding the processor declaration for Elemental means that this App supports both eXist-db and Elemental.
This is intentional, as I don't think it makes sense for Elemental to fork all of the eXst-db Apps. IMHO, it makes more sense where possible to have a single code base for an App that benefits from improvements by both eXist-db and Elemental developers contributing to it.

would you allow eXist-db reference additions on Elemental in one of your repositories

If we had a repo that contains an App or Library that is compatible with Elemental and eXist-db, then we would be happy for it to also contain a processor declaration for eXist-db and have that mentioned in the README.md.

I'm not sure if that answers your question/concern? If not, let me know and we can go from there...

declare
%test:name("Hash binary with wrong algorithm, default format")
%test:assertError("err:CX21: The algorithm is not supported.")
%test:assertError("crypto:unknown-algorithm")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error code that is raised is changed looking at the test. This would constitute a breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's likely not the only change. The release of this will need to bump the major version number.

declare
%test:name("Validate enveloped digital signature")
%test:assertTrue
%test:pending("Need to find a way to load the keystore.ks correctly from the filesystem")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my understanding this test did pass in earlier versions. What changed so this test has to be skipped?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you looked in detail at what this was actually testing previously?

@adamretter adamretter force-pushed the feature/6.x.x-elemental-existdb-compatibility branch from 5088012 to 18391e7 Compare July 28, 2025 17:17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamretter I see mainly the addition of Elemental, except to be the reference to the version >= 6.0.0 for eXist-db (and in this case may be Elemental with the same version)

I appreciate your work, but those changes, are one of those things, that will make me hesitate to approve. Or would you allow eXist-db reference additions on Elemental in one of your repositories?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] check compatibility with latest existdb releases >= 5.4.0

5 participants