- Write a RESTful API with Ballerina
- Write a gRPC service with Ballerina
- Write a GraphQL API with Ballerina
- Work with data using queries in Ballerina
- Build a data service in Ballerina
- Build a Change Data Capture (CDC) service in Ballerina
- Work with Large Language Models (LLMs) using natural expressions
- Deploy Ballerina on Kubernetes
- Manage data persistence with bal persist
- Create your first connector with Ballerina
- Write a workflow with Ballerina
- Write a workflow with a human task
- Handle errors and replay failed activities in workflows
Use the local repository to temporarily override package dependencies during package development and bug-fixing.
The local repository is also a file system repository, which will be created in the <USER_HOME> location. The repository location is <USER_HOME>/.ballerina/repositories/local/bala.
Use dependencies from the local repository
The local repository is useful to test a package in the development phase or to fix bugs. To specify a dependency from the local repository, first, you need to publish it to the local repository by following the steps below.
-
Generate the Ballerina archive after editing the package source files as required.
$ bal pack -
Publish to the local repository.
$ bal push --repository localIf you already have the path of Ballerina archive, then you can simply execute the following command.
$ bal push --repository local <path-to-bala-archive> -
Specify the dependency in the
Ballerina.tomlfile.[[dependency]] org = "ballerinax" name = "googleapis.gmail" version = "2.1.1" repository = "local"
Once you complete the above steps, the dependency will be picked from the local repository when building the package.
Ballerina considers the version specified in the Ballerina.toml file as the minimum required version and uses the local repository to resolve the dependency.
However, the compiler gives priority to the latest version if a new patch version is found in the distribution or Ballerina Central repositories.
At this point, the compiler resolves the latest version and ignores the dependency version in the local repository.