<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-5261056907132640554.post7460957707602338257..comments</id><updated>2011-09-22T21:50:45.196-07:00</updated><category term='ruby'/><category term='reflection'/><category term='dynect'/><category term='GWT'/><category term='s3'/><category term='ec2 eclipse'/><category term='ec2'/><category term='macosx'/><category term='video standup'/><category term='jersey'/><category term='emr'/><category term='hadoop'/><category term='iam'/><category term='job'/><category term='java kill process'/><category term='cloudwatch'/><category term='firefox plugin'/><category term='hive'/><category term='performance'/><category term='aws'/><category term='Google I/O'/><category term='gslb'/><category term='ebs'/><category term='crowdflower'/><category term='thrift'/><category term='growl'/><category term='xml'/><category term='berkeleydb'/><category term='hackday'/><category term='visualization'/><category term='ant'/><category term='scala'/><category term='java'/><category term='engineering'/><category term='programming'/><category term='culture'/><category term='cloudviz'/><category term='bash'/><category term='OO'/><category term='mongodb'/><category term='ichat'/><category term='ops'/><category term='appengine'/><category term='simple db'/><category term='Google Visualizations'/><category term='salesforce dart'/><category term='unit testing'/><category term='boto'/><category term='capistrano'/><category term='sdbtool'/><category term='udtf'/><title type='text'>Comments on bizo developer blog: Exposing SVN version and build time with Ant</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dev.bizo.com/feeds/7460957707602338257/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5261056907132640554/7460957707602338257/comments/default'/><link rel='alternate' type='text/html' href='http://dev.bizo.com/2009/03/exposing-svn-version-and-build-time.html'/><author><name>larry ogrodnek</name><uri>http://www.blogger.com/profile/01105034385285773975</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5261056907132640554.post-67895306392152124</id><published>2011-09-22T21:15:48.883-07:00</published><updated>2011-09-22T21:15:48.883-07:00</updated><title type='text'>FYI, you&amp;#39;ll likely want to use committedRevisi...</title><content type='html'>FYI, you&amp;#39;ll likely want to use committedRevisionProperty rather than revisionProperty. The latter gets the number of the revision you have selected (normally HEAD, so the revision of HEAD across the repository), while the former gets the number of the revision last committed. That is generally more useful.&lt;br /&gt;&lt;br /&gt;I.e., if you are building project A, which was committed at r1, but project B has been added to the repository at r2, HEAD (and thus revisionProperty) will be &amp;quot;2&amp;quot;. committedRevisionProperty will be 1.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5261056907132640554/7460957707602338257/comments/default/67895306392152124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5261056907132640554/7460957707602338257/comments/default/67895306392152124'/><link rel='alternate' type='text/html' href='http://dev.bizo.com/2009/03/exposing-svn-version-and-build-time.html?showComment=1316751348883#c67895306392152124' title=''/><author><name>Luke</name><uri>http://www.blogger.com/profile/17377652869501527815</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://dev.bizo.com/2009/03/exposing-svn-version-and-build-time.html' ref='tag:blogger.com,1999:blog-5261056907132640554.post-7460957707602338257' source='http://www.blogger.com/feeds/5261056907132640554/posts/default/7460957707602338257' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-66776144'/></entry><entry><id>tag:blogger.com,1999:blog-5261056907132640554.post-1630730933597633956</id><published>2009-05-30T22:43:53.267-07:00</published><updated>2009-05-30T22:43:53.267-07:00</updated><title type='text'>Here is another tip.

Put this inside your &amp;lt;jar...</title><content type='html'>Here is another tip.&lt;br /&gt;&lt;br /&gt;Put this inside your &amp;lt;jar&amp;gt;&amp;lt;/jar&amp;gt; in ant:&lt;br /&gt;&lt;br /&gt;   &amp;lt;manifest&amp;gt;&lt;br /&gt;    &amp;lt;attribute name=&amp;quot;Specification-Version&amp;quot; value=&amp;quot;${version}&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;attribute name=&amp;quot;Implementation-Version&amp;quot; value=&amp;quot;${TODAY}&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;attribute name=&amp;quot;Main-Class&amp;quot; value=&amp;quot;com.foo.Version&amp;quot; /&amp;gt;&lt;br /&gt;   &amp;lt;/manifest&amp;gt;&lt;br /&gt;&lt;br /&gt;package.com.foo;&lt;br /&gt;&lt;br /&gt;public class Version&lt;br /&gt;{&lt;br /&gt; /** */&lt;br /&gt; public static String getSpecification()&lt;br /&gt; {&lt;br /&gt;  Package pkg = Version.class.getPackage();&lt;br /&gt;  return (pkg == null) ? null : pkg.getSpecificationVersion();&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; /** */&lt;br /&gt; public static String getImplementation()&lt;br /&gt; {&lt;br /&gt;  Package pkg = Version.class.getPackage();&lt;br /&gt;  return (pkg == null) ? null : pkg.getImplementationVersion();&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; /**&lt;br /&gt;  * A simple main method that prints the version and exits&lt;br /&gt;  */&lt;br /&gt; public static void main(String[] args)&lt;br /&gt; {&lt;br /&gt;  System.out.println(&amp;quot;Version: &amp;quot; + getSpecification());&lt;br /&gt;  System.out.println(&amp;quot;Implementation: &amp;quot; + getImplementation());&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Then, you can do this:&lt;br /&gt;&lt;br /&gt;java -jar my.jar&lt;br /&gt;&lt;br /&gt;No need to put version numbers in jar files ever again. =)&lt;br /&gt;&lt;br /&gt;You also get to easily do this:&lt;br /&gt;&lt;br /&gt; /** @return all the version numbers */&lt;br /&gt; public Package[] getVersions()&lt;br /&gt; {&lt;br /&gt;  &lt;br /&gt;  Package[] packages = Package.getPackages();&lt;br /&gt;  return packages;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Then in a jsp page:&lt;br /&gt;&lt;br /&gt; &amp;lt;table&amp;gt;&lt;br /&gt;  &amp;lt;tr&amp;gt;&lt;br /&gt;   &amp;lt;th&amp;gt;Package&amp;lt;/th&amp;gt;&lt;br /&gt;   &amp;lt;th&amp;gt;Version&amp;lt;/th&amp;gt;&lt;br /&gt;   &amp;lt;th&amp;gt;Implementation&amp;lt;/th&amp;gt;&lt;br /&gt;  &amp;lt;/tr&amp;gt;&lt;br /&gt;  &amp;lt;c:forEach var=&amp;quot;pkg&amp;quot; items=&amp;quot;${backend.versions}&amp;quot;&amp;gt;&lt;br /&gt;   &amp;lt;tr&amp;gt;&lt;br /&gt;    &amp;lt;td&amp;gt;&amp;lt;c:out value=&amp;quot;${pkg.name}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;    &amp;lt;td&amp;gt;&amp;lt;c:out value=&amp;quot;${pkg.specificationVersion}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;    &amp;lt;td&amp;gt;&amp;lt;c:out value=&amp;quot;${pkg.implementationVersion}&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;   &amp;lt;/tr&amp;gt;&lt;br /&gt;  &amp;lt;/c:forEach&amp;gt;&lt;br /&gt; &amp;lt;/table&amp;gt;&lt;br /&gt;&lt;br /&gt;To get something like this:&lt;br /&gt;&lt;br /&gt;http://subethamail.org/se/version.jsp&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-jon (author of svntask and appreciative of the nice comments about his project)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5261056907132640554/7460957707602338257/comments/default/1630730933597633956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5261056907132640554/7460957707602338257/comments/default/1630730933597633956'/><link rel='alternate' type='text/html' href='http://dev.bizo.com/2009/03/exposing-svn-version-and-build-time.html?showComment=1243748633267#c1630730933597633956' title=''/><author><name>Jon Scott Stevens</name><uri>http://www.blogger.com/profile/11867559494404858630</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='http://kaptcha.googlecode.com/svn/wiki/images/jonstevens.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://dev.bizo.com/2009/03/exposing-svn-version-and-build-time.html' ref='tag:blogger.com,1999:blog-5261056907132640554.post-7460957707602338257' source='http://www.blogger.com/feeds/5261056907132640554/posts/default/7460957707602338257' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1980883213'/></entry></feed>
