I`m trying to read my build version number from a text file, and then assign it to the generated package name: myRelease-1.1.1.apk where the build number is manually set int
I found I could work around this problem in maven by using the stuff about reading from the file suggested above, which does work for 'filtering' (putting stuff into a properties template file), so my application knows what version it is despite maven's confusion.
The reason I wanted it in the pom file is to put the version number into a couple of minified javascript file names so they wouldn't get cached across version updates... strictly speaking this doesnt require the actual version number so I used ${maven.build.timestamp}
instead which outputs the date + time of the build in the format yyyymmdd-hhmm
.
I think if I needed something more complex I'd start stripping stuff out into msbuild or something similar instead... Maven doesnt make things easy and after a year of battling it I dont really feel like its getting any better.