简体   繁体   中英

Is there a solution to automate the versioning of an API inside a spring project?

I would like to automate the process of changing the version of the API I use in my java project (from the pom.xml) and build the project automatically in a branch on Azure DevOps.

I'm working on a java project right now, and I'm using another external project (equivalent of API to communicate with another application). What I do at the moment is manually check the current API version (external project) that I see on my Azure DevOps dashboard (Screenshot bellow), and I manually change on my pom.xml from my java project. What I want: Automate this process so that after each new version of the API, the build of the new version on my project is done automatically without intervention and on a separate branch for example Azure dashboard

You can add Replace Tokens task in the build pipeline for the source project (or you mean "external project") and replace the version of the API in your java project (from the pom.xml) with the variable $(Build.BuildNumber) .

the build pipeline for the source project: 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM