The ezd build currently builds the Angular components inline:
- Runs
ccms-components/build.shwhich callsnpm run build:shared && npm run build:elements - Angular output goes to
app-server/server/webapps/ezd-nxtgen/ccms-components/browser/(configured viaangular.jsonoutputPath) PublicAssetResourceImpl.javafinds the hashed files (main-{HASH}.js,styles-{HASH}.css) in that directory and generates a dynamic loader script served at/ezdnxtgen/api/assets/ccms-component-loader.jsezd.htmlloads that script, which injects<script>and<link>tags for the bundle- Maven packages everything into
ezd-installer.sh
| File | Role |
|---|---|
app-server/server/webapps/ezd-nxtgen/ezd.html |
Loads ccms-component-loader.js |
backends/exist/exist-ezd-endpoints/.../PublicAssetResourceImpl.java |
Generates loader script, finds hashed bundle files on disk |
.github/workflows/build_release.yml |
Builds ccms-components as part of the release |
.github/workflows/build_qa_installers.yml |
Builds ccms-components as part of QA |
In dev mode (JCMUtil.isSystemInDevelopmentMode()):
- Points to
http://localhost:4200/main.jsandhttp://localhost:4200/styles.css
In production:
- Scans
exist.home/webapps/ezd-nxtgen/ccms-components/browser/formain-*.jsandstyles-*.css - Generates a loader script that injects those files into the DOM
No Java code changes required. Replace the inline Angular build with a Maven download from an ezd-angular release.
Every merge to main in ezd-angular automatically creates:
- A dated release (e.g.,
v2025.02.09.1,v2025.02.09.2) — permanent, immutable - A
latestrelease — always points to the most recent build on main
You can also create manual releases by pushing a tag (git tag v1.0.0 && git push --tags).
GitHub release assets have direct download URLs that Maven can fetch without any extra tooling:
# Latest (always the newest build)
https://github.com/Jorsek/ezd-angular/releases/latest/download/ezd-angular-latest.tar.gz
# Specific version
https://github.com/Jorsek/ezd-angular/releases/download/v2025.02.09.1/ezd-angular-2025.02.09.1.tar.gz
Add the following to app-server/pom.xml. This replaces ccms-components/build.sh — no Node.js or npm needed for ezd builds.
<properties>
<!-- Integration branch: use "latest" -->
<ezd.angular.version>latest</ezd.angular.version>
<ezd.angular.url>https://github.com/Jorsek/ezd-angular/releases/latest/download/ezd-angular-latest.tar.gz</ezd.angular.url>
</properties>On a release branch, override to pin a specific version:
<properties>
<ezd.angular.version>2025.02.09.1</ezd.angular.version>
<ezd.angular.url>https://github.com/Jorsek/ezd-angular/releases/download/v${ezd.angular.version}/ezd-angular-${ezd.angular.version}.tar.gz</ezd.angular.url>
</properties>Uses maven-antrun-plugin (already in the project) to download and extract the release artifact during generate-resources, before GWT compile and packaging:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>download-angular</id>
<phase>generate-resources</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<mkdir dir="${server.dir}/webapps/ezd-nxtgen/ccms-components"/>
<get src="${ezd.angular.url}"
dest="${project.build.directory}/ezd-angular.tar.gz"
skipexisting="false"/>
<untar src="${project.build.directory}/ezd-angular.tar.gz"
dest="${server.dir}/webapps/ezd-nxtgen/ccms-components"
compression="gzip"/>
</target>
</configuration>
</execution>
</executions>
</plugin>In build_release.yml and build_qa_installers.yml, remove the steps that run ccms-components/build.sh. Maven now handles the Angular artifacts automatically.
The Node.js setup steps in those workflows can also be removed since npm is no longer needed for the ezd build.
| Scenario | What happens |
|---|---|
mvn package on integration branch |
Downloads latest Angular build from GitHub |
mvn package on release branch |
Downloads pinned version from GitHub |
| Local dev (Angular developer) | npm run watch in ezd-angular, loader uses localhost:4200 |
| Local dev (non-Angular developer) | mvn package downloads pre-built artifacts, no Node.js needed |
If you prefer to keep the download in the workflow YAML rather than Maven (e.g., for caching or visibility), you can use these steps instead.
- name: Download latest ezd-angular
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download latest \
--repo Jorsek/ezd-angular \
--pattern 'ezd-angular-latest.tar.gz' \
--dir /tmp
mkdir -p app-server/server/webapps/ezd-nxtgen/ccms-components
tar -xzf /tmp/ezd-angular-latest.tar.gz \
-C app-server/server/webapps/ezd-nxtgen/ccms-components- name: Download pinned ezd-angular
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(cat .ezd-angular-version)
gh release download "v${VERSION}" \
--repo Jorsek/ezd-angular \
--pattern 'ezd-angular-*.tar.gz' \
--dir /tmp
mkdir -p app-server/server/webapps/ezd-nxtgen/ccms-components
tar -xzf /tmp/ezd-angular-*.tar.gz \
-C app-server/server/webapps/ezd-nxtgen/ccms-componentsezd-angular main ──▸ auto-releases: v2025.02.09.1, v2025.02.09.2, v2025.02.10.1, ...
└── "latest" always points to newest
ezd integration branch ──▸ Maven downloads "latest" on every build
ezd release branch ──▸ Maven downloads pinned version (e.g., "2025.02.09.2")
- Develop Angular components, merge PRs to ezd-angular main
- Each merge auto-creates a dated release + updates
latest - Integration branch in ezd automatically picks up every new build via Maven
- When ready to cut a release, note the current version (e.g.,
v2025.02.10.1) - Set
ezd.angular.versionproperty to2025.02.10.1on the ezd release branch - That version is locked for the release — no surprises from newer Angular changes
To update the Angular version on a release branch:
- Check available releases:
gh release list --repo Jorsek/ezd-angular - Update
ezd.angular.versionandezd.angular.urlinapp-server/pom.xml - Open a PR in ezd — Maven will download and build with that version
Local development doesn't change. Developers still:
- Run
npm run watchin ezd-angular (serves atlocalhost:4200) - Start ezd normally
- The loader script points to
localhost:4200in dev mode
Developers not working on Angular don't need Node.js at all — mvn package handles everything.