<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7941992856438598472</atom:id><lastBuildDate>Thu, 05 Sep 2024 12:23:50 +0000</lastBuildDate><category>assembly</category><category>binary</category><category>maven</category><title>Technically Yours</title><description></description><link>http://tech.abhishekontheweb.com/</link><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><generator>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7941992856438598472.post-7867832784461992728</guid><pubDate>Thu, 11 Mar 2010 01:39:00 +0000</pubDate><atom:updated>2010-03-13T00:42:31.374-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">assembly</category><category domain="http://www.blogger.com/atom/ns#">binary</category><category domain="http://www.blogger.com/atom/ns#">maven</category><title>Binary files and Maven</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;Recently, I was frustrated while trying to package a Java keystore file from my Maven project to a project archive (tar or zip) using assembly.xml. Somehow, when I used the command:&lt;/div&gt;&lt;blockquote&gt;keytool -keystore cacerts -list&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;on the certificate keystore inside the tar/zip archive, it would just say that the keystore is invalid. After some search, I found that there is a little setting in the pom.xml which instructs maven not to do any filtering tasks on the files you specify when you execute a maven command.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Lets talk a bit about maven resources filtering. &lt;a href=&quot;http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html&quot;&gt;Maven resources documentation&lt;/a&gt; has a very good explanation of this feature.&amp;nbsp; Basically, when you use filtering=true inside your resources tag, the output file in the target folder will contain dynamic values of fields (if it had any). Like, for example:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiogemvEMOw4juR44Y1MlS0le4O3W_iyUpzzCE7oALW9EefmUemgJyKQ5SAcjTd1nNdYWcQRHuger6TcTrvj6_gbDbpnSpV02e-RGKISM1I39Q-MjPggdO0LSbJzrbMICYo8JjsBGnoiiZM/s1600-h/Screen+shot+2010-03-10+at+7.33.32+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;92&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiogemvEMOw4juR44Y1MlS0le4O3W_iyUpzzCE7oALW9EefmUemgJyKQ5SAcjTd1nNdYWcQRHuger6TcTrvj6_gbDbpnSpV02e-RGKISM1I39Q-MjPggdO0LSbJzrbMICYo8JjsBGnoiiZM/s320/Screen+shot+2010-03-10+at+7.33.32+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Suppose, src/main/resources has a Hello.txt, whose contents are Hello ${name}&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;If filtering is true, ${name} is going to be replaces with the actual value of the property &quot;name&quot; in the pom.xml, when the file is copied to target folder.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now, even though this filtering is useful, sometimes, we don&#39;t want maven to apply this feature on all files in the directory - for example certificate key stores, which are inherently binary in nature. So how do you tackle this? Simple, just use something like this:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihlcpHbbkvZZ9yrmIQmyiNadkSp7VVLQ64g1qriACNSmsAXws-UlnbqrXTWik3hMHecK74FLftIM5858zaWOGYNSyNuB9VPRTvNbhncEMcReyyzKWp9mUmTxHQyNwTwAXHvl0ZuCXwTkbZ/s1600-h/Screen+shot+2010-03-10+at+7.30.36+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihlcpHbbkvZZ9yrmIQmyiNadkSp7VVLQ64g1qriACNSmsAXws-UlnbqrXTWik3hMHecK74FLftIM5858zaWOGYNSyNuB9VPRTvNbhncEMcReyyzKWp9mUmTxHQyNwTwAXHvl0ZuCXwTkbZ/s320/Screen+shot+2010-03-10+at+7.30.36+PM.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Here, I am manually excluding files on which I don&#39;t want to apply filters.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Also, in the assembly.xml, I would like to keep line endings, as they might also corrupt these files.&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCZv6W53eaSkarqAIJQGAWoWWpS0FwSLUDr0uA8KUXJIFX0y1klI3ubr_u-xMQe8Ja1w4SQJNZfloYyPNRXp8l6gdfav8kohZYQFlLJV1CAZZ4_Fty7Jk1YolVE1-MSi6O-sSWo0PCgHg5/s1600-h/Screen+shot+2010-03-10+at+7.32.04+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCZv6W53eaSkarqAIJQGAWoWWpS0FwSLUDr0uA8KUXJIFX0y1klI3ubr_u-xMQe8Ja1w4SQJNZfloYyPNRXp8l6gdfav8kohZYQFlLJV1CAZZ4_Fty7Jk1YolVE1-MSi6O-sSWo0PCgHg5/s320/Screen+shot+2010-03-10+at+7.32.04+PM.png&quot; width=&quot;305&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;These simple steps will enable you to package any binary content files using Maven.&lt;/div&gt;</description><link>http://tech.abhishekontheweb.com/2010/03/binary-files-and-maven.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiogemvEMOw4juR44Y1MlS0le4O3W_iyUpzzCE7oALW9EefmUemgJyKQ5SAcjTd1nNdYWcQRHuger6TcTrvj6_gbDbpnSpV02e-RGKISM1I39Q-MjPggdO0LSbJzrbMICYo8JjsBGnoiiZM/s72-c/Screen+shot+2010-03-10+at+7.33.32+PM.png" height="72" width="72"/><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7941992856438598472.post-1665132366544530306</guid><pubDate>Sat, 27 Feb 2010 16:43:00 +0000</pubDate><atom:updated>2010-02-27T11:12:53.930-06:00</atom:updated><title>So Why This Blog?</title><description>&lt;div style=&quot;text-align: justify;&quot;&gt;I have been toying over the idea of creating a separate blog for my technical wanderings for some time now. Earlier, I had posted some technical posts on my main blog - &lt;a href=&quot;http://www.abhishekontheweb.com/&quot;&gt;www.abhishekontheweb.com&lt;/a&gt;, but, now, those seem out of place in a blog, which deals with more general stuff, like events, photography, articles (and whatever random thought comes in my mind). As, in the last few years, I have been working on various technologies, especially Java based, I thought of writing about some of the technical ideas that I have been influenced by, technical issues I have been intrigued by, and the upcoming technologies that I am working on. And what better place than to have a new blog just for that. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I would like to put in as much details as possible in my post, else this blog would defeat its purpose.&lt;/div&gt;</description><link>http://tech.abhishekontheweb.com/2010/02/welcome.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>7</thr:total></item></channel></rss>