[英]update version in package.json to be the same as project.version in POM
I am actually trying to do some automatisation on my project.我实际上正在尝试对我的项目进行一些自动化。
Actually I run a command to update my POM version usgin mvn --batch-mode release:update-versions -DdevelopmentVersion=XXX-SNAPSHOT
.实际上我运行了一个命令来更新我的 POM 版本 usgin
mvn --batch-mode release:update-versions -DdevelopmentVersion=XXX-SNAPSHOT
。
I have to update the version in the package.json of my application manualy each time I do this.每次执行此操作时,我都必须手动更新应用程序 package.json 中的版本。
How could I link the package version to my POM version?如何将 package 版本链接到我的 POM 版本?
I try sheacrhing some answer but could not find anything that does'nt require for me to rerun another command line我尝试搜索一些答案,但找不到任何不需要我重新运行另一个命令行的东西
(Application achitectur: POM parent/POM Backend (java)/Pom FrontEnd (AngularJS)) (应用程序架构:POM parent/POM Backend (java)/Pom FrontEnd (AngularJS))
npm version 'your version'
updates the package.json to the specified version. npm version 'your version'
将 package.json 更新为指定的版本。
npm version patch|minor|major
auto increments your version. npm version patch|minor|major
自动增加你的版本。
Add this command to your pom.xml and it should work just fine.将此命令添加到您的 pom.xml 中,它应该可以正常工作。
Hiho,嗨,
even though it's been quite some time since you asked.... maybe this Maven plugin will help you.尽管自您问起已经有一段时间了……也许这个 Maven 插件会对您有所帮助。 :)
:)
https://github.com/ingogriebsch/sync-packagejson-version-maven-plugin https://github.com/ingogriebsch/sync-packagejson-version-maven-plugin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.