简体   繁体   English

将 package.json 中的版本更新为与 POM 中的 project.version 相同

[英]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.

相关问题 Angular 项目构建具有更高版本的清晰度,即 4 ,它可以包含在使用较低版本清晰度的平台 package.json 中,即 1.3 - Angular project build with higher version of clarity ie 4 , can it be included in a platform package.json which uses lower version of clarity ie 1.3 将package.json [version]发送到Angularjs前端以进行显示 - Send package.json [version] to Angularjs Front end for display purposes 如何使用package.json中的“version”属性作为grunt中应用程序的目录? - How do I use the “version” property in package.json as the app's directory in grunt? package.json无法在vs 2015 NET Core 1.0.0preview2-003121中还原Angle的正确版本 - package.json does not restore correct version of angular in vs 2015 NET Core 1.0.0preview2-003121 完全相同的 package.json 文件在空的全新项目中有效,但在旧项目中无效 - Same exact package.json file works in empty brand new project but doesn't in old project package.json中的jshintConfig用于角度项目 - jshintConfig in package.json for angular project 更新yeoman package.json文件 - update yeoman package.json file “npm install [package]”不更新 package.json - "npm install [package]" doesn't update package.json 更新所有不带package.json的npm软件包 - Update all npm packages without package.json handy 在AngularJS中显示POM版本号 - Displaying POM version number in AngularJS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM