Including the version in a Maven artifact

Recently I wanted to include the version of an artifact generated by a Maven build into a text file in that artifact. As Google and and good friends will help you with, I was pointed to this article that was exactly what I wanted.

Basically, create a /src/main/resources/version.txt file with the following content…


… then including the following snippet in your “build”…

Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon 🙂

You or someone you know looking to buy or sell?

Leave a Reply