maven - read version number from property file

前端 未结 4 378
自闭症患者
自闭症患者 2020-12-19 00:56

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

4条回答
  •  清酒与你
    2020-12-19 01:34

    Just to answer my own question: it turns out that Maven needs the property to be set before anything can happen in the script. As such, it is set in stone and not modifiable from a file. I ended up writing an Ant task that modifies the pom.xml and changes the version in the file, before Maven script is triggered. Ugly and non-trivial, but it works.

提交回复
热议问题