Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/full-build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ jobs:
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

publish-nexus-snapshots:
needs: build-core
uses: $/.github/workflows/publish-nexus-snapshots.yml
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PW: ${{ secrets.NEXUS_PW }}

publish-dockerhub:
needs: build-core
uses: ./.github/workflows/publish-dockerhub.yml
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/publish-nexus-snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Fineract Publish Client and Avro Snapshots to Apache Nexus
on:
workflow_dispatch:
workflow_call:
secrets:
DEVELOCITY_ACCESS_KEY:
required: false
NEXUS_USER:
required: false
NEXUS_PW:
required: false
permissions:
contents: read
jobs:
publish:
# Snapshots only, and only from develop. Releases are staged and promoted through a PMC vote,
# so they are never pushed from CI.
if: ${{ github.event_name == 'push' && github.ref_name == 'develop' }}
runs-on: ubuntu-24.04
timeout-minutes: 90
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
steps:
- name: Set up JDK 25
uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0
with:
java-version: '25'
distribution: 'zulu'

- name: Download workspace
id: download-workspace
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
continue-on-error: true
with:
name: fineract-workspace-${{ github.run_id }}
path: .

- name: Extract workspace
if: steps.download-workspace.outcome == 'success'
run: tar -xf fineract-workspace.tar

- name: Checkout
if: steps.download-workspace.outcome != 'success'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true

- name: Build workspace fallback
if: steps.download-workspace.outcome != 'success'
uses: $/.github/actions/setup-and-build-fineract
with:
cache-read-only: false

- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Apply Gradle memory budget
uses: $/.github/actions/gradle-memory-budget
with:
max-heap: '4g'
workers-max: '2'

# ASF Nexus credentials are provisioned by INFRA and are not available on forks or to
# pull requests. Without them the publish would fail with a 401, so skip instead.
- name: Check for Nexus credentials
id: creds
env:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
run: |
if [ -z "$NEXUS_USER" ]; then
echo "available=false" >> "$GITHUB_OUTPUT"
echo "::notice::NEXUS_USER is not set — skipping the snapshot publish."
else
echo "available=true" >> "$GITHUB_OUTPUT"
fi

# Only the three consumer-facing artifacts are published. Everything else in
# fineractPublishProjects stays buildable but is not pushed to Nexus.
#
# '-x buildJavaSdk' is required: the OpenAPI generator needs an 8g heap, and this job runs
# under the 4g budget above. The generated sources arrive already built in the workspace
# artifact (see .github/scripts/gradle-memory-budget.sh).
- name: Publish snapshots to Apache Nexus
if: steps.creds.outputs.available == 'true'
env:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PW: ${{ secrets.NEXUS_PW }}
run: |
./gradlew --no-daemon --console=plain \
:fineract-avro-schemas:publishMavenJavaPublicationToApacheRepository \
:fineract-client:publishMavenJavaPublicationToApacheRepository \
:fineract-client-feign:publishMavenJavaPublicationToApacheRepository \
-PnoSign=true \
-Pfineract.config.username="$NEXUS_USER" \
-Pfineract.config.password="$NEXUS_PW" \
-x buildJavaSdk
28 changes: 3 additions & 25 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,7 @@ buildscript {
[
'fineract-avro-schemas',
'fineract-client',
'fineract-client-feign',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamsaghy they are required to be published independently in order to be imported in projects. The fineract-client-feign brings everything, and we build more lighter apps. I will ask to keep all the libraries published + the fineract-client-feign

@adamsaghy adamsaghy Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IOhacker I am not sure i follow you on this one.

The built fineract-client / fineract-client-feign / fineract-avro-schemas are not depending on anything but its own files.

I see no reason to publish all fineract modules since it is not designed to be used as dependencies in any project, but their sole purpose to be modularized internally.

Any project who is intended to communicate with Fineract via fineract-client-feign, just add it as a jar dependency and use it. They dont need any of the other modules or anything further.

'fineract-core',
'fineract-security',
'fineract-cob',
'fineract-validation',
'fineract-command',
'fineract-command-jdbc',
'fineract-command-audit',
'fineract-accounting',
'fineract-provider',
'fineract-investor',
'fineract-charge',
'fineract-rates',
'fineract-tax',
'fineract-loan-origination',
'fineract-loan',
'fineract-savings',
'fineract-report',
'fineract-branch',
'fineract-document',
'fineract-progressive-loan',
'fineract-progressive-loan-embeddable-schedule-generator',
'fineract-working-capital-loan'
'fineract-client-feign'
].contains(it.name)
}
npmRepository = 'https://npm.pkg.github.com'
Expand Down Expand Up @@ -171,7 +149,7 @@ gitVersioning.apply {
}
}
rev {
version = '${describe.tag.version.major}.${describe.tag.version.minor.next}.0-SNAPSHOT'
version = '${describe.tag.version.major}.${describe.tag.version.minor.next}.0-${commit.short}-SNAPSHOT'
}
}

Expand Down Expand Up @@ -908,7 +886,7 @@ configure(project.fineractPublishProjects) {
mavenJava(MavenPublication) {
groupId = 'org.apache.fineract'
artifactId = project.name
version = "${project.version}-SNAPSHOT"
version = "${project.version}"

from components.java

Expand Down
Loading