How to build a Bahmni package with Gradle?

Hi Bahmni team!

I have customized some of the Bahmni package components, for instance Bahmni-web.

Now I’d like to build it as a RPM.

I have never used Gradle before (sorry if I miss something obvious then).

From the repo root directory:

cd bahmni-web/


gradle buildRpm

But got error:

:bahmni-web:extractBahmniApps FAILURE: Build failed with an exception.

What went wrong: Cannot expand ZIP ‘/home/romain/repos/bahmni/bahmni-package/bahmni-web/resources/’ as it does not exist.

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Total time: 4.03 secs

Obviously missing some pre-build steps to fetch

(Q) What should I do to build a bahmni package as RPM?

You are right. It expects to be present in resources folder.

you can download from

:slight_smile: ok thanks. I just though there was some automated Gradle build task that would fetch this artifact for me.

Yes, our CI pipelines does this automatically… since you are locally building this is a manual step

@sravanthi17, I can’t find the zip file from there. Building the project doesn’t output a zip file either.

Is this zip file simply an archive of the openmrs-module-bahmniapps/ui/dist/ folder?

Or is there a way to directly download it from your CI? Is it accessible to the public?

(When I try accessing, I get 503 - Service Temporarily Unavailable)

The URL of CI server is: (requires to use Github ID).

We will try and add a redirect so that people who have the old URL can be redirected to this new URL automatically.

@gsluthra, thanks, but same error on

(Also I had to manually allow the untrusted TLS certificate)

Sorry. I updated the URL.

OK thanks @gsluthra, that works. But my GitHub ID (rbuisson) does not allow me to login. Anything I need to configure on my side?

Once you login using your github creds, you should be able to submit a request for access. Can you please try that out.

I can’t even pass the first login screen:

It always fails.

I tried with email address too, doesn’t work either. By GitHub ID, do you mean the actual ID behind my GitHub user (like shown here:

Please click on the highlight icon in the image, which will redirect to github and you have to key in your github credentials.

@gsluthra, isn’t what @mksrom needs simply what is built and available in the ui/dist folder as a zip file? If he already has this built, does he need to download a different artifact?

@mseaton, yes, that’s right is simply an archive of the ui/dist folder. :slight_smile: so I am not blocked in my work now. The thing is I would prefer to get this file from an external source than having to fetch the code repo, build on the right branch and then archive. That is why I still would like to have a look at the Bahmni CI.

thanks @senthilrajar :slight_smile: I now have access.