简体   繁体   中英

Can I have a 4 part version for a maven artifact?

I have created a maven artifact that is a wrapper on a specific version of another maven artifact. For ease of use, I would like to keep my version in sync with the artifact that I depend on. However, I will likely be upgrading the version of my artifact more often than the other artifact's version. So, I would like to do something like this:

So, if the other artifact is like this:

org.foo.bar:blarb:1.7.0

I would like to release something like this:

org.foo.bar:blarb-wrapper:1.7.0.0

And that leaves me free to upgrade the wrapper to something like this:

org.foo.bar:blarb-wrapper:1.7.0.1

Both 1.7.0.0 and 1.7.0.1 of the wrapper will require 1.7.0 of blarb. When blarb comes out with 1.7.1, I will release 1.7.1.0 (and potentially more along the way).

So, my question is: Is this possible in maven, and if not what is a reasonable solution?

yes this is possible, as specified in the version-rules . You can access parts of the versions via the build helper, parse version

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