OpenNTF / SocialSDK

IBM Social Business Toolkit SDK
https://developer.ibm.com/social
53 stars 70 forks source link

Cleanup all pom.xml: Use property for com.ibm.sbt dependency version IDs [enhancement] #1676

Closed zipwiz closed 9 years ago

zipwiz commented 9 years ago

I scanned the pom.xml files of the whole project, and ca. 99% use "1.1.4-SNAPSHOT" as version ID in dependencies referring to other IBM SBT SDK components -- but mysocial.webapp (e. g.) still refers to 1.0.1, and bss.provisioning.sample.app refers to LATEST (which is actually resolved to 1.1.3-20150220). This may cause unwanted inconsistencies.

Since all SBT projects seem to have a stringent parent/module hierarchy, I would propose to declare a version property in te topmost pom.xml and let all dependent pom.xml refer to this value. This way there will be only 1 single place to setup the version.

Obviously this is much work upfront just because of the present exceptions, but afterwards great calmness will come over this topic.

zipwiz commented 9 years ago

Actually I found the following pom.xml with com.ibm.sbt version values other than 1.1.4-SNAPSHOT (or 9.0.0 for commons-xml stuff):

libraries/com.ibm.sbt.libs.derby/pom.xml (was: parent -> 1.0.0-SNAPSHOT) libraries/com.ibm.sbt.libs.java/pom.xml (was: parent -> 1.0.0-SNAPSHOT) samples/j2ee/templates/mysocial.webapp/pom.xml (was: dependencies -> 1.0.1) samples/java/bss.provisioning.sample.app/pom.xml (was: self: 0.0.1; dependency -> LATEST) samples/java/sbt.bss.app/pom.xml (was: parent, dependencies -> 1.0.0-SNAPSHOT) samples/java/sbt.bss.changepassword.app/pom.xml (was: parent, dependencies -> 1.0.0-SNAPSHOT) sdk/sbt.sso.webapp-archetype/src/main/resources/archetype-resources/pom.xml (was: parent, dependencies -> 1.0.0-SNAPSHOT)

Additionally the OSGi package has version 1.0.0, but this may be by purpose. Thus I did not experiment with this.

I changed all com.ibm.sbt artifact version IDs to 1.1.4-SNAPSHOT in these pom.xml files and ran a full fresh build (clean install), and everything went fine. Thus I propose to update these pom's to this version ID for self, parent and dependency version.

prb112 commented 9 years ago

They already are.

zipwiz commented 9 years ago

No:

https://github.com/OpenNTF/SocialSDK/blob/master/libraries/com.ibm.sbt.libs.derby/pom.xml :: parent version is 1.0.0-SNAPSHOT (parent has no explicit version set, and "grand parent" = root has actually version SNAPSHOT-1.1.4)

https://github.com/OpenNTF/SocialSDK/blob/master/libraries/com.ibm.sbt.libs.java/pom.xml :: :: parent version is 1.0.0-SNAPSHOT (parent has no explicit version set, and "grand parent" = root has actually version SNAPSHOT-1.1.4)

https://github.com/OpenNTF/SocialSDK/blob/master/samples/j2ee/templates/mysocial.webapp/pom.xml :: Parent version OK, but dependency version is 1.0.1

https://github.com/OpenNTF/SocialSDK/blob/master/samples/java/bss.provisioning.sample.app/pom.xml :: No parent, version=0.0.1, dependency=LATEST

https://github.com/OpenNTF/SocialSDK/blob/master/samples/java/sbt.bss.app/pom.xml :: parent and dependency point to 1.0.0-SNAPSHOT

https://github.com/OpenNTF/SocialSDK/blob/master/samples/java/sbt.bss.changepassword.app/pom.xml :: same as last pom

https://github.com/OpenNTF/SocialSDK/blob/master/sdk/sbt.sso.webapp-archetype/src/main/resources/archetype-resources/pom.xml :: parent and dependency point to 1.0.0-SNAPSHOT, but version uses ${version}; this is no regular pom.xml however.

If these version IDs are deliberately chosen, then no action is required -- but it does not look so.

prb112 commented 9 years ago

Legacy reasons. And with intent.

zipwiz commented 9 years ago

OK - I didn't know. (This possibility was the reason why I didn't create a pull request.)