Skip to content

Comments

feat!: migrate build system from Maven to Node.js/Gulp/semantic-release#69

Draft
joewiz wants to merge 6 commits intoeXist-db:masterfrom
joewiz:migrate-to-node-build
Draft

feat!: migrate build system from Maven to Node.js/Gulp/semantic-release#69
joewiz wants to merge 6 commits intoeXist-db:masterfrom
joewiz:migrate-to-node-build

Conversation

@joewiz
Copy link
Member

@joewiz joewiz commented Feb 21, 2026

Summary

  • Replaces Apache Maven build with Node.js + Gulp for building XAR packages, modeled on the approach used in the roaster project
  • Adds semantic-release for fully automated versioning and GitHub releases triggered by conventional commits
  • Drops eXist-db 4.x support (breaking change); minimum version is now 5.0.0
  • Preserves all existing XQSuite tests, now run via HTTP against a Docker eXist-db service in CI (or local instance for development)

Key changes

  • New build toolchain: package.json, gulpfile.js, expath-pkg.xml.tmpl, repo.xml.tmpl
  • Automated releases: .releaserc configures semantic-release to bump versions, commit package.json, and publish XAR as a GitHub release asset
  • Test runner: test/run-tests.js — Node.js script that invokes XQSuite via eXist-db's REST API and reports results
  • CI: .github/workflows/build.yml replaces old ci.yml + ci-docker-dev.yml; runs against eXist-db latest, release, and 5.0.0 Docker images
  • Ant wrapper: build.xml for backward compatibility (ant xarnpm run build)
  • File layout: src/main/xquery/semver.xqmcontent/semver.xqm; src/test/xquery/*.xqmtest/*.xqm; icon.png moved to root
  • Removed: pom.xml, xar-assembly.xml, xquery-license-style.xml, src/
  • Updated: .gitignore (Maven → Node.js entries), dependabot.yml (maven → npm), README.md (build/test/release instructions)

This commit uses the conventional commit format with a BREAKING CHANGE: footer, so semantic-release will bump from 3.0.14.0.0 when merged to master.

Test plan

  • npm install succeeds
  • npm run build produces dist/semver-xq-3.0.1.xar
  • CI workflow triggers on push and runs against all three eXist-db versions
  • With a local eXist-db: cp .env.example .env && npm test passes all XQSuite tests
  • On merge to master: semantic-release creates a 4.0.0 GitHub release with XAR attached

🤖 Generated with Claude Code

@joewiz joewiz marked this pull request as draft February 21, 2026 18:20
@joewiz joewiz force-pushed the migrate-to-node-build branch from 58c99bd to db4fd20 Compare February 21, 2026 18:31
joewiz and others added 6 commits February 21, 2026 23:48
Replace Apache Maven build with Node.js + Gulp for building XAR packages
and semantic-release for automated versioning and GitHub releases,
modeled on the approach used in the roaster project
(https://github.com/eeditiones/roaster).

- Add package.json, gulpfile.js, expath-pkg.xml.tmpl, repo.xml.tmpl
- Add .releaserc for semantic-release configuration
- Add test/run-tests.js for XQSuite tests via HTTP against eXist-db
- Add build.xml Ant wrapper for backward compatibility
- Add .github/workflows/build.yml (replaces ci.yml + ci-docker-dev.yml)
- Move content to content/ and test XQuery modules to test/
- Update .gitignore, dependabot.yml (maven → npm), README.md
- Remove pom.xml, xar-assembly.xml, xquery-license-style.xml, src/

BREAKING CHANGE: Minimum eXist-db version is now 5.0.0.
eXist-db 4.x is no longer supported.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The test:install-all gulp task called install before the XAR existed.
Add build as the first step so the XAR is ready before install runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Use readOptionsFromEnv() with default options merged in (matching
  roaster's approach) instead of manual URL parsing
- Pass replacements as array [app, {version, license}] matching roaster
- Use { unprefixed: true } so @Version@, @author@ etc. placeholders
  are resolved without requiring a 'package.' prefix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n issue

gulp-exist v4 defaulted to secure:true, causing the legacy compat shim in
node-exist to override readOptionsFromEnv()'s 'http:' protocol with 'https:',
resulting in an SSL error against eXist-db's plain HTTP port.

Upgrading to gulp-exist v5 (following roaster's approach) resolves this
cleanly. Also aligns with roaster by upgrading:
- gulp v4 -> v5
- gulp-zip v5 -> v6
- gulp-rename v2.0 -> v2.1
- axios v0.27 -> v1.7
- dotenv-cli v4 -> v11
- semantic-release v17 -> v25 and related plugins
- Adds "type": "module" and converts gulpfile.js and test/run-tests.js to ESM

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
roaster's CI uses port 8443 (HTTPS) and does not set EXISTDB_SERVER,
relying on gulp-exist's default (secure:true, port:8443). Our CI was
using port 8080 (HTTP) with EXISTDB_SERVER=http://localhost:8080, which
clashed with that default and caused SSL errors.

- build.yml: expose port 8443 instead of 8080; remove EXISTDB_* env vars
- gulpfile.js: revert to roaster's plain defaultOptions (no serverUrl workaround)
- test/run-tests.js: default to https://localhost:8443; allow self-signed cert
- .env.example: update default to https://localhost:8443

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
expath-pkg.xml only allows EXPath-standard elements (title, dependency,
component declarations like xquery). Elements like author, website, status,
license, copyright, type, target belong in repo.xml only.

Also switch from non-standard <module namespace pattern> to standard
<xquery> component declaration, following roaster's approach.

repo.xml.tmpl: add <copyright> and <type> to match roaster's template.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@joewiz joewiz force-pushed the migrate-to-node-build branch from 3f33771 to 49a4ae1 Compare February 22, 2026 04:49
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