This guide documents how to build, test, and publish the Boundary framework libraries to Clojars.
| Library | Artifact ID | Dependencies |
|---|---|---|
| core | io.github.thijs-creemers/boundary-core | None |
| observability | io.github.thijs-creemers/boundary-observability | core |
| platform | io.github.thijs-creemers/boundary-platform | core, observability |
| user | io.github.thijs-creemers/boundary-user | platform |
| admin | io.github.thijs-creemers/boundary-admin | platform, user |
| storage | io.github.thijs-creemers/boundary-storage | platform |
| scaffolder | io.github.thijs-creemers/boundary-scaffolder | core |
Create an account at clojars.org if you don't have one.
Generate a deploy token:
Set your Clojars credentials:
export CLOJARS_USERNAME=your-username
export CLOJARS_PASSWORD=your-deploy-token
Or add to ~/.m2/settings.xml:
<settings>
<servers>
<server>
<id>clojars</id>
<username>your-username</username>
<password>your-deploy-token</password>
</server>
</servers>
</settings>
Libraries use semantic versioning: MAJOR.MINOR.PATCH
The build.clj files use git-based versioning:
(def version (format "0.1.%s" (b/git-count-revs nil)))
This creates versions like 0.1.42 based on git commit count.
For release versions, update build.clj:
;; Replace dynamic version with fixed version
(def version "1.0.0")
cd libs/core
clojure -T:build clean
clojure -T:build jar
Output: libs/core/target/boundary-core-0.1.X.jar
for lib in core observability platform user admin storage scaffolder; do
echo "Building $lib..."
(cd libs/$lib && clojure -T:build clean && clojure -T:build jar)
done
# From repository root
clojure -M:test:db/h2
clojure -M:clj-kondo --lint libs/*/src libs/*/test
Install to local Maven repository:
cd libs/core
clojure -T:build install
Verify installation:
ls ~/.m2/repository/io/github/thijs-creemers/boundary-core/
Libraries must be published in dependency order:
cd libs/core
clojure -T:build deploy
#!/bin/bash
set -e # Exit on error
LIBS_ORDER="core observability platform scaffolder user storage admin"
for lib in $LIBS_ORDER; do
echo "========================================="
echo "Publishing boundary-$lib..."
echo "========================================="
(cd libs/$lib && clojure -T:build deploy)
echo "✅ boundary-$lib published successfully"
echo ""
# Wait for Clojars to index the library
sleep 30
done
echo "🎉 All libraries published!"
Check Clojars:
When publishing new versions, update inter-library dependencies:
;; libs/observability/deps.edn
{:deps {boundary/core {:local/root "../core"}}}
;; libs/observability/deps.edn (for release)
{:deps {io.github.thijs-creemers/boundary-core {:mvn/version "0.1.42"}}}
Use Clojure CLI aliases:
;; deps.edn
{:deps {io.github.thijs-creemers/boundary-core {:mvn/version "0.1.42"}}
:aliases
{:local {:override-deps {io.github.thijs-creemers/boundary-core {:local/root "../core"}}}}}
Development: clojure -M:local:test
Production: clojure -M:test
Before releasing a new version:
clojure -M:test:db/h2clojure -M:clj-kondo --lint libs/*/srcgit tag v0.1.0git push origin v0.1.0Error deploying artifact: Unauthorized
Solution: Check CLOJARS_USERNAME and CLOJARS_PASSWORD environment variables.
Error: version 0.1.42 already exists
Solution: Bump version number or delete the existing version on Clojars (only possible within 24 hours of upload).
Could not find artifact io.github.thijs-creemers/boundary-core
Solution:
rm -rf ~/.m2/repository/io/github/thijs-creemers/If POM is malformed:
cd libs/core
clojure -T:build clean
clojure -T:build jar
# Check generated POM
cat target/classes/META-INF/maven/io.github.thijs-creemers/boundary-core/pom.xml
For automated publishing, create .github/workflows/publish.yml:
name: Publish to Clojars
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # For git-count-revs
- uses: DeLaGuardo/setup-clojure@master
with:
cli: 'latest'
- name: Publish libraries
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
run: |
for lib in core observability platform scaffolder user storage admin; do
(cd libs/$lib && clojure -T:build deploy)
sleep 30
done
For issues with publishing:
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |