Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
272 views
in Technique[技术] by (71.8m points)

Maven release plugin - how to publish only a snapshot?

I'm using maven release plugin to deploy new versions of software. When running

mvn release:prepare
mvn release:perform

Everything works as expected. If I tell maven to release version 2.1, it publishes an artifact 2.1 as well as a 2.2-20210205.061032-1, which I guess is some kind of snapshot. I'm wondering if it′s possible to perform a release for a new snapshot version ONLY?

The use case being that I have made some changes I want to publish for testing, before commiting to a final release. Something like 2.2-SNAPSHOT, or something like 2.2-YYYYMMDD.HHmmSS-X. When prompted by maven to enter the next version, if I enter 2.2-SNAPSHOT, it just repeats the question again.

Please advice on how to achieve this, or if I'm thinking about this the wrong way.

question from:https://stackoverflow.com/questions/66058609/maven-release-plugin-how-to-publish-only-a-snapshot

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you want to deploy a SNAPSHOT, just run

mvn clean deploy

The Maven Release Plugin is meant for release versions.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...