I think there are valid use cases where expressions should be able to be used as version numbers. At least until mix-ins become available, using expressions for version numbers allows us to keep our poms DRY in ways that would be impossible otherwise.
For example, we have the following:
- A super POM that EVERYTHING inherits from
- A "jar" pom that contains settings that we use on our "standard" jars
- A "swc" pom that contains settings we use on swcs.
We have two projects that we release, let's call them "Project A" and "Project B". Both are multimodule projects and contain both jars and swcs.
Right now, we keep version number constants in the super POM, like:
Using this pattern, poms from A and B can inherit from the jar/swc parent poms accordingly, and just specify $
for their version number. And there is NOTHING that we have to maintain in more than one place.
If we have to have a single "project-a" parent pom that explicitly specifies a version number, then we are going to have to have the jar/swc parent poms inherit from that one, and then have the real modules inside of project a inherit from those. And we'll have to maintain another copy of those jar/swc poms for project b. With mix-ins we should be able to eliminate that redundancy, but until then, we are faced with the choice of using expressions for the version numbers or duplicating all of the content of our jar/swc poms, and the expressions path seems MUCH more manageable.