Fixing the issue so that the version for the artifact.xml is taken

WIth the current version of wso2-general-project-plugin, the version of the generated artifact.xml is always hardcoded to be the ${project.version}. This prevents a user to have a different version of the artifact for the same project.
One more problem with this approach is when using M2 release plugin to release a project. In the release:prepare phase the project.version is still a SNAPSHOT version and this version gets propagated to the artifact.xml, which is wrong.
To avoid the above problems and to give the user more flexibility in terms of versioning the artifact, the new approach proposed and implemented in the code is to honor the version defined in the version attribute of the artifact.xml. If the version defined is a maven property, it should be resolved and used. If the version defined is invalid or not defined then it should fallback to the $project.version, thus maintaining backward compatibility.
So, with the new approach if someone now wants to release the esb registry resources project using M2 release plugin. He/she has to just use a property named ${releaseVersion} in the version attribute of the artifact.xml. Since, M2 release plugin always injects a -DreleaseVersion=<VERSION DEFINED BY THE USER> as part of maven build. This will make the release process seamless and easy. 
If someone wants to run just  a maven clean or an install goal, he/she has to just define a maven property named releaseVersion in the pom.xml with the default value being $project.version.