This guide provides a step-by-step process for deploying a dependency to Maven Central Repository via OSS Sonatype.
Ensure you have the cloud-store-sdk-maven project directory, containing the necessary settings.xml and sunbird.asc files.
cloud-store-sdk-maven
settings.xml
sunbird.asc
Access the Repository:
Open your web browser and navigate to OSS Sonatype.
Login:
Use the username and password from the cloud-store-sdk-maven/settings.xml file.
cloud-store-sdk-maven/settings.xml
Generate a User Token:
After logging in, go to your profile.
From the profile drop-down menu, select User Token.
Click on Access User Token to generate a new username and token.
Update Maven Settings:
Add the newly generated username and token to your settings.xml file.
Copy the updated settings.xml file to your .m2 folder.
.m2
Deploy the Dependency:
Navigate to the directory cloud-store-sdk_2.12.
cloud-store-sdk_2.12
If you encounter GPG key errors, run: mvn deploy -DskipTests
mvn deploy -DskipTests
Note: If you encounter GPG key errors, ensure that your GPG keys are valid or adjust your deployment command as needed.
Verify Deployment:
Open your browser and navigate to the Staging Repositories page to confirm your dependency has been pushed to the staging repository.
Release the Dependency:
Once confirmed, click the Release button to promote the dependency from the Staging Repository to Maven Central.
Last updated 10 months ago