最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

build - Override effect of maven DnewVersion - Stack Overflow

programmeradmin5浏览0评论

I am building a AMS project from Adobe cloud manager pipeline.

This pipeline uses below command to build the project

mvn --batch-mode .codehaus.mojo:versions-maven-plugin:2.6:set -DnewVersion=5.10.0 -DprocessAllModules=true

This project has submodules and since the pipeline uses -DnewVersion command to set the version , artifacts for all submodules are created with the version given in this command in this case 5.10.0 (This version is of parent module).

But what i want is the build should create artifacts with version same as given in pom.xml.

Since these pipelines are standard i cannot change this command and I am looking for way to somehow override this.

I am not sure if we can so something in pom.xml to override this or there is any other way.

I am building a AMS project from Adobe cloud manager pipeline.

This pipeline uses below command to build the project

mvn --batch-mode .codehaus.mojo:versions-maven-plugin:2.6:set -DnewVersion=5.10.0 -DprocessAllModules=true

This project has submodules and since the pipeline uses -DnewVersion command to set the version , artifacts for all submodules are created with the version given in this command in this case 5.10.0 (This version is of parent module).

But what i want is the build should create artifacts with version same as given in pom.xml.

Since these pipelines are standard i cannot change this command and I am looking for way to somehow override this.

I am not sure if we can so something in pom.xml to override this or there is any other way.

Share Improve this question asked Mar 23 at 12:18 AWS_BeginnerAWS_Beginner 47612 silver badges23 bronze badges 1
  • The used version of the versions-maven-plugin is very old (2018!) (mojohaus./versions/versions-maven-plugin/index.html current versioon 2.18.0) I strongly recommend to upgrade that... also it might be a better way to use ci-friendly maven.apache./guides/mini/guide-maven-ci-friendly.html – khmarbaise Commented Apr 4 at 17:47
Add a comment  | 

1 Answer 1

Reset to default 0

You talk to whoever wrote the pipeline and ask them to change this step or make it optional.

Overriding this will not work, and is also not a good idea.

发布评论

评论列表(0)

  1. 暂无评论