Skip to content

Remove all Java code and de-mavenize — monex is now pure XQuery#367

Open
joewiz wants to merge 1 commit intoeXist-db:masterfrom
joewiz:feature/websocket-simplify
Open

Remove all Java code and de-mavenize — monex is now pure XQuery#367
joewiz wants to merge 1 commit intoeXist-db:masterfrom
joewiz:feature/websocket-simplify

Conversation

@joewiz
Copy link
Member

@joewiz joewiz commented Mar 17, 2026

Summary

Removes all Java code from monex and replaces the Maven build system with Node.js/Gulp, following the pattern established in eXist-db/semver.xq#69. Monex becomes a pure XQuery/XAR application with fully automated releases.

Depends on: eXist-db/exist#6145 (WebSocket module), which depends on eXist-db/exist#6144 (Jetty 12).

Java Removal

Removed: entire src/main/java/ tree (6 files)

File Now provided by (eXist-db/exist#6145)
RemoteConsoleEndpoint WebSocketEndpoint (/ws)
RemoteConsoleAdapter WebSocketAdapter
ConsoleAdapter ConsoleAdapter interface
ConsoleModule ConsoleCompatModule
Log ConsoleCompatFunctions
JMXToken Pure XQuery monex:jmx-token()

De-mavenization (modeled on semver.xq#69)

Build system: Maven → Node.js/Gulp

Removed Added
pom.xml package.json (version, metadata, scripts, deps)
xar-assembly.xml gulpfile.js (template → copy → zip pipeline)
xquery-license-style.xml expath-pkg.xml.tmpl + repo.xml.tmpl
Maven CI workflow Node.js CI workflow

Automated releases: semantic-release

File Purpose
.releaserc Commit analyzer → changelog → git commit → GitHub release with XAR
scripts/update-repo-changelog.js Parses conventional commits, inserts <change> into repo.xml.tmpl
commitlint.config.js Enforces Conventional Commits spec
.husky/commit-msg Git hook runs commitlint on commit
.github/workflows/commitlint.yml CI checks PR commits

Release flow

On merge to master:

  1. @semantic-release/commit-analyzer determines version bump from conventional commits
  2. @semantic-release/exec updates package.json version + inserts changelog entry
  3. @semantic-release/git commits package.json + repo.xml.tmpl
  4. @semantic-release/github creates GitHub release with XAR attached

Build commands

npm run build    # Build XAR to dist/
npm run deploy   # Build + deploy to local eXist
npm run develop  # Build + deploy + watch
npm test         # Cypress tests

Test Results (local, against eXist 7.0-SNAPSHOT with eXist-db/exist#6145)

  ✔  console_spec.cy.js         00:01   3  3  -  -  -
  ✔  indexes_spec.cy.js         00:01   1  1  -  -  -
  ✔  login_spec.cy.js           693ms   2  2  -  -  -
  ✔  monitoring_spec.cy.js      00:01   1  1  -  -  -
  ✔  profiling_spec.cy.js       00:01   1  1  -  -  -
  ✔  remote_spec.cy.js          00:01   1  1  -  -  -
  ✔  All specs passed!          00:07   9  9  -  -  -

🤖 Generated with Claude Code

@joewiz joewiz force-pushed the feature/websocket-simplify branch from 66688ef to dfff072 Compare March 17, 2026 06:11
@joewiz joewiz changed the title Remove all Java code — monex is now pure XQuery Remove all Java code and de-mavenize — monex is now pure XQuery Mar 17, 2026
@joewiz joewiz force-pushed the feature/websocket-simplify branch from dfff072 to b9fedd1 Compare March 17, 2026 06:15
BREAKING CHANGE: Requires eXist-db 7.0+ with WebSocket support.
Build system migrated from Apache Maven to Node.js/Gulp, following
the pattern established in eXist-db/semver.xq#69.

Java removal (requires eXist-db/exist#6145 WebSocket module):
- Removed all Java source (6 files, ~630 LOC)
- WebSocket/Console functions now provided by exist-core
- JMXToken reimplemented as pure XQuery monex:jmx-token()
- JS clients updated: /rconsole → /ws
- Cypress tests updated to match

De-mavenization (modeled on eXist-db/semver.xq#69):
- Replaced pom.xml + xar-assembly.xml with package.json + gulpfile.js
- XAR built via gulp: template substitution → copy → zip
- expath-pkg.xml.tmpl and repo.xml.tmpl with @variable@ placeholders
- build.xml Ant wrapper for backward compatibility
- New GitHub Actions CI workflow (Node.js-based)
- npm run build / npm run deploy / npm test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@joewiz joewiz force-pushed the feature/websocket-simplify branch from c4075b7 to ee104a9 Compare March 17, 2026 06:22
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.

1 participant