<?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>Weblog</title>
	<atom:link href="http://famvdploeg.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://famvdploeg.com/blog</link>
	<description>A simple look on things</description>
	<lastBuildDate>Wed, 20 Jan 2010 16:28:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Basic iptables configuration</title>
		<link>http://famvdploeg.com/blog/2010/01/basic-iptables-configuration/</link>
		<comments>http://famvdploeg.com/blog/2010/01/basic-iptables-configuration/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 13:21:36 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux iptables chains]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=136</guid>
		<description><![CDATA[Here is a small basic example allowing you to setup your iptables.
First we reset everything. See the man page for exact details on the parameters we use.

iptables -F
iptables -Z
iptables -X

Create some chains that will provide us with some logging.

iptables -N logdrop
iptables -N logreject
iptables -N logaccept

Add some rules to these chains.

iptables -A logdrop -j LOG --log-prefix [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a small basic example allowing you to setup your iptables.</p>
<p>First we reset everything. See the man page for exact details on the parameters we use.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-F</span>
iptables <span style="color: #660033;">-Z</span>
iptables <span style="color: #660033;">-X</span></pre></div></div>

<p>Create some chains that will provide us with some logging.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-N</span> logdrop
iptables <span style="color: #660033;">-N</span> logreject
iptables <span style="color: #660033;">-N</span> logaccept</pre></div></div>

<p>Add some rules to these chains.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-A</span> logdrop <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">'DROP: '</span> <span style="color: #660033;">--log-level</span> warning
iptables <span style="color: #660033;">-A</span> logdrop <span style="color: #660033;">-j</span> DROP
iptables <span style="color: #660033;">-A</span> logdrop <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">'REJECT: '</span> <span style="color: #660033;">--log-level</span> warning
iptables <span style="color: #660033;">-A</span> logdrop <span style="color: #660033;">-j</span> REJECT
iptables <span style="color: #660033;">-A</span> logaccept <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">'ACCEPT: '</span> <span style="color: #660033;">--log-level</span> warning
iptables <span style="color: #660033;">-A</span> logaccept <span style="color: #660033;">-j</span> ACCEPT</pre></div></div>

<p>Now you have a basic setup with some logging.<br />
The next step will be to apply your rules and jump to the corresponding chain on a positive match.<br />
You could set the default policies for the INPUT, FORWARD and OUTPUT chains to ACCEPT and add a jump to logdrop at the end of each chain so that any non-matching rules will be automatically dropped.</p>
<p>Small example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> lo <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> RELATED,ESTABLISHED <span style="color: #660033;">-j</span> ACCEPT
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">22</span> <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> NEW <span style="color: #660033;">-j</span> logaccept
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">443</span> <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> NEW <span style="color: #660033;">-j</span> logaccept
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">80</span> <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> NEW <span style="color: #660033;">-j</span> logaccept
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-j</span> logdrop
&nbsp;
iptables <span style="color: #660033;">-A</span> FORWARD <span style="color: #660033;">-j</span> logreject</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2010/01/basic-iptables-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some bash stuff</title>
		<link>http://famvdploeg.com/blog/2009/08/some-bash-stuff/</link>
		<comments>http://famvdploeg.com/blog/2009/08/some-bash-stuff/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 07:38:25 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=124</guid>
		<description><![CDATA[I just need a cheat sheet because I keep forgetting all these bash things.



Number of parameters:
$#


All parameters:
$@


String length:
${#foo}


Remove trailing slash:
${foo%/}


Check return value from last command:
$?



]]></description>
			<content:encoded><![CDATA[<p>I just need a cheat sheet because I keep forgetting all these bash things.</p>
<table border="0">
<tbody>
<tr>
<td>Number of parameters:</td>
<td>$#</td>
</tr>
<tr>
<td>All parameters:</td>
<td>$@</td>
</tr>
<tr>
<td>String length:</td>
<td>${#foo}</td>
</tr>
<tr>
<td>Remove trailing slash:</td>
<td>${foo%/}</td>
</tr>
<tr>
<td>Check return value from last command:</td>
<td>$?</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2009/08/some-bash-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lm-sensors on the VIA EPIA SN10000EG and SN18000g</title>
		<link>http://famvdploeg.com/blog/2009/07/lm-sensors-on-the-via-epia-sn10000eg-and-sn18000g/</link>
		<comments>http://famvdploeg.com/blog/2009/07/lm-sensors-on-the-via-epia-sn10000eg-and-sn18000g/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 09:39:17 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=112</guid>
		<description><![CDATA[1. Edit /etc/modprobe.d/options.conf
2. Add the following line:

options dme1737 probe_all_addr=1

3. Save and exit
4. Load the module

modprobe dme1737

5. Check that it loaded succesfully:

lsmod

6. Edit the /etc/sysconfig/lm_sensors file

HWMON_MODULES=&#34;dme1737&#34;
MODULE_0=dme1737

7. Run sensors to check the output

sensors

8. I also compiled the c7temp module because the in0 didn&#8217;t show and loaded it.

mkdir -p /usr/src/c7temp
&#40;I extracted the c7temp.c file from the patch which [...]]]></description>
			<content:encoded><![CDATA[<p>1. Edit /etc/modprobe.d/options.conf<br />
2. Add the following line:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">options dme1737 <span style="color: #007800;">probe_all_addr</span>=<span style="color: #000000;">1</span></pre></div></div>

<p>3. Save and exit<br />
4. Load the module</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">modprobe dme1737</pre></div></div>

<p>5. Check that it loaded succesfully:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">lsmod</span></pre></div></div>

<p>6. Edit the /etc/sysconfig/lm_sensors file</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">HWMON_MODULES</span>=<span style="color: #ff0000;">&quot;dme1737&quot;</span>
<span style="color: #007800;">MODULE_0</span>=dme1737</pre></div></div>

<p>7. Run sensors to check the output</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">sensors</pre></div></div>

<p>8. I also compiled the c7temp module because the in0 didn&#8217;t show and loaded it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>c7temp
<span style="color: #7a0874; font-weight: bold;">&#40;</span>I extracted the c7temp.c <span style="color: #c20cb9; font-weight: bold;">file</span> from the <span style="color: #c20cb9; font-weight: bold;">patch</span> <span style="color: #c20cb9; font-weight: bold;">which</span> is placed here:
http:<span style="color: #000000; font-weight: bold;">//</span>lists.lm-sensors.org<span style="color: #000000; font-weight: bold;">/</span>pipermail<span style="color: #000000; font-weight: bold;">/</span>lm-sensors<span style="color: #000000; font-weight: bold;">/</span>attachments<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">20080619</span><span style="color: #000000; font-weight: bold;">/</span>0dccdaf0<span style="color: #000000; font-weight: bold;">/</span>attachment.bin<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>c7temp<span style="color: #000000; font-weight: bold;">/</span>c7temp.c
filled the contents of c7temp.c with those of the <span style="color: #c20cb9; font-weight: bold;">patch</span></pre></div></div>

<p>Created a makefile in the c7temp dir.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">obj-m    := c7temp.o
&nbsp;
KDIR    := <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span>shell <span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span>build
PWD    := $<span style="color: #7a0874; font-weight: bold;">&#40;</span>shell <span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
default:
	$<span style="color: #7a0874; font-weight: bold;">&#40;</span>MAKE<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #660033;">-C</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span>KDIR<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">SUBDIRS</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span>PWD<span style="color: #7a0874; font-weight: bold;">&#41;</span> modules</pre></div></div>

<p>And ran make in the c7temp dir. This will get you a .ko file. Install it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-m</span> <span style="color: #000000;">644</span> c7temp.ko <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`/</span>kernel<span style="color: #000000; font-weight: bold;">/</span>drivers<span style="color: #000000; font-weight: bold;">/</span>hwmon<span style="color: #000000; font-weight: bold;">/</span>c7temp.ko</pre></div></div>

<p>Generate the modules.dep and map files</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">depmod <span style="color: #660033;">-a</span></pre></div></div>

<p>And load the module</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">modprobe c7temp</pre></div></div>

<p>And check that the module loaded with lsmod</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">lsmod</span></pre></div></div>

<p>Modified the /etc/sysconfig/lm_sensors file a bit again</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Generated by sensors-detect on Wed Jul  1 08:43:13 2009</span>
<span style="color: #666666; font-style: italic;"># This file is sourced by /etc/init.d/lm_sensors and defines the modules to</span>
<span style="color: #666666; font-style: italic;"># be loaded/unloaded.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># The format of this file is a shell script that simply defines variables:</span>
<span style="color: #666666; font-style: italic;"># HWMON_MODULES for hardware monitoring driver modules, and optionally</span>
<span style="color: #666666; font-style: italic;"># BUS_MODULES for any required bus driver module (for example for I2C or SPI).</span>
&nbsp;
<span style="color: #007800;">HWMON_MODULES</span>=<span style="color: #ff0000;">&quot;dme1737 c7temp&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># For compatibility reasons, modules are also listed individually as variables</span>
<span style="color: #666666; font-style: italic;">#    MODULE_0, MODULE_1, MODULE_2, etc.</span>
<span style="color: #666666; font-style: italic;"># You should use BUS_MODULES and HWMON_MODULES instead if possible.</span>
&nbsp;
<span style="color: #007800;">MODULE_0</span>=dme1737
<span style="color: #007800;">MODULE_1</span>=c7temp</pre></div></div>

<p>Done.<br />
9. I edited the /etc/sensors3.conf file on my machine</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chip <span style="color: #ff0000;">&quot;sch311x-*&quot;</span>
    ignore in0
&nbsp;
    label in1 <span style="color: #ff0000;">&quot;Vcore&quot;</span>
    label in2 <span style="color: #ff0000;">&quot;+3.3V&quot;</span>
    label in3 <span style="color: #ff0000;">&quot;+5V&quot;</span>
    label in4 <span style="color: #ff0000;">&quot;+12V&quot;</span>
    label in5 <span style="color: #ff0000;">&quot;3VSB&quot;</span>
    label in6 <span style="color: #ff0000;">&quot;Vbat&quot;</span>
&nbsp;
    label temp1 <span style="color: #ff0000;">&quot;CPU&quot;</span>
    label temp2 <span style="color: #ff0000;">&quot;SIO Temp&quot;</span>
    label temp3 <span style="color: #ff0000;">&quot;M/B Temp&quot;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">set</span> in2_min  <span style="color: #000000;">3.3</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">0.90</span>
    <span style="color: #000000; font-weight: bold;">set</span> in2_max  <span style="color: #000000;">3.3</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1.10</span>
    <span style="color: #000000; font-weight: bold;">set</span> in3_min  <span style="color: #000000;">5.0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">0.90</span>
    <span style="color: #000000; font-weight: bold;">set</span> in3_max  <span style="color: #000000;">5.0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1.10</span>
    <span style="color: #000000; font-weight: bold;">set</span> in4_min <span style="color: #000000;">12.0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">0.90</span>
    <span style="color: #000000; font-weight: bold;">set</span> in4_max <span style="color: #000000;">12.0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1.10</span>
    <span style="color: #000000; font-weight: bold;">set</span> in5_min  <span style="color: #000000;">3.3</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">0.90</span>
    <span style="color: #000000; font-weight: bold;">set</span> in5_max  <span style="color: #000000;">3.3</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1.10</span>
    <span style="color: #000000; font-weight: bold;">set</span> in6_min  <span style="color: #000000;">3.0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">0.90</span>
    <span style="color: #000000; font-weight: bold;">set</span> in6_max  <span style="color: #000000;">3.0</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">1.10</span>
&nbsp;
chip <span style="color: #ff0000;">&quot;c7temp-*&quot;</span>
    ignore temp1</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2009/07/lm-sensors-on-the-via-epia-sn10000eg-and-sn18000g/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Samba basic config</title>
		<link>http://famvdploeg.com/blog/2009/05/samba-basic-config/</link>
		<comments>http://famvdploeg.com/blog/2009/05/samba-basic-config/#comments</comments>
		<pubDate>Thu, 07 May 2009 07:10:45 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Debian]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=100</guid>
		<description><![CDATA[Step one: You will need samba
apt-get install samba
Step two: Check if you have a group for your samba users.

cat /etc/group &#124; grep samba

On my system this resulted in &#8220;sambashare:x:107:&#8221; which means we have a group called sambashare with gid 107.
If you don&#8217;t have a group you can create it. I recommend specifying an own gid [...]]]></description>
			<content:encoded><![CDATA[<p>Step one: You will need samba
<pre>apt-get install samba</pre>
<p>Step two: Check if you have a group for your samba users.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>group <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> samba</pre></div></div>

<p>On my system this resulted in &#8220;sambashare:x:107:&#8221; which means we have a group called sambashare with gid 107.</p>
<p>If you don&#8217;t have a group you can create it. I recommend specifying an own gid which you can use on multiple systems.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">groupadd <span style="color: #660033;">-g</span> <span style="color: #000000;">2000</span> share</pre></div></div>

<p>Step three: Create some basic users.</p>
<p>If the user doesn&#8217;t exist on the system you will need to create it. I assume this new user will only be used with samba.<br />
So we will force it into the sambashare group and disable the shell. (If you didn&#8217;t have the sambashare group use share or whatever name you choose in the previous step)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">useradd <span style="color: #660033;">-g</span> sambashare <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">false</span> yourusername</pre></div></div>

<p>-g sets the main group for this user<br />
-s sets the shell login</p>
<p>After this we set a samba password</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">smbpasswd <span style="color: #660033;">-a</span> yourusername</pre></div></div>

<p>-a adds a new user and sets the password</p>
<p>Do a round trip of this step for all the users you need.</p>
<p>Step four:</p>
<p>Create some basic shares. Here is a short snippet to make a new share. Edit /etc/samba/smb.conf and add something like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>sharename<span style="color: #7a0874; font-weight: bold;">&#93;</span>
valid <span style="color: #c20cb9; font-weight: bold;">users</span> = user1, user2
path = <span style="color: #000000; font-weight: bold;">/</span>share
browsable = <span style="color: #c20cb9; font-weight: bold;">yes</span>
<span style="color: #c20cb9; font-weight: bold;">write</span> list = user2
create mask = 0664
directory mask = 0775
force user = root
force group = sambashare</pre></div></div>

<p>That&#8217;s it. Save it and then restart the server to be sure the settings are picked up.<br />
/etc/init.d/samba restart</p>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2009/05/samba-basic-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update-alternatives</title>
		<link>http://famvdploeg.com/blog/2009/03/update-alternatives/</link>
		<comments>http://famvdploeg.com/blog/2009/03/update-alternatives/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 13:08:10 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[java config update-alternatives]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=91</guid>
		<description><![CDATA[Having multiple jvm&#8217;s on your linux machine can be a pain in the ass. To select which jvm to use you can use the update-alternatives command. A small example of how to add a jvm to the alternatives here:

update-alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_11/bin/java 16011

This will add an entry for your jdk into the alternatives. The [...]]]></description>
			<content:encoded><![CDATA[<p>Having multiple jvm&#8217;s on your linux machine can be a pain in the ass. To select which jvm to use you can use the update-alternatives command. A small example of how to add a jvm to the alternatives here:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">update-alternatives <span style="color: #660033;">--install</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>java java <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>jdk1.6.0_11<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>java <span style="color: #000000;">16011</span></pre></div></div>

<p>This will add an entry for your jdk into the alternatives. The last number assigns the priority to this alternative. Which is the version and build number of the relase.</p>
<p>After adding you can use the following command to select the java version you want to use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">update-alternatives <span style="color: #660033;">--config</span> java</pre></div></div>

<p>If you switch the java update-alternatives to auto it will automatically pick the java alternative with the highest priority.</p>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2009/03/update-alternatives/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Time synchronization on your debian machine</title>
		<link>http://famvdploeg.com/blog/2008/08/time-synchronization-on-your-debian-machine/</link>
		<comments>http://famvdploeg.com/blog/2008/08/time-synchronization-on-your-debian-machine/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 11:50:16 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[ntp date time synchronize synchronization debian]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=86</guid>
		<description><![CDATA[In order to synchronize the time on your debian machine you can use ntp. (apt-get install ntp) This will install ntp and the ntp daemon. Edit your configuration found in /etc/ntp.conf and add some ntp servers close to your current location.
I added some ntp servers for the Netherlands.

# pool.ntp.org maps to more than 300 low-stratum [...]]]></description>
			<content:encoded><![CDATA[<p>In order to synchronize the time on your debian machine you can use ntp. (apt-get install ntp) This will install ntp and the ntp daemon. Edit your configuration found in /etc/ntp.conf and add some ntp servers close to your current location.</p>
<p>I added some ntp servers for the Netherlands.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># pool.ntp.org maps to more than 300 low-stratum NTP servers.</span>
<span style="color: #666666; font-style: italic;"># Your server will pick a different set every time it starts up.</span>
<span style="color: #666666; font-style: italic;">#  *** Please consider joining the pool! ***</span>
<span style="color: #666666; font-style: italic;">#  *** &lt;http://www.pool.ntp.org/join.html&gt; ***</span>
server 0.nl.pool.ntp.org
server 1.nl.pool.ntp.org
server 2.nl.pool.ntp.org
server 3.nl.pool.ntp.org
<span style="color: #666666; font-style: italic;"># server 0.debian.pool.ntp.org iburst</span>
<span style="color: #666666; font-style: italic;"># server 1.debian.pool.ntp.org iburst</span>
<span style="color: #666666; font-style: italic;"># server 2.debian.pool.ntp.org iburst</span>
<span style="color: #666666; font-style: italic;"># server 3.debian.pool.ntp.org iburst</span></pre></div></div>

<p>Test afterwards by calling the ntptime command (run as root). It should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ntp_gettime<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> returns code <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  <span style="color: #000000; font-weight: bold;">time</span> cc5e6a21.5f5d5000  Tue, Aug <span style="color: #000000;">26</span> <span style="color: #000000;">2008</span> <span style="color: #000000;">13</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">17.372</span>, <span style="color: #7a0874; font-weight: bold;">&#40;</span>.372518<span style="color: #7a0874; font-weight: bold;">&#41;</span>,
  maximum error <span style="color: #000000;">1299815</span> us, estimated error <span style="color: #000000;">646</span> us
ntp_adjtime<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> returns code <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>OK<span style="color: #7a0874; font-weight: bold;">&#41;</span>
  modes 0x0 <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>,
  offset -<span style="color: #000000;">141.000</span> us, frequency -<span style="color: #000000;">36.781</span> ppm, interval <span style="color: #000000;">1</span> s,
  maximum error <span style="color: #000000;">1299815</span> us, estimated error <span style="color: #000000;">646</span> us,
  status 0x1 <span style="color: #7a0874; font-weight: bold;">&#40;</span>PLL<span style="color: #7a0874; font-weight: bold;">&#41;</span>,
  <span style="color: #000000; font-weight: bold;">time</span> constant <span style="color: #000000;">6</span>, precision <span style="color: #000000;">1.000</span> us, tolerance <span style="color: #000000;">512</span> ppm,</pre></div></div>

<p>You can verify that your system clock was set ok now by calling the date command.</p>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2008/08/time-synchronization-on-your-debian-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomcat remote debugging</title>
		<link>http://famvdploeg.com/blog/2008/08/tomcat-remote-debugging/</link>
		<comments>http://famvdploeg.com/blog/2008/08/tomcat-remote-debugging/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 07:27:39 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=64</guid>
		<description><![CDATA[I was going to write a whole lot of howto here. But why do that when you can just link to the Tomcat Wiki?  
The wiki that shows you how to enable remote debugging is found here.
]]></description>
			<content:encoded><![CDATA[<p>I was going to write a whole lot of howto here. But why do that when you can just link to the Tomcat Wiki? <img src='http://famvdploeg.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The wiki that shows you how to enable remote debugging is found <a title="Tomcat Remote Debugging" href="http://wiki.apache.org/tomcat/HowTo?#head-7cca0313f1c7c42d8f539c56bae1b5459da55ad1" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2008/08/tomcat-remote-debugging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building EJB3 applications with Maven 2</title>
		<link>http://famvdploeg.com/blog/2008/08/building-ejb3-applications-with-maven-2/</link>
		<comments>http://famvdploeg.com/blog/2008/08/building-ejb3-applications-with-maven-2/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 06:52:19 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[maven2 maven ejb3 jpa example pom.xml pom]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=41</guid>
		<description><![CDATA[Here is a guide to building ejb3 applications with maven2 (from scratch). We will not be using any maven archetypes/templates but do it by hand to get a project that is as clean as possible.
First create a directory that will contain all the modules the ear file consists of. It will contain all the basic [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a guide to building ejb3 applications with maven2 (from scratch). We will not be using any maven archetypes/templates but do it by hand to get a project that is as clean as possible.</p>
<p>First create a directory that will contain all the modules the ear file consists of. It will contain all the basic info the other projects/modules need to inherit from.</p>
<p>Create the pom.xml file in the directory and update it with something like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your-artifact-name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>pom<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;module<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ear<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/module<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;module<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/module<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;module<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/module<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-compiler-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/source<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Then create the subdirectories ( I named them ear, war and ejb-jar in this case ) for the modules.</p>
<p>ejb-jar pom.xml:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-sample<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/parent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.ejb<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>provided<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javax.persistence<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>persistence-api<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>provided<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.testng<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>testng<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>5.7<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/scope<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>			
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-ejb-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ejbVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ejbVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>war pom.xml:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-sample<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/parent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>yourWarName<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>ear pom.xml:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">	<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-sample<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/parent<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ear<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ear<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>codehaus snapshot repository<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://snapshots.repository.codehaus.org/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your-ear-name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/finalName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-ear-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ejbModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>ejb-jar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ejbModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;webModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group.id<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>war<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/webModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;jboss<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
             			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
             			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;loader-repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>your.group:archive=your-ear-name.ear<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/loader-repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
           			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/jboss<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>					
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.codehaus.cargo<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>cargo-maven2-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.3-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;container<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;containerId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>jboss4x<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/containerId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>remote<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/type<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/container<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This is basically the project structure. I hope to create a downloadable archetype of this structure so you can start with this by running the mvn archetype plugin for easy use.</p>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2008/08/building-ejb3-applications-with-maven-2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Installing Trac with MySQL database</title>
		<link>http://famvdploeg.com/blog/2008/08/installing-trac-with-mysql-database/</link>
		<comments>http://famvdploeg.com/blog/2008/08/installing-trac-with-mysql-database/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 19:15:07 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[trac mysql install guide tutorial]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=68</guid>
		<description><![CDATA[1. Follow the basic guide posted here.
2. Be sure to install python-mysqldb package.
3. Create MySQL database and user for trac.

CREATE DATABASE trac;
CREATE user trac IDENTIFIED BY 'trac';
GRANT ALL privileges ON trac.* TO 'trac'@'%';

4. Run the following command:

trac-admin &#60;Your project dir&#62; initenv

5. When asked for the MySQL connection url enter something like the following:

#form: db-type://username:password@mysql-host:mysql-port/databasename
mysql://trac:trac@localhost:3306/trac

6. Configuring [...]]]></description>
			<content:encoded><![CDATA[<p>1. Follow the basic guide posted <a title="Trac on Debian" href="http://trac.edgewall.org/wiki/TracOnDebian" target="_blank">here</a>.<br />
2. Be sure to install python-mysqldb package.<br />
3. Create MySQL database and user for trac.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> trac;
<span style="color: #993333; font-weight: bold;">CREATE</span> user trac <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'trac'</span>;
<span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> privileges <span style="color: #993333; font-weight: bold;">ON</span> trac<span style="color: #66cc66;">.*</span> <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'trac'</span>@<span style="color: #ff0000;">'%'</span>;</pre></div></div>

<p>4. Run the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trac-admin <span style="color: #000000; font-weight: bold;">&lt;</span>Your project <span style="color: #c20cb9; font-weight: bold;">dir</span><span style="color: #000000; font-weight: bold;">&gt;</span> initenv</pre></div></div>

<p>5. When asked for the MySQL connection url enter something like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#form: db-type://username:password@mysql-host:mysql-port/databasename</span>
mysql:<span style="color: #000000; font-weight: bold;">//</span>trac:trac<span style="color: #000000; font-weight: bold;">@</span>localhost:<span style="color: #000000;">3306</span><span style="color: #000000; font-weight: bold;">/</span>trac</pre></div></div>

<p>6. Configuring Apache2 (Make sure you have mod_python)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span><span style="color: #000000; font-weight: bold;">&gt;</span>
                SetHandler mod_python
                PythonInterpreter main_interpreter
                PythonHandler trac.web.modpython_frontend
                PythonOption TracEnv <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span>
                PythonOption TracUriRoot <span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span>
        <span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">&lt;</span>LocationMatch <span style="color: #ff0000;">&quot;/trac/[^/]+/login&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
                AuthType Basic
                AuthName <span style="color: #ff0000;">&quot;Trac&quot;</span>
                AuthUserFile <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>trac.htpasswd
                Require valid-user
        <span style="color: #000000; font-weight: bold;">&lt;/</span>LocationMatch<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>7. Add admin login data</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">htpasswd <span style="color: #660033;">-c</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>trac.htpasswd admin</pre></div></div>

<p>8. Grant TRAC_ADMIN to admin user</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trac-admin <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span> permission add admin TRAC_ADMIN</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2008/08/installing-trac-with-mysql-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The paperless office</title>
		<link>http://famvdploeg.com/blog/2008/08/the-paperless-office/</link>
		<comments>http://famvdploeg.com/blog/2008/08/the-paperless-office/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 19:52:18 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[paper scan scanning ocr optical character recognition d]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=62</guid>
		<description><![CDATA[Well here we are once again. This time to conquer the pile of paper laying besides, on and under your desk. My girlfriend went nuts by the sheer load of paper laying around everywhere. I&#8217;m kind of messy but when I start to organize things I&#8217;m kind of a perfectionist. So here I went and [...]]]></description>
			<content:encoded><![CDATA[<p>Well here we are once again. This time to conquer the pile of paper laying besides, on and under your desk. My girlfriend went nuts by the sheer load of paper laying around everywhere. I&#8217;m kind of messy but when I start to organize things I&#8217;m kind of a perfectionist. So here I went and put all the papers in one big pile.</p>
<p>After going through the pile I realized that there were a lot of papers worth trowing away but at the same time we&#8217;re worth keeping. A dilemma. So I had a good cold beer and started thinking about the situation. The beer worked like oil on the brains and I came up with a good solution. &#8216;Let&#8217;s scan this pile of toiletpaper!&#8217; and so I provided my HP 7310 with some juice and put all the paperwork on the automatic paper input of the device. I inserted an empty SD-Card and started gaming while the HP started to do what it was made for.</p>
<p>After a few hours ( well actually the scanner was long done before that&#8230; plz don&#8217;t tell my girlfriend <img src='http://famvdploeg.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) the scans were complete and I put the files on my debian server. So far so good. Now at least I had a backup of all the paper versions. After that I was rather satisfied and threw away a large pile of paper I no longer needed as I had a digital backup now.</p>
<p>But a real geek doesn&#8217;t stop here. What I wanted next was to be able to search through my digital paperwork fast and get the papers that I need. So I had a look and found that there is a great open source ocr package called <a title="Tesseract-OCR" href="http://code.google.com/p/tesseract-ocr/" target="_blank">tesseract</a>. I downloaded some packages and started trying out some things. I found out that it was only capable of handling tiff images at this point and that it was best to avoid color in the images. To get the required images I installed ImageMagick to do the converting from jpg to grayscale uncompressed tiffs.</p>
<p>So far so good. This will result in a txt file containing the text in the file. Pretty neat. Now I can use grep to look for any string matches and then open the matching jpg. Easy as 1,2,3. <img src='http://famvdploeg.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After this I created the following script that will parse any new images automatically with the ocr software.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">basedir</span>=<span style="color: #ff0000;">&quot;/share/downloads/Scans&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Parses a scan if not already processed</span>
<span style="color: #666666; font-style: italic;"># $1 = JPG file</span>
parse_scan<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #007800;">jpg_file</span>=$<span style="color: #000000;">1</span>
        <span style="color: #007800;">base_name</span>=<span style="color: #800000;">${jpg_file:0:(${#jpg_file}</span>-<span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>
        <span style="color: #007800;">tif_file</span>=<span style="color: #007800;">$base_name</span>.TIF
        <span style="color: #007800;">txt_file</span>=<span style="color: #007800;">$base_name</span>.txt
&nbsp;
        <span style="color: #666666; font-style: italic;"># If tiff file does not exist, use imagemagick to convert</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-e</span> <span style="color: #007800;">$txt_file</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Converting: <span style="color: #007800;">$jpg_file</span> into <span style="color: #007800;">$tif_file</span>&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#               echo $base_name</span>
<span style="color: #666666; font-style: italic;">#               echo $tif_file</span>
<span style="color: #666666; font-style: italic;">#               echo $txt_file</span>
&nbsp;
                <span style="color: #666666; font-style: italic;"># Convert jpg into tiff file</span>
                convert <span style="color: #007800;">$jpg_file</span> <span style="color: #660033;">-format</span> tiff <span style="color: #660033;">-colorspace</span> gray <span style="color: #660033;">-depth</span> <span style="color: #000000;">8</span> <span style="color: #660033;">-compress</span> none <span style="color: #007800;">$tif_file</span> <span style="color: #000000; font-weight: bold;">&amp;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
&nbsp;
                <span style="color: #666666; font-style: italic;"># Use tesseract for ocr on tiff file</span>
                tesseract <span style="color: #007800;">$tif_file</span> <span style="color: #007800;">$base_name</span> <span style="color: #660033;">-l</span> nld <span style="color: #000000; font-weight: bold;">&amp;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
&nbsp;
                <span style="color: #666666; font-style: italic;"># Remove tiff file</span>
                <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #007800;">$tif_file</span> <span style="color: #000000; font-weight: bold;">&amp;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null
        <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$basedir</span><span style="color: #000000; font-weight: bold;">/*</span>; <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #007800;">filename</span>=<span style="color: #007800;">$file</span>
        <span style="color: #007800;">length</span>=<span style="color: #800000;">${#filename}</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$filename</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-q</span> <span style="color: #ff0000;">'.jpg$'</span>; <span style="color: #000000; font-weight: bold;">then</span>
                <span style="color: #666666; font-style: italic;"># Create TIF filename</span>
                parse_scan <span style="color: #007800;">$filename</span>
        <span style="color: #000000; font-weight: bold;">elif</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$filename</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-q</span> <span style="color: #ff0000;">'.JPG$'</span>; <span style="color: #000000; font-weight: bold;">then</span>
                <span style="color: #666666; font-style: italic;"># Create TIF filename</span>
                parse_scan <span style="color: #007800;">$filename</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>You can of course make the basedir an argument which can be passed into the shell script. But that is a personal choice. Now you can get rid of your pile of paper too. Let&#8217;s start recycling that pile of paper. <img src='http://famvdploeg.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2008/08/the-paperless-office/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
