<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jesse Peterson &#187; tip</title>
	<atom:link href="http://www.jpeterson.com/tag/tip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jpeterson.com</link>
	<description>Personal ramblings of a computer geek in Iowa</description>
	<lastBuildDate>Thu, 26 Jan 2012 04:16:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using a Maven profile to run a test program</title>
		<link>http://www.jpeterson.com/2009/08/25/using-a-maven-profile-to-run-a-test-program/</link>
		<comments>http://www.jpeterson.com/2009/08/25/using-a-maven-profile-to-run-a-test-program/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 03:19:19 +0000</pubDate>
		<dc:creator>cubeinhabitant</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.jpeterson.com/?p=184</guid>
		<description><![CDATA[This is a new (to me) trick for my programming toolbox. I discovered (copied) it from the Apache CXF project. (I don&#8217;t know if they originated it or not.) Basically, you can use a Maven profile configuration in your pom.xml to easily run a test program in your project that has a public static void [...]]]></description>
			<content:encoded><![CDATA[<p>This is a new (to me) trick for my programming toolbox. I discovered (copied) it from the <a href="http://cxf.apache.org/">Apache CXF</a> project. (I don&#8217;t know if they originated it or not.) Basically, you can use a <a href="http://maven.apache.org/">Maven</a> profile configuration in your pom.xml to easily run a test program in your project that has a <code>public static void main(String[] args)</code> method. I discovered this technique reading the <a href="http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jaxws/README.txt?view=co">README.txt</a> of the Apache CXF sample &#8220;<code>java_first_jaxws</code>&#8220;. Here is what the Maven command looks like:</p>
<p><code>mvn -Pserver</code></p>
<p>Here is what the profile configuration in the pom.xml looks like:</p>
<pre>...
&lt;profiles&gt;
  &lt;profile&gt;
    &lt;id&gt;server&lt;/id&gt;
    &lt;build&gt;
      &lt;defaultGoal&gt;test&lt;/defaultGoal&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;phase&gt;test&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;java&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;mainClass&gt;demo.hw.server.Server&lt;/mainClass&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/profile&gt;
...
&lt;/profiles&gt;
...</pre>
<p>When the &#8220;<code>mvn -Pserver</code>&#8221; command is executed, the <code>exec-maven-plugin</code> will run the <code>demo.hw.server.Server</code> class. The <code>id</code> identifies the profile id used in the mvn command after the &#8220;<code>-p</code>&#8220;. The <code>mainClass</code> element defines the class with the main method to execute. The <a href="http://mojo.codehaus.org/exec-maven-plugin/"><code>exec-maven-plugin</code></a> does all of the hard work. One of the benefits of this technique is the standard Maven classpath for the project defined in the pom to build and unit test your software is used to run the <code>mainClass</code>. This comes in quite handy if your program uses many jar files. I used to use a Windows batch file (copied from the <a href="http://tomcat.apache.org/">Tomcat</a> startup script <a href="http://svn.apache.org/repos/asf/tomcat/trunk/bin/catalina.bat"><code>catalina.bat</code></a>) to run little test programs. This Maven profile technique is much easier to use for me, since I use Maven for most all of my Java development.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpeterson.com/2009/08/25/using-a-maven-profile-to-run-a-test-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote desktop connection tip</title>
		<link>http://www.jpeterson.com/2009/03/18/remote-desktop-connection-tip/</link>
		<comments>http://www.jpeterson.com/2009/03/18/remote-desktop-connection-tip/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 15:37:59 +0000</pubDate>
		<dc:creator>cubeinhabitant</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.jpeterson.com/?p=165</guid>
		<description><![CDATA[Today I am working from home because Sydney is sick. I therefore connect via the VPN to my work computer. I use Microsoft Remote Desktop Connection to connect to my work computer. But periodically I have problems typing into the remote computer: whenever I type a &#8216;u&#8217; character, the Microsoft Utility Manager pops up.
After doing [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am working from home because Sydney is sick. I therefore connect via the VPN to my work computer. I use Microsoft Remote Desktop Connection to connect to my work computer. But periodically I have problems typing into the remote computer: whenever I type a &#8216;u&#8217; character, the Microsoft Utility Manager pops up.</p>
<p>After doing a bit of searching on Google, I came upon this post &#8220;<a href="http://michaelshadle.com/2007/09/19/windows-key-stuck-in-remote-desktop/">Windows key &#8220;stuck&#8221; in Remote Desktop&#8230;</a>&#8220;. This seemed to accurately describe my problem. But, the <a href="http://michaelshadle.com/2007/09/19/windows-key-stuck-in-remote-desktop/#comment-5806">first comment in the post</a> was able to work around my particular problem:</p>
<p style="padding-left: 30px;">The best workaround that always works for me is:</p>
<p style="padding-left: 30px;">1. Close the RD window<br />
2. Open new RD but make sure the &#8220;Apply Windows key Combinations&#8221; is set to &#8220;On the remote computer&#8221;<br />
3. Now press the Ctrl+Alt+End and lock the computer<br />
4. Log in again and it should work.</p>
<p style="padding-left: 30px;">amirhp<br />
/&#8217;L'\mir</p>
<p>I put this here so that I can remember it for the next time. (Yeah, I pretty much expect that this condition will happen again.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpeterson.com/2009/03/18/remote-desktop-connection-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

