The better way is define your version in parent pom.xml as follows.
com.my.code
my_pro
${YOUR_VERSION}
1.7
1.0-SNAPSHOT// here you define your version
UTF-8
3.1.2.RELEASE
Then you don't want to change your version number one by one in all child pom.xml.
child pom.xml can add dependency as follows
${YOUR_VERSION}