-
1. Re: Maven mojo proposal: setVersion
dward Oct 4, 2012 3:41 PM (in response to dward)Would also be easy for this to update the project/properties/version.distro property, as well as values inside installer.properties.
-
2. Re: Maven mojo proposal: setVersion
mageshbk Oct 5, 2012 2:22 AM (in response to dward)Looks nice. But there seem to be another one on codehaus: http://mojo.codehaus.org/versions-maven-plugin/examples/set.html
Does this not look much useful for our case? http://maven.apache.org/plugins/maven-release-plugin/examples/update-versions.html
-
3. Re: Maven mojo proposal: setVersion
kcbabo Oct 5, 2012 8:00 AM (in response to mageshbk)The maven approach looks promising. It would be good to verify that the diff after the update only shows the version change vs. an entire file diff due to line endings / space vs. tab / etc.
-
4. Re: Maven mojo proposal: setVersion
dward Oct 5, 2012 11:01 AM (in response to mageshbk)I had already seen that plugin and played with it for quite some time. It is very finicky, and doesn't always do what you think it's gonna do. For example, updating the version is finding the newest version in a repository vs. setting it to what you want it to be. In other cases, where you can explicity set it, it requires you to change your pom's to be "prepped" for use with the plugin. For example, it doesn't like you to use property placeholders for versions in dependencies you want to change. It would rather those be hardcoded and have it do the work of going through and changing them. Finally, it only updates <version>s, it does not update <property>s that we define as version variables (ie: version.distro and switcyard.version), and won't update properties files (like our installer.properties). We need something that does all of the above.
-
5. Re: Maven mojo proposal: setVersion
dward Oct 5, 2012 11:05 AM (in response to kcbabo)I thought about "the diff after the update" thing, and while it is possible to maintain all the crazy whitespace we have, I am of the opinion that I actually WANT it to homogenize the XML. Our pom files right now are an atrocious mix of spaces (and various numbers of spaces) and tabs and newlines and what-have-you, all mixed in the same file. If we sanitize the XML up front once (it can be done as part of the same pull request that introduces the plugin), then from then on the only changes would be the versions, unless of course someone introduced bad formatting at some point, in which case it would clean that up to. I actually like this. Sort of like a "checkstyle" for our poms.
-
6. Re: Maven mojo proposal: setVersion
kcbabo Oct 5, 2012 11:08 AM (in response to dward)I agree. It's cool to establish a baseline formatting for all poms here and now, which will make diffs easier in the future. That said, we should make sure the new formatting lines up with reasonable defaults (no tabs, proper indentation, etc.). An easy way to test this is to run the script and then add a dependency to a pom to see if the formatting gets screwed up.
-
7. Re: Maven mojo proposal: setVersion
dward Oct 5, 2012 11:12 AM (in response to kcbabo)Well the plugin actually uses our Configuration code to manipulate the DOM tree, so it can also use it's mechanism to pretty-print, which uses spaces, proper indents, etc.
-
8. Re: Maven mojo proposal: setVersion
dward Oct 9, 2012 5:04 PM (in response to dward)Pull requests submitted on the jira. Here are the mojo instructions: Switchyard Maven Versioning Process