This is a parent POM that is shared across my GitHub repositories.
This is used to centralize versions, plugin setup and common properties to avoid redundancies or duplicate
configurations using inheritance between pom files. It helps in easy maintenance in long term.
- test-automation-fwk
- test-java2robot-adapter
- test-webdriver-downloader
- test-robot-framework
- test-testng-framework
- test-cucumber-framework
In the same directory, clone this repository first and after that clone other dependent repositories.
git clone git@github.com:ndviet/test-parent-pom.gitpom.xml remains the source of truth for the parent POM metadata. Gradle now drives this repository's build and publishing flow by rendering a resolved POM from that template.
Build and verify the generated parent POM:
gradle buildFormat Java sources:
gradle formatJavaInstall the parent POM to your local Maven cache:
gradle publishToMavenLocalDeploy a snapshot or release revision to GitHub Packages:
GH_PACKAGES_USERNAME=...
GH_PACKAGES_TOKEN=...
GITHUB_REPOSITORY=ndviet/test-parent-pom
gradle deploy -Prevision=26.3.0-SNAPSHOTPublish a non-SNAPSHOT release:
GH_PACKAGES_USERNAME=...
GH_PACKAGES_TOKEN=...
GITHUB_REPOSITORY=ndviet/test-parent-pom
gradle release -Prevision=26.3.0This repository provides a standalone base image: test-automation-java-base.
It contains:
- Java 21
- Maven
- Gradle CLI
- Official base image:
gradle:jdk21 - Pre-seeded Maven local repository with the published
test-parent-pomartifact - Offline-first execution defaults (
mvn -o,gradle --offline) to prevent network fetch in downstream runs
Build locally:
./containers/build-java-base-image.sh ghcr.io/ndviet/test-automation-java-baseTags created:
ghcr.io/ndviet/test-automation-java-base:latestghcr.io/ndviet/test-automation-java-base:<revision>(from<revision>inpom.xml)
GitHub Actions workflow:
.github/workflows/publish-java-base-image.yml.github/workflows/publish-maven-github.yml
Workflow tagging behavior:
pushonmaster: publishes:ghcr.io/ndviet/test-automation-java-base:latestghcr.io/ndviet/test-automation-java-base:<revision>-SNAPSHOT
pushon tagv*: publishes release tagsghcr.io/ndviet/test-automation-java-base:latestghcr.io/ndviet/test-automation-java-base:<revision-without-SNAPSHOT>
Required repository secrets for publish:
GH_PACKAGES_USERNAMEGH_PACKAGES_TOKEN
Optional runtime override (if online fetch is intentionally needed):
FORCE_MAVEN_OFFLINE=falseFORCE_GRADLE_OFFLINE=false