How can I use maven build number as TeamCity build number?

When I set up a default Maven2 project from POM, TeamCity is supposed to use the Maven build number as its own build number (I think). However, this does not work for me, TeamCity simply uses it's own number (1, 2, 3, etc). My POMs have SNAPSHOT version. I would like TeamCity to use the sequence number that Maven attaches a SNAPSHOT artifact (e.g. the number 3 from the following artifact: agents-api-38.0.0-20100112.042101-3.pom). How do I configure this in TeamCity?


Please sign in to leave a comment.