<?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/' 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'><id>tag:blogger.com,1999:blog-34281546</id><updated>2026-04-26T15:57:43.851-07:00</updated><category term="gwt"/><category term="maven"/><category term="jersey"/><category term="jira"/><title type='text'>Kevin&#39;s Technology Notes</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34281546.post-6286739928429633486</id><published>2021-09-22T04:38:00.004-07:00</published><updated>2021-09-22T04:38:29.363-07:00</updated><title type='text'>How to disable dark-mode for java applications on OSX</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;p&gt;As a software engineer, I&#39;ve been a big fan of the dark-mode that was added to BigSur OSX.&amp;nbsp; The only problem is that one of my frequently used apps didn&#39;t like the new color schema. For instance, if you look at the following screen capture, you&#39;ll notice that the menu bar and table headers are black on black.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRqduyrUP5n33O1MhJSMeZt2UFV03HPzVTx-RCl0E3e9gukdjEpPvG9xCINNo4SyEeIk0XFjMbwT3HNSA2EHIjzRIxC83raSx2w2CunrhdutnOfZDGI26qhBgp70U5AzqG8vX4aA/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1354&quot; data-original-width=&quot;1896&quot; height=&quot;229&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRqduyrUP5n33O1MhJSMeZt2UFV03HPzVTx-RCl0E3e9gukdjEpPvG9xCINNo4SyEeIk0XFjMbwT3HNSA2EHIjzRIxC83raSx2w2CunrhdutnOfZDGI26qhBgp70U5AzqG8vX4aA/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;I did some research and found the following workaround. In OSX, you can disable dark-mode for a specific application.&amp;nbsp;&lt;/p&gt;&lt;p&gt;To do this, you will need to run the following command:&lt;/p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;defaults write &amp;lt;BundleID&amp;gt;  NSRequiresAquaSystemAppearance -bool yes&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;But before you run that command, you need to find the &amp;lt;Bundle ID&amp;gt;. I found using the&amp;nbsp;&lt;i&gt;lsappinfo &lt;/i&gt;command the easiest way. When you run this command it displays a bunch of information about the current applications that are running. So for me, I just looked for the Luke and found the following?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;i&gt;70) &quot;LukeMain&quot; ASN:0x0-0x305305:&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;bundleID=&quot;net.java.openjdk.cmd&quot;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; bundle path=&quot;/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java&quot;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; executable path=&quot;/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java&quot;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; pid = 70611 type=&quot;Foreground&quot; flavor=3 Version=&quot;1.0&quot; fileType=&quot;APPL&quot; creator=&quot;java&quot; Arch=x86_64&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&amp;nbsp; &amp;nbsp; checkin time = 2021/09/21 18:01:54 ( 9 minutes, 12.5975 seconds ago )&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;Since my application was Java bases this command did the trick for me.&amp;nbsp;&lt;br /&gt;&lt;br /&gt; &lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;i&gt;defaults write net.java.openjdk.cmd  NSRequiresAquaSystemAppearance -bool yes&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And.... back to normal...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhL7ya5fipE6y9g25NN79h2f9Y-AVy8pgNNzej9IoAivpIyUxEjTMfvgOo3GGDxQXBb8717_UUnKKK4d7o8cER3CK3TPrgb0mUrDdG410srnZxOttLxMWnct-ZbsjArVzujIiKDQ/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1352&quot; data-original-width=&quot;1902&quot; height=&quot;227&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhL7ya5fipE6y9g25NN79h2f9Y-AVy8pgNNzej9IoAivpIyUxEjTMfvgOo3GGDxQXBb8717_UUnKKK4d7o8cER3CK3TPrgb0mUrDdG410srnZxOttLxMWnct-ZbsjArVzujIiKDQ/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/6286739928429633486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/6286739928429633486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6286739928429633486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6286739928429633486'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2021/09/how-to-disable-dark-mode-for-java.html' title='How to disable dark-mode for java applications on OSX'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRqduyrUP5n33O1MhJSMeZt2UFV03HPzVTx-RCl0E3e9gukdjEpPvG9xCINNo4SyEeIk0XFjMbwT3HNSA2EHIjzRIxC83raSx2w2CunrhdutnOfZDGI26qhBgp70U5AzqG8vX4aA/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-1471074612452777640</id><published>2017-05-04T04:53:00.002-07:00</published><updated>2017-05-04T05:15:43.558-07:00</updated><title type='text'>Setup Motion on raspberry pi</title><content type='html'>Use the following procedure to setup motion on a raspberry pi zero w.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Setup raspbian on SD card via &lt;a href=&quot;https://www.raspberrypi.org/documentation/installation/installing-images/README.md&quot;&gt;https://www.raspberrypi.org/documentation/installation/installing-images/README.md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Update config to enable it to boot as a network gadget &lt;a href=&quot;https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a&quot;&gt;https://gist.github.com/gbaman/975e2db164b3ca2b51ae11e45e8fd40a&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ssh pi@rasberrypi.local&lt;/li&gt;
&lt;li&gt;run raspi-config&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;reset password&lt;/li&gt;
&lt;li&gt;rename host zero&lt;/li&gt;
&lt;li&gt;enable camera module (under interfaces)&lt;/li&gt;
&lt;li&gt;Reboot&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;ssh pi@zero.local&lt;/li&gt;
&lt;li&gt;sudo apt-get update&lt;/li&gt;
&lt;li&gt;sudo apt-get upgrade&lt;/li&gt;
&lt;li&gt;sudo apt-get install motion&lt;/li&gt;
&lt;li&gt;Edit /etc/default/motion&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;start_motion_daemon=yes&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;Add /etc/modules&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;# camera with v4l2 driver&lt;/li&gt;
&lt;li&gt;bcm2835-v4l2&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;restart&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; color: #ce7924; background-color: #000000}
span.s1 {font-variant-ligatures: no-common-ligatures}
&lt;/style&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/1471074612452777640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/1471074612452777640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/1471074612452777640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/1471074612452777640'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2017/05/setup-motion-on-raspberry-pi.html' title='Setup Motion on raspberry pi'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-5330134280756905126</id><published>2017-03-24T06:37:00.001-07:00</published><updated>2017-03-24T06:37:13.415-07:00</updated><title type='text'>How to expose a port to the internet</title><content type='html'>I recently discovered localtunnel which is a slick little tool to expose a port to the internet.&lt;br /&gt;
https://localtunnel.github.io/www/&lt;br /&gt;
&lt;br /&gt;
To Setup:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;brew install npm&lt;/li&gt;
&lt;li&gt;npm install -g localtunnel&lt;/li&gt;
&lt;li&gt;lt --port 8080&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/5330134280756905126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/5330134280756905126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5330134280756905126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5330134280756905126'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2017/03/how-to-expose-port-to-internet.html' title='How to expose a port to the internet'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-8856911500689314312</id><published>2016-01-03T08:11:00.001-08:00</published><updated>2016-01-03T08:11:19.146-08:00</updated><title type='text'>How to workaround Kindle Fire&#39;s FreeTime App categories.</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
We recently got our kinds the Kids version of Kindle Fire and was really disappointed to find that &amp;nbsp;some Apps are flagged as Entertainment. In particular, our schools use RazKids and because of the categorization with FreeTime there isn&#39;t a way for us to allow our kinds to read using RazKids without giving them access to all games.&lt;br /&gt;
&lt;br /&gt;
I was searching around for workarounds but didn&#39;t find anything so I&#39;m posting the workaround that I came up with.&lt;br /&gt;
&lt;br /&gt;
The solution that I found was:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Create a New Child Profile named RazKids&lt;/li&gt;
&lt;li&gt;Under &quot;FreeTime Unlimited&quot;, tap the &quot;Manager Your Subscription&quot; and uncheck the RazKids. This will disable all the standard content that is provided by FreeTime.&lt;/li&gt;
&lt;li&gt;Now Tap, Add Content and select the &quot;RazKids&quot; app. This grants them permission to the RazKids app.&lt;/li&gt;
&lt;li&gt;Now Tap, &quot;Set Family Goals &amp;amp; Time Limits&quot; and set whatever restrictions you would like to apply.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
By doing this, you&#39;ll now see a second profile that has access just to RazKids. The kids can now switch between the regular profile with full FreeTime access and this special profile to use RazKids.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/8856911500689314312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/8856911500689314312' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/8856911500689314312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/8856911500689314312'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2016/01/how-to-workaround-kindle-fires-freetime.html' title='How to workaround Kindle Fire&#39;s FreeTime App categories.'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-239258512143463759</id><published>2015-12-15T08:11:00.000-08:00</published><updated>2015-12-15T08:15:55.784-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jersey"/><title type='text'>Jersey API Exception Handler</title><content type='html'>&lt;br /&gt;
In Jersey, you can register your own exception handler so can return an appropriate HTTP response for any exception In the handler, you can set the error response or convert it to any JSON object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p2&quot;&gt;
@Provider&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;class&lt;/span&gt; ApiExceptionHandler &lt;span class=&quot;s1&quot;&gt;implements&lt;/span&gt; ExceptionMapper&amp;lt;Exception&amp;gt; {&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;@Override&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public&lt;/span&gt; Response toResponse(Exception exception) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO : insert logger statement&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return&lt;/span&gt; Response.status(Status.&lt;span class=&quot;s3&quot;&gt;BAD_REQUEST&lt;/span&gt;).entity(exception.getMessage()).build();&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p3&quot;&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/239258512143463759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/239258512143463759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/239258512143463759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/239258512143463759'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2015/12/jersey-api-exception-handler.html' title='Jersey API Exception Handler'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-5219188093341380090</id><published>2015-09-22T05:18:00.000-07:00</published><updated>2015-09-22T05:18:57.654-07:00</updated><title type='text'>Using awk to filter by value</title><content type='html'>







&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;Here&#39;s a simple example of an awk script that will find rows where there value is greater than 1000. I often forget the syntax of this command but in the following example, I&#39;m trying to find rows where the 11th column is greater than 1000.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;awk &#39;{if ( int($11) &amp;gt;= 1000 ) print $7, $11;}&#39;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/5219188093341380090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/5219188093341380090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5219188093341380090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5219188093341380090'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2015/09/using-awk-to-filter-by-value.html' title='Using awk to filter by value'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-3131202276124866200</id><published>2015-06-15T09:03:00.000-07:00</published><updated>2015-06-15T09:03:01.420-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>Creating a custom generic GWT event</title><content type='html'>&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;I keep having trouble setting up a GWT event handler which is parameterized. All of the magic needs to happen in the GwtEvent class itself.&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;public class CustomClickEvent&amp;lt;T&amp;gt;&lt;t&gt; extends GwtEvent&amp;lt;HasClickHandler&amp;lt;T&amp;gt;&lt;customclickeventhandler&gt;&amp;gt; {
	private static Type&amp;lt;&lt;/customclickeventhandler&gt;&lt;/t&gt;HasClickHandler&amp;lt;?&amp;gt;&amp;gt; TYPE = new Type&lt;customclickevent&gt;&amp;lt;&lt;/customclickevent&gt;HasClickHandler&amp;lt;?&amp;gt;&amp;gt;();&lt;/pre&gt;
&lt;pre&gt;&lt;t&gt;&lt;customclickeventhandler&gt;&lt;customclickevent&gt;&lt;customclickevent&gt;	
	
	private LazyCellClickEvent() {}
	
	@Override
	protected void dispatch(CustomClickEventHandler&amp;lt;T&amp;gt;&lt;t&gt; clickEvent) {
		clickEvent.onClick(this);
	}

	@SuppressWarnings({ &quot;unchecked&quot;, &quot;rawtypes&quot; })
	@Override
	public Type&amp;lt;&lt;/t&gt;&lt;/customclickevent&gt;&lt;/customclickevent&gt;&lt;/customclickeventhandler&gt;&lt;/t&gt;HasClickHandler&amp;lt;T&amp;gt;&amp;gt; getAssociatedType() {&lt;/pre&gt;
&lt;pre&gt;&lt;t&gt;&lt;customclickeventhandler&gt;&lt;customclickevent&gt;&lt;customclickevent&gt;&lt;t&gt;&lt;customclickeventhandler&gt;		return (Type)TYPE;
	}
	
	public static final Type&amp;lt;&lt;/customclickeventhandler&gt;&lt;/t&gt;&lt;/customclickevent&gt;&lt;/customclickevent&gt;&lt;/customclickeventhandler&gt;&lt;/t&gt;HasClickHandler&amp;lt;?&amp;gt;&lt;customclickeventhandler&gt; getType() {&lt;/customclickeventhandler&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;t&gt;&lt;customclickeventhandler&gt;&lt;customclickevent&gt;&lt;customclickevent&gt;&lt;t&gt;&lt;customclickeventhandler&gt;&lt;customclickeventhandler&gt;		return TYPE;
	}
	
	public static &lt;t&gt; void fire(HasCustomEventHandler&amp;lt;T&amp;gt;&lt;t&gt; handler) {
		CustomClickEvent&amp;lt;T&amp;gt;&lt;t&gt; event = new CustomClickEvent&amp;lt;T&amp;gt;&lt;t&gt;();
		handler.fireEvent(event);
	}	
}
&lt;/t&gt;&lt;/t&gt;&lt;/t&gt;&lt;/t&gt;&lt;/customclickeventhandler&gt;&lt;/customclickeventhandler&gt;&lt;/t&gt;&lt;/customclickevent&gt;&lt;/customclickevent&gt;&lt;/customclickeventhandler&gt;&lt;/t&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/3131202276124866200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/3131202276124866200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3131202276124866200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3131202276124866200'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2015/06/creating-custom-generic-gwt-event.html' title='Creating a custom generic GWT event'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-3711368906653785995</id><published>2015-04-02T10:19:00.000-07:00</published><updated>2015-12-15T08:15:09.565-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>GWT Custom Serializer</title><content type='html'>GWT allows you to build your own customer serializers. In the past, I&#39;ve found issues/bugs with certain serialization of classes and this allows you to provide your own implementation. The key to this is that you have to put your class in the com.google.gwt.user.client.rpc.core + your class package.&lt;br /&gt;
&lt;br /&gt;
The following example you be to create a custom serializer for the my.package.ApiException class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;s1&quot;&gt;package&lt;/span&gt; com.google.gwt.user.client.rpc.core.my.package;    &amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;public class ApiException_CustomFieldSerializer extends CustomFieldSerializer&lt;apiexception&gt; {

     @Override
     public void deserializeInstance(SerializationStreamReader streamReader, ApiException instance) throws SerializationException {
           deserialize(streamReader,instance);
      }

    @Override
    public void serializeInstance(SerializationStreamWriter streamWriter, ApiException instance) throws SerializationException {
           serialize(streamWriter,instance);
    }
 
    public static void serialize(SerializationStreamWriter streamWriter,ApiException instance) throws SerializationException {
           streamWriter.writeString( instance.getMessage() );
    }
 
    public static void deserialize(SerializationStreamReader streamReader,ApiException instance) throws SerializationException {
           instance.setMessage( streamReader.readString() );
    }
 
    public static ApiException instantiate(SerializationStreamReader reader) throws SerializationException {
          return new ApiException();
    }
}

&lt;/apiexception&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/3711368906653785995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/3711368906653785995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3711368906653785995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3711368906653785995'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2015/04/gwt-custom-serializer.html' title='GWT Custom Serializer'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-9069311869812215105</id><published>2015-03-19T06:18:00.002-07:00</published><updated>2015-04-02T10:21:03.664-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>Prevent HTTP 304 for GWT&#39;s nocache.js files.</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
I recently deployed a release of our product which caused a majority of our users to clear their browsers cache in order to access our sites. Of course, this is quite embarrassing and I was asked to identify the problem. &amp;nbsp;Since day one we&#39;ve always had the standard solution of deploying a ServletFilter which sets the standard &lt;i&gt;Cache-Control&lt;/i&gt; headers so it was confusing why all of a sudden a large percent of users were reporting this issue.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The good news is that I believe I&#39;ve solved my problem and since I&#39;ve never seen any reference to it I figured it would write it down.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Disclaimer: You&#39;ll have to forgive me but we&#39;re running Tomcat 7.0.22 (yeah, I know) so this might have changed in more recent versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the first thing that I noticed is that in the tomcat access logs there are HTTP 304 (File Not Modified) being returned for my nocache.js files. &amp;nbsp; After many hours of Googling and debugging, I found that the &lt;a href=&quot;http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_22/java/org/apache/catalina/servlets/DefaultServlet.java&quot;&gt;DefaultServlet.&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; checkIfModifiedSince()&lt;/span&gt;&lt;/a&gt;&amp;nbsp;compares the files timestamp with the &quot;If-Not-Modified&quot; header to determine if that file has changed. &amp;nbsp; We&#39;re deploying our app as a WAR file which means that files timestamp gets set to the time that is stored in the WAR. &amp;nbsp;Now to further complicate this issue GWT seems to be caching this file someone (not the GWT working directory) so in our build it was getting set to the time when we created the branch and jenkins plan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So to summarize, my problem was the timestamp of this file was being set to the time of the branch creation (which was days before deployment). &amp;nbsp;So anyone who used the application between the time we branched and them time we deployed would cache a copy of the nocache.js file with the current timestamp. When the WAR was finally deployed, the timestamp was updated to branch time and new request would start getting 304s because they were passing in &quot;If-Modified-Since&quot; headers that were greater than the time of the branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So how do you fix this problem? &amp;nbsp;A simple unix command:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;find -name &#39;*.nocache.js&quot; -exec touch {} \;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Now, I also went a step further and wanted to try to fix the programmatically. The only workaround that I could find was to build an HttpServletRequest interceptor that prevents that header from being returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public class GWTCacheControlFilter implements Filter {
 
 private static final long SECONDS = 1000;
 private static final long MINUTES = 60 * SECONDS;
 private static final long HOURS = 60 * MINUTES;
 private static final long DAYS = 24 * HOURS;
 
 public void destroy() {
 }

 public void init(FilterConfig config) throws ServletException {
 }

 public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {

  HttpServletRequest httpRequest = (HttpServletRequest) request;
  String requestURI = httpRequest.getRequestURI();
  
  if (requestURI.contains(&quot;.nocache.&quot;)) {
   try {
    request = createProxy(httpRequest);
   } catch (Throwable t) {
    logger.error(&quot;Failed to creative interceptor&quot;,t);
   }
   
   Date now = new Date();
   HttpServletResponse httpResponse = (HttpServletResponse) response;
   httpResponse.setDateHeader(&quot;Date&quot;, now.getTime());

   
   httpResponse.setDateHeader(&quot;Last-Modified&quot;, now.getTime() );
   httpResponse.setDateHeader(&quot;Expires&quot;, now.getTime() - 30 * DAYS );
   httpResponse.setHeader(&quot;Pragma&quot;, &quot;no-cache&quot;);
   httpResponse.setHeader(&quot;Cache-control&quot;, &quot;no-cache, no-store, must-revalidate,  max-age=0&quot;);
  }

  filterChain.doFilter(request, response);
 }
 
 
 private static final HttpServletRequest createProxy(final HttpServletRequest source) {
  return (HttpServletRequest) Proxy.newProxyInstance( GWTCacheControlFilter.class.getClassLoader() , new Class[] { HttpServletRequest.class } , new InvocationHandler() {
   @Override
   public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
    
    String name = method.getName();
    if ( name.equals(&quot;getDateHeader&quot;) &amp;amp;&amp;amp; args.length == 1 &amp;amp;&amp;amp; args[0].equals(&quot;If-Modified-Since&quot;) ) {
     return 0l;
    }
    
    if ( name.equals(&quot;getHeader&quot;) &amp;amp;&amp;amp; args.length == 1 &amp;amp;&amp;amp; args[0].equals(&quot;If-Modified-Since&quot;) ) {
     return null;
    }
    
    if ( name.equals(&quot;getIntHeader&quot;) &amp;amp;&amp;amp; args.length == 1 &amp;amp;&amp;amp; args[0].equals(&quot;If-Modified-Since&quot;) ) {
     return 0;
    }
    
    return method.invoke(source, args);
   }
  });
 }
 
}

&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/9069311869812215105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/9069311869812215105' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/9069311869812215105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/9069311869812215105'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2015/03/prevent-http-304-for-gwts-nocachejs.html' title='Prevent HTTP 304 for GWT&#39;s nocache.js files.'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-6627716824817855197</id><published>2014-09-29T14:14:00.000-07:00</published><updated>2015-04-02T10:21:20.687-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>HOW-TO Use GWT SuperDevMode</title><content type='html'>GWT 2.5 introduced a concept of SuperDevMode which is a pretty awesome concept but I found it almost impossible to get it to work. The documentation just didn&#39;t explain enough of the missing pieces.&lt;br /&gt;
So before I get started, let me explain what it is/does.  Recently a bunch of the browsers started to support the concept of source code maps. This feature has nothing to do with GWT and it just a way for someone to debug javascript that has been optimized/generated.  These maps contains a mapping of the compiled source to the original source which then allows the debugged to display the original source.&lt;br /&gt;
&lt;br /&gt;
So what GWT has done is provided a mechanism to integrate with this browser debugging feature to provide a way to debug through the compiled javascript BUT see the original java code.  Awesome right!&lt;br /&gt;
&lt;br /&gt;
The key thing I found extremely confusing is that you need to build and deploy the production version of your application. I use maven/tomcat to do this but you could use anything.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Compile your application as normal (mvn clean install -DskipTests)&lt;/li&gt;
&lt;li&gt;Install the war into your local tomcat and start tomcat&lt;/li&gt;
&lt;li&gt;Execute java program at the bottom which will start the Code Server&lt;/li&gt;
&lt;li&gt;Go to http://localhost:9876/ and copy the bookmarks to you bookmark directory&lt;/li&gt;
&lt;li&gt;Go to the location version of the app (http://localhost:8080/yourwar/&lt;/li&gt;
&lt;li&gt;Click the &quot;Dev Mode On&quot; bookmark&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
You should now see the a SDM dialog come up and ask you to compile the app. &amp;nbsp;Once it is done compiling the app, you now are running a newly compiled version of the app within the browsers debugger. So you&#39;re not going to use the IDEs debugger anymore. Now you&#39;ll can open Chromes debugger and you should see the JAVA source instead of the javascript sources. You should be able to set a breakpoint.&lt;br /&gt;
&lt;br /&gt;
While this is an awesome feature, I&#39;ve found that using the standard mode still more useful for day-to-day debugging. &amp;nbsp;I do run into cases where its been essential. Recently, I had a race condition which never showed up in the standard debugger because it always executed so slowly.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;  &lt;/pre&gt;
&lt;pre&gt;https://www.youtube.com/watch?v=WqiZLM32kXY&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;/pre&gt;
&lt;pre&gt;public class SuperDevMode {

 public static final void main(String[] args) throws Exception {
  new File(&quot;target/gwt.tmp&quot;).mkdirs();
  CodeServer.main( new String[] {
    &quot;-workDir&quot; , &quot;target/gwt.tmp&quot;,
    &quot;-src&quot;,&quot;../gwt-utils/src/main/java&quot;,
    &quot;-src&quot;,&quot;src/main/java&quot;,
    &quot;com.gwt.module&quot;
  });
 }
}
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/6627716824817855197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/6627716824817855197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6627716824817855197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6627716824817855197'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2014/09/how-to-use-gwt-superdevmode.html' title='HOW-TO Use GWT SuperDevMode'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-3707385097174663946</id><published>2014-09-29T13:45:00.000-07:00</published><updated>2015-04-02T10:21:33.287-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>HOW-TO execute a maven plugin within eclipse?</title><content type='html'>&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;
If you&#39;re running maven with eclipse you&#39;ve probably been frustrated by &quot;Plugin execution not covered by lifecycle configuration&quot; error. Well after while I finally managed to get it to do what I wanted. The key is that there is a org.eclipse.m2e:ifecycle-mapping maven plugin that does nothing but let eclipse know how you want to handle a specific goal. For instance in the following example&lt;br /&gt;
I&#39;ve instructed to execute the hibernate3-maven-plugin:run goal. &amp;nbsp;If you take a look at the eclipse doc you&#39;ll see there is also an ignore option. For the longest time, I was just setting them to ignore but recently I learned about the execution option. This seems to work for me although for certain incremental builds its not re-executing the command.&lt;br /&gt;
&lt;br /&gt;
It does however seem to alway run when I do an eclipse clean.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://wiki.eclipse.org/M2E_plugin_execution_not_covered&quot;&gt;http://wiki.eclipse.org/M2E_plugin_execution_not_covered&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;/pre&gt;
&lt;pre&gt;    &amp;lt;buld&amp;gt;&lt;/pre&gt;
&lt;pre&gt;  &amp;lt;pluginManagement&amp;gt;&lt;/pre&gt;
&lt;pre&gt;   &amp;lt;plugins&amp;gt;&lt;/pre&gt;
&lt;pre&gt;    &amp;lt;plugin&amp;gt;
&lt;plugin&gt;&lt;configuration&gt;&lt;lifecyclemappingmetadata&gt;&lt;pluginexecutions&gt;&lt;pluginexecution&gt;&lt;pluginexecutionfilter&gt;     &amp;lt;groupid&amp;gt;org.eclipse.m2e&amp;lt;/groupid&amp;gt;
     &amp;lt;artifactid&amp;gt;lifecycle-mapping&amp;lt;/artifactid&amp;gt;
     &amp;lt;version&amp;gt;1.0.0&amp;lt;/version&amp;gt;
     &amp;lt;configuration&amp;gt;
      &amp;lt;lifecyclemappingmetadata&amp;gt;
       &amp;lt;pluginexecutions&amp;gt;
        &amp;lt;pluginexecution&amp;gt;
         &amp;lt;pluginexecutionfilter&amp;gt;
          &amp;lt;groupid&amp;gt;org.codehaus.mojo&amp;lt;/groupid&amp;gt;
          &amp;lt;artifactid&amp;gt;hibernate3-maven-plugin&amp;lt;/artifactid&amp;gt;
          &amp;lt;versionrange&amp;gt;[3.0,)&amp;lt;/versionrange&amp;gt;
          &amp;lt;goals&amp;gt;
           &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;
          &amp;lt;/goals&amp;gt;
         &amp;lt;/pluginexecutionfilter&amp;gt;
         &amp;lt;action&amp;gt;
          &amp;lt;execute&amp;gt;
         &amp;lt;/execute&amp;gt;&amp;lt;/action&amp;gt;
        &amp;lt;/pluginexecution&amp;gt;
       &amp;lt;/pluginexecutions&amp;gt;
      &amp;lt;/lifecyclemappingmetadata&amp;gt;
     &amp;lt;/configuration&amp;gt;
    &amp;lt;/plugin&amp;gt;
   &amp;lt;/&lt;/pluginexecutionfilter&gt;&lt;/pluginexecution&gt;&lt;/pluginexecutions&gt;&lt;/lifecyclemappingmetadata&gt;&lt;/configuration&gt;&lt;/plugin&gt;plugins&amp;gt;      &lt;/pre&gt;
&lt;pre&gt;&lt;plugin&gt;&lt;configuration&gt;&lt;lifecyclemappingmetadata&gt;&lt;pluginexecutions&gt;&lt;pluginexecution&gt;         &lt;action&gt;
          &lt;execute&gt;
         &lt;/execute&gt;&lt;/action&gt;
        &lt;/pluginexecution&gt;
       &lt;/pluginexecutions&gt;
      &lt;/lifecyclemappingmetadata&gt;
     &lt;/configuration&gt;
    &lt;/plugin&gt;
   
  
 


&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/3707385097174663946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/3707385097174663946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3707385097174663946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3707385097174663946'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2014/09/how-to-execute-maven-plugin-within.html' title='HOW-TO execute a maven plugin within eclipse?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-2804771106927534956</id><published>2014-01-15T09:16:00.000-08:00</published><updated>2014-02-12T18:43:57.713-08:00</updated><title type='text'>watch SQL script.</title><content type='html'>&lt;br&gt;
The following script is a way to execute a mysql command every second. I wrote the script because OSX doesn&#39;t have a watch command and mysql takes the SQL statement from stndin.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a name=&quot;more&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;p1&quot;&gt;
#!/bin/bash&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
SQL=`cat -`&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
while true;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
do&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; clear&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; echo $SQL&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; echo &quot;$SQL&quot; | mysql $*&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; date&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; sleep 1&lt;/div&gt;
&lt;br&gt;
&lt;div class=&quot;p1&quot;&gt;
done&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/2804771106927534956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/2804771106927534956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/2804771106927534956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/2804771106927534956'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2014/01/watch-sql-script.html' title='watch SQL script.'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-3373909723170389038</id><published>2013-09-17T05:06:00.003-07:00</published><updated>2015-04-02T10:19:27.008-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jira"/><title type='text'>JIRA Agile Script</title><content type='html'>&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;We recently converted to JIRA and apart of our process allows engineerings to accept Ad-Hoc requests from the business owners. So I wanted to the ability for a developer to quickly be able to grab a new ticket and add it to the current sprint. The only solution I could find was to write a script using the JIRA Script Runner plugin. &lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;The following is the script that I wrote. It does the following:&lt;/pre&gt;
&lt;pre&gt;&lt;ul&gt;
&lt;li&gt;automatically assigns members of the &quot;jira-product&quot; group as watchers of the issue&lt;/li&gt;
&lt;li&gt;adds the issues to the current sprint. The algorithm is to find the lowest number sprint ID that is not closed.&lt;/li&gt;
&lt;li&gt;sets our custom field &quot;Ad Hoc Requests&quot; (id=10305) to 1. This way we can run reports on these requests.&lt;/li&gt;
&lt;/ul&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;pre&gt;importPackage(java.lang);

run();

function run() {
 var componentManager = com.atlassian.jira.ComponentManager.getInstance();
 var user = componentManager.getJiraAuthenticationContext().getUser();

 var watcherManager = componentManager.getWatcherManager();
 var userManager = componentManager.getComponentInstanceOfType( com.atlassian.jira.user.util.UserManager );
 var groupManager = componentManager.getComponentInstanceOfType( com.atlassian.jira.security.groups.GroupManager );

 if ( ! userManager ) {
     log(&quot;User Manager not found&quot;);
     return 0;
 }

 if ( ! groupManager ) {
     log(&quot;Group Manager not found&quot;);
     return 0;
 }


 var admin = userManager.getUserByName(&quot;admin&quot;);
 log(&quot;JIRA=&quot;+admin);

 var productGroup = groupManager.getGroup(&quot;jira-product&quot;);
 if ( productGroup ) {
     var users = com.atlassian.jira.user.ApplicationUsers.from(groupManager.getUsersInGroup(productGroup)).iterator();
     while ( users.hasNext() ) {
  var usr = users.next();
  
  log(&quot;Adding Watcher : &quot; + usr.getClass() );
  watcherManager.startWatching( usr , issue );
     }
 }

     // finish adding watchers

 log(&quot;JS : &quot; + user + &quot; &quot; + issue + &quot; &quot; + issue.getClass() );

 var commentManager = componentManager.getComponentInstanceOfType( com.atlassian.jira.issue.comments.CommentManager ); 
 var customFieldManager = componentManager.getComponentInstanceOfType( com.atlassian.jira.issue.CustomFieldManager );

 if ( ! customFieldManager ) {
  log(&quot;Null Custom Field Manager&quot;);
         return 0;
 }

 var sprintFld = customFieldManager.getCustomFieldObject( 10000 );
 var adhocFld = customFieldManager.getCustomFieldObject( 10305 );  
 if ( ! sprintFld ) {
  log(&quot;Sprint field not found&quot;);
  return 0;
 }

 if ( ! adhocFld ) {
     log(&quot;Ad Hock Field Not Found&quot;);
 }

        var sprintManager = getSprintManager();

 if ( ! sprintManager ) {
     log(&quot;SprintManager not found&quot;);
     return 0;
 } else {
     log(&quot;Found SprintManager&quot;);
 }

 if ( commentManager &amp;amp;&amp;amp; issue ) {
     if ( sprintManager ) {
  var sprintId = null;
  var sprint = null;
  var value = issue.getCustomFieldValue(sprintFld);
  
  log(&quot;Sprint = &quot; + value );
  var soutcome = sprintManager.getAllSprints();
  if ( soutcome.isValid() ) {
      var allSprints = soutcome.getValue();
      
      if ( allSprints ) {
   var itt = allSprints.iterator();
   while( itt.hasNext() ) {
       var next = itt.next();
       if ( next.isClosed() ) continue;
       
       if ( ! sprintId || sprintId.longValue() &amp;gt; next.getId().longValue() ) {
    sprintId = next.getId();
    sprint = next;
       }
   }
      }
  }
  
  if ( sprint ) {
      var newValue = new java.util.ArrayList();
      newValue.add( sprint );
      sprintFld.updateValue(null, issue, new com.atlassian.jira.issue.ModifiedValue(value,newValue), new com.atlassian.jira.issue.util.DefaultIssueChangeHolder());

      adhocFld.updateValue(null,issue,new com.atlassian.jira.issue.ModifiedValue(issue.getCustomFieldValue(adhocFld),1), new com.atlassian.jira.issue.util.DefaultIssueChangeHolder());
  }
     }

     var msg = user + &quot; accepted story as ad-hoc request&quot;;
     if ( sprint ) {
  msg = msg + &quot; and assigned to sprint: &quot; + sprint.getName();
     }
     commentManager.create(issue, admin , msg , true);
     issue.store();
 }
}


function getSprintManager() {
    var appCtx = getGreenHopperAppCtx();
    if ( appCtx ) {
 log(&quot;Found AppCtx&quot;);
 return appCtx.getBean( &quot;sprintManagerImpl&quot; );
    }
    return null;
}

function getGreenHopperAppCtx() {
    var componentManager = com.atlassian.jira.ComponentManager.getInstance();
    var osgi = componentManager.getComponentInstanceOfType (com.atlassian.plugin.osgi.container.OsgiContainerManager);
    if ( ! osgi ) {
 java.lang.System.out.println(&quot;OSGI Not Found&quot;);
 return null;
    }

    var bundles = osgi.getBundles();

    var sprintManager;
    for(var i=0;i&amp;lt;bundles.length;i++) {
 var bundle = bundles[i];

        if ( &quot;com.pyxis.greenhopper.jira&quot;.equals( bundle.getSymbolicName() ) ) {
     log(&quot;Found JIRA Agile Plugin&quot;);

     var bctx = bundle.getBundleContext();
            var refs = bctx.getAllServiceReferences(null,null);
     if ( refs ) {
  for(var j=0; j&amp;lt;refs.length;j++) {
      var prop = refs[j].getProperty(&quot;org.springframework.context.service.name&quot;);
      if ( &quot;com.pyxis.greenhopper.jira&quot;.equals(prop) ) {
   log ( &quot;Found Greenhopper ServiceReference : &quot; +  prop );
   return bctx.getService( refs[j] );
      }
  }
     }
 }

 //log ( bundle );

    }

    return null;
}

 &lt;/pre&gt;
&lt;pre&gt;function log(msg) {
    java.lang.System.out.println( &quot;&quot; + msg);
}&lt;bundles .length=&quot;&quot; :=&quot;&quot; agile=&quot;&quot; bctx.getservice=&quot;&quot; bctx=&quot;bundle.getBundleContext();&quot; bundle.getsymbolicname=&quot;&quot; bundle=&quot;&quot; com.pyxis.greenhopper.jira=&quot;&quot; equals=&quot;&quot; for=&quot;&quot; function=&quot;&quot; greenhopper=&quot;&quot; i=&quot;&quot; if=&quot;&quot; j=&quot;&quot; java.lang.system.out.println=&quot;&quot; jira=&quot;&quot; log=&quot;&quot; msg=&quot;&quot; null=&quot;&quot; org.springframework.context.service.name=&quot;&quot; ound=&quot;&quot; plugin=&quot;&quot; pre=&quot;&quot; prop=&quot;&quot; refs.length=&quot;&quot; refs=&quot;&quot; return=&quot;&quot; servicereference=&quot;&quot; var=&quot;&quot;&gt;&lt;/bundles&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/3373909723170389038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/3373909723170389038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3373909723170389038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3373909723170389038'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2013/09/jira-agile-script.html' title='JIRA Agile Script'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-644772390189718868</id><published>2013-01-22T12:43:00.001-08:00</published><updated>2015-04-02T10:19:47.887-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>HOWTO add Emma Support to Maven GWT</title><content type='html'>&lt;br /&gt;
I&#39;ve had to do this a couple times so I&#39;m finally&amp;nbsp;writing&amp;nbsp;it down for future me. But for anyone else that might be interested, this posting will (hopefully) walk you through how to add Emma code coverage support to GWT via maven. &lt;br /&gt;
&lt;br /&gt;
For those of you that might not be that&amp;nbsp;familiar&amp;nbsp;with code coverage tools, there are two common ways to generate code coverage. In both cases, your code is modified to include counters for each time a thread enters / exists a code block. This process is call instrumentation hence, in java there are two ways: re-write the code and compile the classes or re-write the classes directly.&lt;br /&gt;
&lt;br /&gt;
So lets talk a little about why emma works. First of all, Google has a patched &lt;a href=&quot;http://google-web-toolkit.googlecode.com/files/emma-2.0.5312-patched.jar&quot;&gt;jar&lt;/a&gt;&amp;nbsp;but the reason that emma works well is that emma instruments the classes not the source. &amp;nbsp;This is key to GWT because if you&amp;nbsp;instrument&amp;nbsp;the code, then GWT compile will not be able to find any of the instrumentation classes and it won&#39;t compile. So by instrumenting the classes the GWT compiler can compile your source but the classes files still get instrumented.&lt;br /&gt;
&lt;br /&gt;
So you may be thinking, if GWT compiler compiles your code pre-instrumentation how can it generate the coverage information for you client code? The&amp;nbsp;answer&amp;nbsp;is simple, the unit test MUST run in&amp;nbsp;development&amp;nbsp;mode. &amp;nbsp;By doing this, the GWT compiler will run your application in java not javascript.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So here are the changes (ordered by maven lifecycle).&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Add Emma dependency&lt;/h4&gt;
&lt;div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;The first thing you&#39;ll need to do is add the emma dependency. I was unable to find Googles patched jar in any publish maven repo so I just uploaded it to a local nexus server. If you&#39;re not using nexus you&#39;ll need to install it manually into the your local repo:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-size: 13px; padding: 0px;&quot;&gt;mvn install:install-file -Dfile=&amp;lt;path-to-file&amp;gt; -DgroupId=emmca -DartifactId=emma -Dversion=2.0.5312-patched -Dpackaging=jar&lt;/pre&gt;
&lt;br /&gt;
Then add the following dependency to your pom.xml&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;&lt;/span&gt;dependency&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;groupId&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;emma&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;groupId&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;artifactId&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;emma&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;artifactId&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;2.0.5312-patched&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;test&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s2&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;dependency&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h4&gt;
Instrument your classes.&lt;/h4&gt;
I found that running emma via ant-run was the easier way to get it to do what I wanted. &amp;nbsp;Check out the emma document for other options but I followed there offline &lt;a href=&quot;http://emma.sourceforge.net/intro.html#Offline+instrumentation&quot;&gt;instructions&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;plugins&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;plugin&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;artifactId&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;maven&lt;/span&gt;-&lt;span class=&quot;s3&quot;&gt;antrun&lt;/span&gt;-&lt;span class=&quot;s3&quot;&gt;plugin&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;artifactId&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;version&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;1.7&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;version&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;executions&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;execution&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;Emma&lt;/span&gt; instrumentation&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;phase&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;process-classes&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;phase&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;configuration&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;skip&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;${skipEmma}&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;skip&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;property&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;=&lt;/span&gt;&quot;test_classpath&quot;&lt;span class=&quot;s4&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;refid&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;=&lt;/span&gt;&quot;maven.test.classpath&quot;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;=&lt;/span&gt;&quot;Emma - instrumentation&quot;&lt;span class=&quot;s4&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;echo&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;=&lt;/span&gt;&quot;test classpath: ${test_classpath}&quot;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;java&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;fork&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;classpathref&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;=&lt;/span&gt;&quot;maven.test.classpath&quot;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s5&quot;&gt;classname&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;emma&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;arg&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;instr&quot;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;arg&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;-cp&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;arg&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;target/classes&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;arg&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;-m&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;arg&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;overwrite&quot;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;arg&lt;/span&gt; &lt;span class=&quot;s5&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;s6&quot;&gt;&quot;-out&quot;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;arg&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s5&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;=&lt;/span&gt;&quot;target/emma/emma.em&quot;&lt;span class=&quot;s1&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;java&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;configuration&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;goals&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;goal&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;run&lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;goal&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;goals&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;s1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;execution&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
.....&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Update Surefire plugin&lt;/h4&gt;
&lt;div&gt;
Next we need to update your surefire plugin to force the output file to get put into target. This isn&#39;t required but it cleaner with maven.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;systemPropertyVariables&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;lt;emma.coverage.out.file&amp;gt;${project.basedir}/target/emma/emma.ec&amp;lt;/emma.coverage.out.file&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/systemPropertyVariables&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
Here&#39;s my full surefire plugin in case there are any issues.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp;&amp;lt;plugin&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;maven-surefire-plugin&amp;lt;/artifactId&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.6&amp;lt;/version&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;useManifestOnlyJar&amp;gt;false&amp;lt;/useManifestOnlyJar&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;forkMode&amp;gt;always&amp;lt;/forkMode&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;argLine&amp;gt;-Xmx1024m&amp;lt;/argLine&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;redirectTestOutputToFile&amp;gt;true&amp;lt;/redirectTestOutputToFile&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;additionalClasspathElements&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;!--&amp;nbsp; needed so gwt can read the source via classpath --&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;additionalClasspathElement&amp;gt;src/main/java&amp;lt;/additionalClasspathElement&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;additionalClasspathElement&amp;gt;src/test/java&amp;lt;/additionalClasspathElement&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/additionalClasspathElements&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;systemPropertyVariables&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;emma.coverage.out.file&amp;gt;${project.basedir}/target/emma/emma.ec&amp;lt;/emma.coverage.out.file&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/systemPropertyVariables&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;lt;/plugin&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h4&gt;
Generate the Report&lt;/h4&gt;
&lt;div&gt;
Finally, you need to add this second execution to the ant-run plugin we defined above. This will then generate the report via the emma.em file and emma.ec file that were generated from the two previous steps.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It should also be noted that I call &amp;lt;fail&amp;gt; at the end of the ant run. This is just a safe guard so I don&#39;t&amp;nbsp;generate&amp;nbsp;a jar that contains the instrumented cases.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;lt;execution&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;id&amp;gt;Emma Report&amp;lt;/id&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;phase&amp;gt;prepare-package&amp;lt;/phase&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;skip&amp;gt;${skipEmma}&amp;lt;/skip&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;target&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;property name=&quot;test_classpath&quot; refid=&quot;maven.test.classpath&quot;/&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;echo message=&quot;Emma - instrumentation&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;echo message=&quot;test classpath: ${test_classpath}&quot;/&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;mkdir dir=&quot;${project.basedir}/target/emma-report&quot;/&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;java&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dir=&quot;${project.basedir}/target/emma-report&quot;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fork=&quot;true&quot;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; classpathref=&quot;maven.test.classpath&quot;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; classname=&quot;emma&quot;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg value=&quot;report&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg value=&quot;-sp&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg value=&quot;${project.basedir}/src/main/java&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg value=&quot;-r&quot;/&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg value=&quot;html&quot;/&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg value=&quot;-in&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;arg value=&quot;${project.basedir}/target/emma/emma.em,${project.basedir}/target/emma/emma.ec&quot; /&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/java&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;fail message=&quot;Emma Complete - exiting build&quot;/&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/target&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;goals&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;goal&amp;gt;run&amp;lt;/goal&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/goals&amp;gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/execution&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/644772390189718868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/644772390189718868' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/644772390189718868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/644772390189718868'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2013/01/howto-add-emma-support-to-maven-gwt.html' title='HOWTO add Emma Support to Maven GWT'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-4286534227012221417</id><published>2012-10-29T09:48:00.001-07:00</published><updated>2015-04-02T10:21:49.476-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>GWT CssResource not working...</title><content type='html'>&lt;br /&gt;
I recently was trying to use a CssResource and I couldn&#39;t figure out why it wasn&#39;t working. It was inserting the class attribute into the Element but it wasn&#39;t actually adding the CSS file into the document. &amp;nbsp;I finally noticed that there is an method called ensureInjected() on the generate CssResource and that seemed to fix my problem. My assumption is that somewhere in GWT when it loads the ClientBundle its calling this method somewhere but in my case the class that was calling it was just a regular class and not some sort of widget. Anyway, call ensureInjected() and it should fix your problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/4286534227012221417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/4286534227012221417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/4286534227012221417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/4286534227012221417'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/10/gwt-cssresource-not-working.html' title='GWT CssResource not working...'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-2509249372701644007</id><published>2012-07-31T05:13:00.001-07:00</published><updated>2015-04-02T10:21:58.027-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>Custom Containers with GWT UiBinder</title><content type='html'>&lt;div class=&quot;tr_bq&quot;&gt;
I just wasted a whole day at work trying to figure out how to create my own container widget that will work with in GWT&#39;s UiBinder. In the end, I was forced to dig through the source to find the solution. If you take a look at the &lt;a href=&quot;http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java?r=7816#882&quot;&gt;UIBinderClass.registerParsers()&lt;/a&gt;, you&#39;ll see that it has a list of hard coded ElementParsers. If you take a close look, you&#39;ll notice that google has registered 4 generic parsers: HasText,HasHTML,HasTreeItems,HasWidgets. So if you&#39;re Composite class implements any one of these interfaces then it will you&#39;re widget will support having some child element&#39;s within it&#39;s XML.

In my case, I just wanted to create a custom decorated panel. So I simple created a class that extended the HasWidget interface. 
&lt;/div&gt;
&lt;pre&gt;public class Decorated extends Composite implements HasWidgets {
 private static DecoratedUiBinder uiBinder = GWT.create(DecoratedUiBinder.class);

 interface DecoratedUiBinder extends UiBinder&lt;widget decorated=&quot;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; {
 }

 public Decorated() {
  initWidget(uiBinder.createAndBindUi(this));
 }

 @UiField SimplePanel placeholder;
 
 @Override
 protected Widget getWidget() {
  return placeholder.getWidget();
 }

 @Override
 protected void setWidget(Widget widget) {
  placeholder.setWidget(widget);
 }

 @Override
 public void add(Widget w) {
  setWidget(w);
 }

 @Override
 public void clear() {
  setWidget(null);
 }

 @Override
 public Iterator&lt;/span&gt;&lt;widget&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; iterator() {
  return Arrays.asList( getWidget() ).iterator();
 }

 @Override
 public boolean remove(Widget w) {
  if ( getWidget() == w ) {
   clear();
   return true;
  }
  return false;
 } 
}
&lt;/span&gt;&lt;/widget&gt;&lt;/widget&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;widget decorated=&quot;&quot;&gt;&lt;widget&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/widget&gt;&lt;/widget&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;widget decorated=&quot;&quot;&gt;&lt;widget&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/widget&gt;&lt;/widget&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;widget decorated=&quot;&quot;&gt;&lt;widget&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot; xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot;&amp;gt;
  &amp;lt;g:HTMLPanel&amp;gt;
    &amp;lt;div&amp;gt;
      &amp;lt;div&amp;gt;
         &amp;lt;g:SimplePanel ui:field=&quot;placeholder&quot; /&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/g:HTMLPanel&amp;gt;
&amp;lt;/ui:UiBinder&amp;gt;&lt;/span&gt;&lt;/widget&gt;&lt;/widget&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;widget decorated=&quot;&quot;&gt;&lt;widget&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;/span&gt;&lt;/widget&gt;&lt;/widget&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/2509249372701644007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/2509249372701644007' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/2509249372701644007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/2509249372701644007'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/07/custom-containers-with-gwt-uibinder.html' title='Custom Containers with GWT UiBinder'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-6110801544178557229</id><published>2012-06-12T12:24:00.002-07:00</published><updated>2012-06-12T12:24:14.166-07:00</updated><title type='text'>Regular Expressions Syntax</title><content type='html'>&lt;b id=&quot;internal-source-marker_0.4448585449717939&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;h3 dir=&quot;ltr&quot;&gt;
&lt;b id=&quot;internal-source-marker_0.4448585449717939&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Perl&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;b id=&quot;internal-source-marker_0.4448585449717939&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Repeats&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;* Match 0 or more times&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;+ Match 1 or more times&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;? Match 1 or 0 times&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{n} Match exactly n times&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{n,} Match at least n times&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;{n,m} Match at least n but not more than m times&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 dir=&quot;ltr&quot;&gt;
&lt;span style=&quot;font-family: Arial; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;RegEx&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;. Match any character&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\w Match &quot;word&quot; character (alphanumeric plus &quot;_&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\W Match non-word character&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\s Match whitespace character&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\S Match non-whitespace character&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\d Match digit character&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\D Match non-digit character&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\t Match tab&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\n Match newline&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\r Match return&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\f Match formfeed&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\a Match alarm (bell, beep, etc)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\e Match escape&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\021 Match octal char ( in this case 21 octal)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;\xf0 Match hex char ( in this case f0 hexidecimal)&lt;/span&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/6110801544178557229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/6110801544178557229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6110801544178557229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6110801544178557229'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/06/regular-expressions-syntax.html' title='Regular Expressions Syntax'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-5218244344528264168</id><published>2012-06-12T12:12:00.000-07:00</published><updated>2012-06-12T12:26:18.200-07:00</updated><title type='text'>SQL Syntax</title><content type='html'>&lt;span id=&quot;internal-source-marker_0.4448585449717939&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;Not sure what it is about the SQL case statement but I never can seem to remember it..&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;case &lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;var&gt; &lt;/var&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;when 1 then &lt;op1&gt; &lt;/op1&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;when 2 then &lt;op2&gt; &lt;/op2&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;else &lt;op3&gt; &lt;/op3&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;end&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;case &lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;when &lt;boolean op1=&quot;&quot;&gt; then &lt;op1&gt; &lt;/op1&gt;&lt;/boolean&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;when &lt;boolean op2=&quot;&quot;&gt; then &lt;op2&gt; &lt;/op2&gt;&lt;/boolean&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;else &lt;op3&gt; &lt;/op3&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;end&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-weight: bold;&quot;&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Here&#39;s a &lt;a href=&quot;http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt&quot;&gt;link&lt;/a&gt; to the SQL spec for those hardcore people out there..&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/5218244344528264168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/5218244344528264168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5218244344528264168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5218244344528264168'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/06/sql-syntax.html' title='SQL Syntax'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-6049750066951784015</id><published>2012-06-12T11:58:00.002-07:00</published><updated>2012-06-12T11:58:16.755-07:00</updated><title type='text'>Eclipse Keystrokes..</title><content type='html'>&lt;br /&gt;
Here&#39;s a list of my&amp;nbsp;favorite&amp;nbsp;Eclipse keystrokes.&lt;br /&gt;
&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+SHIFT+R - Open Resource &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+SHIFT+T - Open Type&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+SHIFT+Y - To Lower Case&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+SHIFT+X - To Upper Case&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+1 - Quick Fix&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+O - Opens Overview(ish) window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+SPACE - Text Completion Window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+L - Go to Line&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+Q - Go to last edit&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+T - Open Inheritance window&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;CTRL+E - Open Editor&lt;/span&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/6049750066951784015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/6049750066951784015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6049750066951784015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/6049750066951784015'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/06/eclipse-keystrokes.html' title='Eclipse Keystrokes..'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-1969405359406262507</id><published>2012-06-12T11:56:00.001-07:00</published><updated>2012-06-12T11:56:09.229-07:00</updated><title type='text'>Emac Notes</title><content type='html'>&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;I&#39;m not even close to an emacs user but I do like it better than notepad or whatever lame editors come with the OS. Here&#39;s a like of commands I always need but forget.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;alt-x hexl-mode - opens hex mode viewer&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b id=&quot;internal-source-marker_0.8712573712691665&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;/b&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/1969405359406262507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/1969405359406262507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/1969405359406262507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/1969405359406262507'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/06/emac-notes.html' title='Emac Notes'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-5242562999852081272</id><published>2012-06-12T11:51:00.002-07:00</published><updated>2015-04-02T10:24:07.064-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>GWT Unit Tests</title><content type='html'>&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;About a year ago, I spent about two months trying to figure out how to integrate GWT&#39;s unit tests within a custom web container. The problem what that we had an embedded jetty server which which had access to the full ClassLoader (i.e. disabled J2EE compliance).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;In development mode, this wasn&#39;t an issue because there is two easy workarounds. I started out by using the -server option and build a customer &lt;/span&gt;&lt;a href=&quot;http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/core/ext/ServletContainerLauncher.html&quot; style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;ServletContainerLauncher&lt;/a&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt; which allowed my to start the whole application (jetty server and all) within the dev-mode. This solution worked fine and even supported the &quot;restart/reload&quot; option with eclipse but after working with GWT for a while, I realized this was an overkill.  Instead, I realize that you can use the -no-server option to achieve the same thing. So instead of trying to force our application to run the GWT container, I started up our application and the GWT engine in dev mode. GWT engine then generated the javascript and dumped it in our applications webapp directory. When the browser hit our web server it would then serve up the html and js files that GWT generated but because the ?gwt.codesrv= argument existed on the URI, the GWT browser plugin would then communicate to the GWT engine.  Of course,  in this mode the reload/restart button didn&#39;t work in eclipse but one advantage of this solution is you can easily swap between production and dev mode.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;h5 dir=&quot;ltr&quot; style=&quot;display: inline !important;&quot;&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;Unfortunately, getting JUnit tests running was not as easy. &lt;/span&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;So in order to get junit tests running within our own servlet container, I was forced to patch the JUnitShell class. The patch does the following:&lt;/span&gt;&lt;/b&gt;&lt;/b&gt;&lt;/h5&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 15px; white-space: pre-wrap;&quot;&gt;Add a -server option to the enable a custom ServletContainerLauncher&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Created a CustomerLauncher that subclasses the ServletContainerLauncher. This allowed for the JunitTest to resolve the Jetty container and map the servlets from the my GWT module into the junit modules that was generated. See line &lt;a href=&quot;http://code.google.com/p/google-web-toolkit/issues/attachmentText?id=4615&amp;amp;aid=46150007000&amp;amp;name=JUnitShell.patch&amp;amp;token=JgNX3JUgoLJYuBLsUc_NWTUN2Mk%3A1339526845378#148&quot;&gt;148&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;The  patch is attached to the following google &lt;a href=&quot;http://code.google.com/p/google-web-toolkit/issues/detail?id=4615&quot;&gt;ticket.&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://code.google.com/p/google-web-toolkit/issues/detail?id=4615&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/5242562999852081272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/5242562999852081272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5242562999852081272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/5242562999852081272'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/06/gwt-unit-tests.html' title='GWT Unit Tests'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-7497518998249237570</id><published>2012-04-26T10:00:00.002-07:00</published><updated>2012-07-17T12:26:51.129-07:00</updated><title type='text'>HTML Color Palette Generator.</title><content type='html'>From time to time,I need to find a set of colors that look good together and it turns out this is much easier than you think. Color theory states that if you look at the &lt;a href=&quot;http://en.wikipedia.org/wiki/Color_wheel&quot;&gt;color wheel&lt;/a&gt; and that is exactly opposite (180 degrees) your color, it will match. Now that will give you 2 colors. Say you want 3. Then you create a triangle between your color and the two other colors that are exactly 120 degrees. It turns out you can keep doing this. For instance, if you want 6 colors than 360 / 6 = 60 and therefor you want the colors that are at 60,120,180,240,300 degrees away from your point. 

So here&#39;s a little bit of javascript that will generate a color palette off of a single HEX color. Just enter the color,the count, hit generate, and it will dump the colors that look good with your original color. I&#39;ve found this stuff pretty useful and couldn&#39;t find anything on that web that would do all the conversion for me.... Enjoy.

&lt;br/&gt;
&lt;script&gt;

function rgbToHsv(r, g, b){
    r = r/255, g = g/255, b = b/255;
    var max = Math.max(r, g, b), min = Math.min(r, g, b);
    var h, s, v = max;

    var d = max - min;
    s = max == 0 ? 0 : d / max;

    if(max == min){
        h = 0; // achromatic
    }else{
        switch(max){
            case r: h = (g - b) / d + (g &lt; b ? 6 : 0); break;
            case g: h = (b - r) / d + 2; break;
            case b: h = (r - g) / d + 4; break;
        }
        h /= 6;
    }

    return [h, s, v];
}

function hsvToRgb(h, s, v){
    var r, g, b;

    var i = Math.floor(h * 6);
    var f = h * 6 - i;
    var p = v * (1 - s);
    var q = v * (1 - f * s);
    var t = v * (1 - (1 - f) * s);

    switch(i % 6){
        case 0: r = v, g = t, b = p; break;
        case 1: r = q, g = v, b = p; break;
        case 2: r = p, g = v, b = t; break;
        case 3: r = p, g = q, b = v; break;
        case 4: r = t, g = p, b = v; break;
        case 5: r = v, g = p, b = q; break;
    }

    return [r * 255, g * 255, b * 255];
}

function getColorCount() {
  return document.getElementById(&quot;count&quot;).value;
}

function run() {
  var div = document.getElementById(&quot;results&quot;);
  var count = getColorCount();
  var color = parseInt( document.getElementById(&quot;color&quot;).value , 16 );
  var r = (color &amp; 0xFF0000) &gt;&gt; 16;
  var g = (color &amp; 0x00FF00) &gt;&gt; 8;
  var b = (color &amp; 0x0000FF);
  var hsv = rgbToHsv(r,g,b);
 
  var delta = 100 / count;
  var html = &quot;&quot;;
  var jv = &quot;&quot;;
  var js = &quot;&quot;;

  for(var i = 0 ; i &lt; count ; i++ ) {
     var h = (( hsv[0]*100 + i*delta ) % 100)/100;
     var rgb = hsvToRgb( h ,hsv[1],hsv[2]);
     var hex = ( rgb[0] &lt;&lt; 16 | rgb[1] &lt;&lt; 8 | rgb[2] ).toString(16);

     while ( hex.length &lt; 6 ) 
 hex = &quot;0&quot; + hex;

     html += &quot;&lt;div style=&#39;color: black; width:100%;height:100px;background: #&quot;+hex+&quot;;&#39;&gt;&quot;+hex+&quot;&lt;br/&gt;&quot;+h+&quot;,&quot;+hsv[1]+&quot;,&quot;+hsv[2]+&quot;&lt;/div&gt;&quot;;

     jv += &quot;\&quot;#&quot;+hex+&quot;\&quot;,&quot;;
     js += &quot;0x&quot;+hex+&quot;,&quot;;
  }


  div.innerHTML = html + &quot;&lt;br/&gt;&lt;textarea&gt;&quot; + jv + &quot;\n&quot; + js +&quot;&lt;/textarea&gt;&quot;;
}
&lt;/script&gt;

Color: &lt;input id=&quot;color&quot; value=&quot;BB0000&quot;/&gt; &lt;br /&gt;
Count: &lt;input id=&#39;count&#39; value=&#39;5&#39; /&gt;&lt;/br&gt;

&lt;input type=&quot;button&quot; value=&quot;Generate Colors&quot; onclick=&quot;run();&quot; /&gt;

&lt;div id=&#39;results&#39;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/7497518998249237570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/7497518998249237570' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/7497518998249237570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/7497518998249237570'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/04/function-rgbtohsvr-g-b-r-r255-g-g255-b.html' title='HTML Color Palette Generator.'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-411407235691719402</id><published>2012-01-05T07:19:00.000-08:00</published><updated>2012-05-23T12:31:29.275-07:00</updated><title type='text'>How to enable port forwarding in openssh</title><content type='html'>How to enable port forwarding in openssh?



Add the following lines to the /etc/sshd_conf file to enable port forwarding and GatewayPort. This will allow you to map ports to other boxes within your private network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
AllowTcpForwarding yes&lt;br /&gt;
GatewayPorts yes&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/411407235691719402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/411407235691719402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/411407235691719402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/411407235691719402'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2012/01/how-to-enable-port-forwarding-in.html' title='How to enable port forwarding in openssh'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-4937877975781804329</id><published>2011-07-12T07:19:00.000-07:00</published><updated>2011-07-12T07:19:57.356-07:00</updated><title type='text'>Where&#39;s did my 300m of internal storage go?</title><content type='html'>For a while now, I&#39;ve been using&amp;nbsp;&lt;a href=&quot;https://market.android.com/details?id=com.a0soft.gphone.app2sd&amp;amp;feature=more_from_developer&quot;&gt;App 2 SD&lt;/a&gt;&amp;nbsp;to manage the internal storage on HTC EVO. But recently, I started to notice that the numbers weren&#39;t adding up. For instance, it said that I had used 400m of internal storage but the apps installed to internal storage only totaled 100m. So where was there other 300m? After Googling around, I finally found&amp;nbsp;&lt;a href=&quot;https://market.android.com/details?id=com.google.android.diskusage&quot;&gt;DiskUsage&lt;/a&gt;&amp;nbsp;app. This app allows you to determine what applications are using internal storage. And the&amp;nbsp;answer&amp;nbsp;to this missing 300m? To my&amp;nbsp;surprise, the ONLY thing installed on the SD drive is the application itself. The Application Data can still use internal storage and Android is using the internal storage to cache the binaries. &amp;nbsp;I felt this is extremely&amp;nbsp;misleading and Google really needs to fix this.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://market.android.com/details?id=com.google.android.diskusage&quot;&gt;DiskUsage&lt;/a&gt;&amp;nbsp;isn&#39;t the best UI but it does allow you to select/filter the 3 types of memory (app,data,cache).</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/4937877975781804329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/4937877975781804329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/4937877975781804329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/4937877975781804329'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2011/07/wheres-did-my-300m-of-internal-storage.html' title='Where&#39;s did my 300m of internal storage go?'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34281546.post-3654896424874557302</id><published>2011-05-06T08:27:00.000-07:00</published><updated>2015-04-02T10:22:51.006-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>Maven Color Coding</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Here is my bash script that will color code that output of maven. The goal is to&amp;nbsp;highlight&amp;nbsp;any important lines to make it easier to identify if something failed. I&amp;nbsp;highlight&amp;nbsp;all passed unit tests it green and red for the failing tests.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Enjoy,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#!/bin/sh&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;# other colors&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export COLOR_RED=`echo -e &#39;\033[1;41m\033[37m&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export COLOR_GREEN=`echo -e &#39;\033[1;42m\033[37m&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export COLOR_NORMAL=`echo -e &#39;\033[0m&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_BLACK=`tput setab 0`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_RED=`tput setab 1`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_GREEN=`tput setab 2`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_YELLOW=`tput setab 3`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_BLUE=`tput setab 4`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_MAGENTA=`tput setab 5`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_CYAN=`tput setab 6`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;#export BACKGROUND_WHITE=`tput setab 7`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export BOLD=`tput bold`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export UNDERLINE_ON=`tput smul`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export UNDERLINE_OFF=`tput rmul`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_BLACK=`tput setaf 0`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_RED=`tput setaf 1`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_GREEN=`tput setaf 2`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_YELLOW=`tput setaf 3`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_BLUE=`tput setaf 4`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_MAGENTA=`tput setaf 5`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_CYAN=`tput setaf 6`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export TEXT_WHITE=`tput setaf 7`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;export RESET_FORMATTING=`tput sgr0`&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;mvn $* | sed \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-e &quot;s/\(\[WARNING\].*\)/${TEXT_YELLOW}\1${RESET_FORMATTING}/g&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-e &quot;s/\(\[ERROR\].*\)/${TEXT_RED}\1${RESET_FORMATTING}/g&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-e &quot;s/\(.*Failures:\s*[123456789].*\)/$TEXT_RED\1$RESET_FORMATTING/i&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-e &quot;s/\(.*Errors:\s*[123456789].*\)/$TEXT_RED\1$RESET_FORMATTING/i&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-e &quot;s/\(.*Failures:\s*0,\s*Errors:\s*0.*\)/$TEXT_GREEN\1$RESET_FORMATTING/i&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-e &quot;s/\(.*Errors:\s*0,\s*Failures:\s*0.*\)/$TEXT_GREEN\1$RESET_FORMATTING/i&quot;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://my-tech-notes.blogspot.com/feeds/3654896424874557302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/34281546/3654896424874557302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3654896424874557302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34281546/posts/default/3654896424874557302'/><link rel='alternate' type='text/html' href='http://my-tech-notes.blogspot.com/2011/05/maven-color-coding.html' title='Maven Color Coding'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/09190812423093575978</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>