Add support complex version number.

Add support to use static text and environment variable in version
field.

Note: Since I'm not familiar with Java regex, I guess only one environment is supported.