Member-only story
How to Use Github Packages for Deploying Jars
Access all the classes that you deployed to Github packages in your current project
In projects where you have multiple microservices, you have different deployments of each microservice. some microservice you connect with making REST APIs and some microservice you directly use as library dependency in your project.
In this article, I will show you how you can use Github Packages to create and deploy your artifact jar and how you can use this artifact jar in your project with proper versioning.
Creating jar and deploying
The first thing you need to do is modify your pom.xml
Here, we have defined our distribution path where our artifact jar will go.
Now we just need to create a GitHub action workflow that will release a jar when we are creating a release in GitHub.