See line 38 of PerforceAddConsumer.
The regexp assumes a "#1" is appended to depot location when adding a file. This is only true for files that have never been in the depot before. When using generateReleasePoms, the release-pom.xml gets committed and then deleted during release:prepare. Upon subsequent prepares, the revision number will not be "#1".