<?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>Ralf Schäftlein&#039;s Blog</title>
	<atom:link href="http://ralf.schaeftlein.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://ralf.schaeftlein.de</link>
	<description>tech stuff, talk,...</description>
	<lastBuildDate>Sat, 18 Feb 2012 17:18:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Migrating HSQLDB to MySQL</title>
		<link>http://ralf.schaeftlein.de/2012/02/18/migrating-hsqldb-to-mysql/</link>
		<comments>http://ralf.schaeftlein.de/2012/02/18/migrating-hsqldb-to-mysql/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 17:18:20 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[hsqldb]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=329</guid>
		<description><![CDATA[HSQLDB migration to MySQL is not out of the box supported by mysql. The MySQL Workbench can only handle with dumps made by other mysql server. HSQLDB Transfer Tool is no longer bundled with the standard hsqldb jar file in the 1.8.x or later releases. After downloading and building with ant hsqldbutil you get in [...]]]></description>
			<content:encoded><![CDATA[<p><a title="HSQLDB" href="http://hsqldb.org/" target="_blank">HSQLDB </a>migration to MySQL is not out of the box supported by mysql. The MySQL Workbench can only handle with dumps made by other mysql server. HSQLDB Transfer Tool is no longer bundled with the standard hsqldb jar file in the 1.8.x or later releases. After downloading and building with</p>
<p>ant hsqldbutil</p>
<p>you get in lib an additional hsqldbutil jar. With the hsqldb.jar, the hsqldbutil.jar and and mysql connector jar in my classpath i tried the Database Manager (From Tools menu choose transfer) from hsql with no luck. The <a title="MySQL Migration Toolkit" href="http://dev.mysql.com/downloads/gui-tools/5.0.html" target="_blank">MySQL Migration Toolkit</a> has reached the EOL phase but works perfect for me. After downloading add the hsqldb jar to the lib folder C:\Program Files (x86)\MySQL\MySQL Tools for 5.0\java\lib. I update as well the mysql connector to the latest one.</p>
<ol>
<li>Start your hsqldb server from command line</li>
<ol>
<li>java -cp hsqldb-1.8.0.10.jar org.hsqldb.Server -database &lt;path to your hsqldb files&gt;\&lt;database name&gt;</li>
</ol>
<li>Start MySQL Migration Toolkit</li>
<li>Choose direct migration</li>
<li>Choose as Source a generic jdbc</li>
<li>Enter &#8220;org.hsqldb.jdbcDriver&#8221; as classname</li>
<li>Enter &#8220;jdbc:hsqldb:hsql://localhost&#8221; as connection string</li>
<li>Enter &#8220;sa&#8221; as username and leave password empty</li>
<li>click next</li>
<li>Configure your mysql connection</li>
<li>click next</li>
<li>choose public as schema</li>
<li>click next several time till screen &#8220;object creation options&#8221;</li>
<li>choose &#8220;create script file..&#8221; instead of &#8220;create objects online&#8221;</li>
<li>click next several time till screen &#8220;data mapping options&#8221;</li>
<li>choose &#8220;create script file..&#8221; instead of &#8220;transfer data online&#8221;</li>
<li>click next several time till screen &#8220;Summary&#8221;</li>
<li>click finish</li>
</ol>
<p>With the sql you can use tools like <a title="phpmyadmin" href="http://www.phpmyadmin.net/home_page/index.php" target="_blank">phpmyadmin </a>or the <a title="mysql workbench" href="http://www.mysql.de/products/workbench/" target="_blank">mysql workbench</a> to import your data into the mysql server.</p>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2012/02/18/migrating-hsqldb-to-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Start and stop windows services with powershell scripts</title>
		<link>http://ralf.schaeftlein.de/2012/02/17/start-and-stop-windows-services-with-powershell-scripts/</link>
		<comments>http://ralf.schaeftlein.de/2012/02/17/start-and-stop-windows-services-with-powershell-scripts/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 10:37:09 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=324</guid>
		<description><![CDATA[With Powershell you can easily start or stop specific windows services depending on current status. An example is starting the VMWare Services only if they are currently stopped. The command get-service list all windows service with their status, short &#8211; and display name. Create a new File startVMWare.ps1 and paste the following foreach ($svc in [...]]]></description>
			<content:encoded><![CDATA[<p>With Powershell you can easily start or stop specific windows services depending on current status. An example is starting the VMWare Services only if they are currently stopped. The command</p>
<pre>get-service</pre>
<p>list all windows service with their status, short &#8211; and display name. Create a new File startVMWare.ps1 and paste the following</p>
<pre>foreach ($svc in Get-Service){
  if(($svc.displayname.StartsWith("VMware")) -AND ($svc.Status -eq "Stopped")) {
    echo $svc.DisplayName
    Start-Service $svc.name
  }
}</pre>
<p>Sign the script as shown in my previous <a title="Howto run self signed powershell scripts" href="http://ralf.schaeftlein.de/2012/02/17/howto-run-self-signed-powershell-scripts/">post </a>to run self signed scripts. Run the script in an powershell with administrator rights.</p>
<pre>.\startVMWare.ps1</pre>
<p>The script starts only stopped VMWare services. To run this script directly you can write a small dos file startVMWare.cmd with the following content</p>
<pre>powershell -file &lt;FULL PATH TO YOUR SCRIPT&gt;\startVMWare.ps1</pre>
<p>Start the Dos file with right click and admin rights to execute the vmware start powershell script.</p>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2012/02/17/start-and-stop-windows-services-with-powershell-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto run self signed powershell scripts</title>
		<link>http://ralf.schaeftlein.de/2012/02/17/howto-run-self-signed-powershell-scripts/</link>
		<comments>http://ralf.schaeftlein.de/2012/02/17/howto-run-self-signed-powershell-scripts/#comments</comments>
		<pubDate>Fri, 17 Feb 2012 09:54:23 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=316</guid>
		<description><![CDATA[Windows command line scripts was for a long time the only way for scripting windows. With the Windows PowerShell you have can write scripts more like an program in object oriented way. Starting with Windows 7 it is preinstalled with version 2.0 but can as well installed under Windows XP or Vista. Windows 8 will [...]]]></description>
			<content:encoded><![CDATA[<p>Windows command line scripts was for a long time the only way for scripting windows. With the Windows PowerShell you have can write scripts more like an program in object oriented way. Starting with Windows 7 it is preinstalled with version 2.0 but can as well <a title="installed" href="http://www.microsoft.com/download/en/details.aspx?id=2560" target="_blank">installed</a> under Windows XP or Vista. Windows 8 will ship with version 3.0 which adds windows work flow foundation functionality. Windows 7 ships with an IDE for PowerShell called Windows PowerShell ISE&#8221;. Scripts stored in files with .ps1 suffix. A sample hello world looks like this:</p>
<pre>echo "hello world"</pre>
<p>Save the content in a file called hello.ps1. Start the powershell by searching for powershell in the windows 7 search box above the start button and with right click to run as administrator. Change the current folder with cdto the one where you saved your first powershell script. Run your script with</p>
<pre>.\hello.ps1</pre>
<p>Unfortunately you get a PSSecurityException because powershell script execution is controlled by an security policy. Like Java signed jars you must sign your scripts and set the policy to execute only signed scripts</p>
<pre>Set-ExecutionPolicy Restricted</pre>
<p>Powershell accepts self signed certificates and can be created by the makecert command. Makecert is part of the <a title="Windows SDK" href="http://www.microsoft.com/download/en/details.aspx?id=8279" target="_blank">windows SDK</a>. Download the installer and run through the wizard steps. At the last screen deselect all parts and check only the tools under first section called Windows Native Code Development. Open a command shell with shift and right click on the folder C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin. Enter the following commands to create a authority:</p>
<pre>makecert -n "CN=PowerShell Local Certificate Root" -a sha1 -eku 1.3.6.1.5.5.7.3.3 -r -sv root.pvk root.cer -ss Root -sr localMachine</pre>
<p>and the following command to create a self signed certificate</p>
<pre>makecert -pe -n "CN=PowerShell User" -ss MY -a sha1 -eku 1.3.6.1.5.5.7.3.3 -iv root.pvk -ic root.cer</pre>
<p>The following command in the powershell show your created certificate:</p>
<pre>Get-ChildItem cert:\CurrentUser\My -codesign</pre>
<p>Now we can sign our first script with the following command</p>
<pre>Set-AuthenticodeSignature .\hello.ps1 @(Get-ChildItem cert:\CurrentUser\My -codesigning)[0]</pre>
<p>Run now your signed script with</p>
<pre>.\hello.ps1</pre>
<p>with prints</p>
<pre>hello world</pre>
<p>Powershell scripts can use profile scripts to store common functions for own scripts, functions,.. Enter the following command to your standard profile file</p>
<pre>$profile</pre>
<p>Open the file or create it with a text editor and paste the following</p>
<pre>function sign ($filename) {
 $cert = @(gci cert:\currentuser\my -codesigning)[0]
 Set-AuthenticodeSignature $filename $cert
 }</pre>
<p>Sign the profile file</p>
<pre>Set-AuthenticodeSignature $profile @(Get-ChildItem cert:\CurrentUser\My -codesigning)[0]</pre>
<p>Write now your own little powershell script like test.ps1. The sign function can now be used like this</p>
<pre>sign .\test1.ps1</pre>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2012/02/17/howto-run-self-signed-powershell-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring solr, tomcat 7 with mod_jk and apache 2.2</title>
		<link>http://ralf.schaeftlein.de/2012/02/12/configuring-solr-tomcat-7-with-mod_jk-and-apache-2-2/</link>
		<comments>http://ralf.schaeftlein.de/2012/02/12/configuring-solr-tomcat-7-with-mod_jk-and-apache-2-2/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 12:07:57 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=310</guid>
		<description><![CDATA[As follow up post to setting up solr i show you how to integrate tomcat into Apache as main web server: The setup was made under ubuntu 11.10 with the following prerequisites: CATALINA_HOME is /usr/share/tomcat7 JAVA_HOME is /usr/lib/jvm/default-java HOSTNAME in my case is ubuntu-vm.localdomain &#160; apt-get install libapache2-mod-jk nano /etc/apache2/workers.properties with the following contents workers.tomcat_home=/usr/share/tomcat7 workers.java_home=/usr/lib/jvm/default-java ps=/ [...]]]></description>
			<content:encoded><![CDATA[<p>As follow up post to <a title="Installing Solr 3.5 under Tomcat 7" href="http://ralf.schaeftlein.de/2012/02/10/installing-solr-3-5-under-tomcat-7/">setting up solr</a> i show you how to integrate tomcat into Apache as main web server:</p>
<p>The setup was made under ubuntu 11.10 with the following prerequisites:</p>
<ul>
<li>CATALINA_HOME is /usr/share/tomcat7</li>
<li>JAVA_HOME is /usr/lib/jvm/default-java</li>
<li>HOSTNAME in my case is <a href="http://ubuntu-vm.localdomain/solr/admin/">ubuntu-vm.localdomain</a></li>
</ul>
<p>&nbsp;</p>
<ol>
<li><span style="color: #0000ff;">apt-get install libapache2-mod-jk</span></li>
<li><span style="color: #0000ff;">nano /etc/apache2/workers.properties</span> with the following contents</li>
</ol>
<div>
<pre name="code" class="xml">
workers.tomcat_home=/usr/share/tomcat7
workers.java_home=/usr/lib/jvm/default-java
ps=/
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
</pre>
</div>
<ol>
<li><span style="color: #0000ff;">nano /etc/apache2/mods-available/jk.conf</span> with the following contents</li>
</ol>
<div>
<pre name="code" class="xml">
<ifmodule mod_jk.c>
        # Where to find workers.properties
        JkWorkersFile /etc/apache2/workers.properties
        # Where to put jk shared memory
        JkShmFile     /var/log/apache2/mod_jk.shm
        # Where to put jk logs
        JkLogFile     /var/log/apache2/mod_jk.log
        # Set the jk log level [debug/error/info]
        JkLogLevel    info
        # Select the timestamp log format
        JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
        # solr redirect
        JkMount /solr* ajp13
</ifmodule>
</pre>
</div>
<ol>
<li><span style="color: #0000ff;">less /etc/apache2/mods-available/jk.load</span> to see the following contents</li>
<ol>
<li>LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so</li>
</ol>
<li>run <span style="color: #0000ff;">a2enmod jk</span> to see if mod_jk is enabled</li>
<ol>
<li>Module jk already enabled</li>
</ol>
<li><span style="color: #0000ff;">less /usr/share/tomcat7/conf/server.xml</span> to see a line like this</li>
<ol>
<li>&lt;Connector port=&#8221;8009&#8243; protocol=&#8221;AJP/1.3&#8243; redirectPort=&#8221;8443&#8243; /&gt;</li>
</ol>
<li><span style="color: #0000ff;">nano /etc/apache2/sites-available/default</span> and insert a line into the virtualHost:80 section</li>
<ol>
<li>JKMountCopy On</li>
</ol>
<li>restart apache2 with <span style="color: #0000ff;">service apach2 restart</span></li>
<li><span style="color: #0000ff;"><span style="color: #000000;">Open a browser on your client to open</span> <a href="http://ubuntu-vm.localdomain/solr/admin/">http://ubuntu-vm.localdomain/solr/admin/</a></span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2012/02/12/configuring-solr-tomcat-7-with-mod_jk-and-apache-2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Solr 3.5 under Tomcat 7</title>
		<link>http://ralf.schaeftlein.de/2012/02/10/installing-solr-3-5-under-tomcat-7/</link>
		<comments>http://ralf.schaeftlein.de/2012/02/10/installing-solr-3-5-under-tomcat-7/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 15:07:44 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=303</guid>
		<description><![CDATA[Solr is a open source Enterprise Search Engine. It can be deployed as war file in servlet containers like tomcat or jetty. This short howto show you run solr with the current Tomcat 7 version: Download Solr as Zip Unzip it e.g. in /usr/share/ with folder structure mv apache-solr-3.5.0.zip /usr/share cd /usr/share unzip apache-solr-3.5.0.zip result is a [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Solr" href="http://lucene.apache.org/solr/" target="_blank">Solr </a>is a open source Enterprise Search Engine. It can be deployed as war file in servlet containers like <a title="tomcat" href="http://tomcat.apache.org/" target="_blank">tomcat </a>or <a title="jetty" href="http://jetty.codehaus.org/jetty/" target="_blank">jetty</a>.</p>
<p>This short howto show you run solr with the current Tomcat 7 version:</p>
<ol>
<li>Download Solr as Zip</li>
<li>Unzip it e.g. in /usr/share/ with folder structure</li>
<ol>
<li>mv apache-solr-3.5.0.zip /usr/share</li>
<li>cd /usr/share</li>
<li>unzip apache-solr-3.5.0.zip</li>
<li>result is a folder /usr/share/apache-solr-3.5.0</li>
</ol>
<li>Create a new folder e.g /usr/share/solr as base folder for the configuration</li>
<ol>
<li>cp -a /usr/share/apache-solr-3.5.0/example/solr /usr/share/solr</li>
<li>cp /usr/share/apache-solr-3.5.0/dist/*.war /usr/share/solr</li>
<li>ln -s /usr/share/solr/apache-solr-3.5.0.war /usr/share/solr.war</li>
<li>mkdir /usr/share/solr/data< for index data/li>
<li>mkdir /usr/share/solr/lib for additional jars</li>
<li>cp /usr/share/apache-solr-3.5.0/dist/apache-solr-velocity-3.5.0.jar /usr/share/solr/lib</li>
<li>cp -a /usr/share/apache-solr-3.5.0/contrib/ /usr/share/solr/</li>
<li>nano /usr/share/solr/conf/solrconfig.xml and change the lib settings</li>
</ol>
<div>
<pre name="code" class="xml">
// ...
<lib dir="./lib" />

  <!-- A dir option by itself adds any files found in the directory to
       the classpath, this is useful for including all jars in a
       directory.
    -->
<lib dir="./contrib/extraction/lib" />
<lib dir="./contrib/clustering/lib/" />
<lib dir="./contrib/velocity/lib" />
</pre>
</div>
<ol>
<li>chown -R tomcat:tomcat /usr/share/solr if tomcat server runs as user tomcat</li>
</ol>
<li>Add URIEncoding to tomcat connector settings</li>
<ol>
<li>nano /usr/share/tomcat7/conf/server.xml</li>
<li>search for the connector on port 8080</li>
<li>add the URIEncoding like this:</li>
</ol>
<div>
<pre name="code" class="xml">
<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8"/>
</pre>
</div>
<li>Create a tomcat configuration file for solr (CATALINA_HOME is /usr/share/tomcat7)</li>
<ol>
<li>cd /usr/share/tomcat7/conf</li>
<li>mkdir Catalina (if not exists)</li>
<li>cd Catalina</li>
<li>mkdir localhost (if not exists)</li>
<li>cd localhost</li>
<li>nano solr.xml</li>
</ol>
<li>Paste the following configuration and save the file</li>
</ol>
<div>
<pre name="code" class="xml">
<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/usr/share/solr/solr.war" debug="0" crossContext="true">
  <Environment name="solr/home" type="java.lang.String" value="/usr/share/solr" override="true"/>
</Context>
</pre>
</div>
<div></div>
<ol>
<li>Set properties for tomcat and solr inside /usr/share/tomcat7/bin/setenv.sh</li>
<li>Paste the following configuration and save the file</li>
</ol>
<div>
<pre name="code" class="xml">
export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/usr/share/solr"
export JAVA_OPTS="$JAVA_OPTS -Dsolr.data.dir=/usr/share/solr/data"
export JAVA_OPTS="$JAVA_OPTS -Dsolr.velocity.enabled=true"
export JAVA_HOME="/usr/lib/jvm/default-java"
</pre>
</div>
<div></div>
<ol>
<li>(Re)start tomcat</li>
<ol>
<li>/etc/init.d/tomcat7 restart</li>
</ol>
<li>Open browser and go to <a href="http://ubuntu-vm.localdomain:8080/solr/admin/">http://YOUR_SERVER_HOSTNAME:8080/solr/admin/</a> assuming that tomcat runs under default port 8080</li>
</ol>
<p>I use the provided sample xml files to see if import and query functionality works:</p>
<ol>
<li>cd /usr/share/apache-solr-3.5.0/example/exampledocs</li>
<li>nano post.sh</li>
<li>change the URL parameter to your environment e.g. to URL=http://localhost:8080/solr/update</li>
<li>./post.sh *.xml</li>
<li>Open the admin ui under <a href="http://ubuntu-vm.localdomain:8080/solr/admin/">http://YOUR_SERVER_HOSTNAME:8080/solr/admin/</a></li>
<li>click the search button</li>
</ol>
<p>see my follow up post for <a href="http://ralf.schaeftlein.de/2012/02/12/configuring-solr-tomcat-7-with-mod_jk-and-apache-2-2/"> Configuring solr, tomcat 7 with mod_jk and apache 2.2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2012/02/10/installing-solr-3-5-under-tomcat-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Cargo for Maven War Deployments to Tomcat 6.x</title>
		<link>http://ralf.schaeftlein.de/2012/01/03/using-cargo-for-maven-war-deployments-to-tomcat-6-x/</link>
		<comments>http://ralf.schaeftlein.de/2012/01/03/using-cargo-for-maven-war-deployments-to-tomcat-6-x/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 18:20:51 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jee]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=286</guid>
		<description><![CDATA[JEE based projects with maven build artifacts like war or ear files is the cargo plugin the right choice for automatic deployments during the build process. First step is to define in the build section of your pom.xml the cargo plugin: org.codehaus.cargo cargo-maven2-plugin 1.1.4 tomcat6x remote runtime ${cargo.manager.url} ${cargo.username} ${cargo.password} remote ${project.groupId} ${project.artifactId} war ${project.artifactId} Notice [...]]]></description>
			<content:encoded><![CDATA[<p>JEE based projects with maven build artifacts like war or ear files is the <a title="cargo" href="http://cargo.codehaus.org/Maven2+plugin" target="_blank">cargo</a> plugin the right choice for automatic deployments during the build process.</p>
<p>First step is to define in the build section of your pom.xml the cargo plugin:</p>
<pre name="code" class="xml">
<plugin>
	<groupId>org.codehaus.cargo</groupId>
	<artifactId>cargo-maven2-plugin</artifactId>
	<version>1.1.4</version>
	<configuration>
		<container>
			<containerId>tomcat6x</containerId>
			<type>remote</type>
		</container>
		<configuration>
			<type>runtime</type>
<properties>
				<!-- see tomcat6x profile -->
				<cargo.tomcat.manager.url>${cargo.manager.url}</cargo.tomcat.manager.url>
				<cargo.remote.username>${cargo.username}</cargo.remote.username>
				<cargo.remote.password>${cargo.password}</cargo.remote.password>
			</properties>
		</configuration>
		<deployer>
			<type>remote</type>
			<deployables>
				<deployable>
					<groupId>${project.groupId}</groupId>
					<artifactId>${project.artifactId}</artifactId>
					<type>war</type>
<properties>
						<context>${project.artifactId}</context>
					</properties>
				</deployable>
			</deployables>
		</deployer>
	</configuration>
</plugin>
</pre>
<p>Notice the variables with the url and the credentials. The will filled with the used profile section for the build:</p>
<pre name="code" class="xml">
<profiles>
<profile>
		<id>tomcat6x_remote</id>
		<activation>
			<activeByDefault>true</activeByDefault>
		</activation>
<properties>
			<cargo.manager.url>http://ubuntu-vm.localdomain:8080/manager</cargo.manager.url>
			<cargo.username>tomcat</cargo.username>
			<cargo.password>tomcat</cargo.password>
		</properties>
	</profile>
<profile>
		<id>tomcat6x_ide</id>
<properties>
			<cargo.manager.url>http://localhost:9999/manager</cargo.manager.url>
			<cargo.username>tomcat</cargo.username>
			<cargo.password>tomcat</cargo.password>
		</properties>
	</profile>
</profiles>
</pre>
<p>The activeByDefault settings marks the remote section as default profile if nothing is set by command line parameters. </p>
<p>With</p>
<p>mvn org.codehaus.cargo:cargo-maven2-plugin:redeploy</p>
<p>you first undeploy the current application and then deploy the new build application to the remote tomcat instance. The command line parameter-Ptomcat6x_ide force maven to use the local tomcat instance for deployments.</p>
<p>mvn -Ptomcat6x_ide org.codehaus.cargo:cargo-maven2-plugin:redeploy</p>
<p>Hudson or Jenkins as continuous integration server can then be setup to use a primary project with the goal &#8220;clean deploy&#8221; to have a full test and maven repo deployment on success. The seconday project have the goal &#8220;clean package org.codehaus.cargo:cargo-maven2-plugin:redeploy -Dmaven.test.skip=true&#8221;. Inside the configuration of the primary job is the section with post build actions. Define here the secondary project to be build only on success of the primary build. Deployments can go wrong and should not have any effect on the primary build. Build trigger for the primary project is source code changes checked every minute (&#8220;* * * * *&#8221; as time plan). Changes by each developer force a complete junit and integration test of the module and new deployed artifacts inside  the maven repo like nexus for the rest of the team. A little bit later is then the new application ready to use. With different profiles is it possible to define DEV,QA and PROD target server inside one maven project pom.</p>
<p>Tomcat needs credentials of a user with explicit rights granted for successful remote deployments. See the following excerpt of the tomcat-user.xml inside the conf folder of your tomcat instance:</p>
<pre name="code" class="xml">
  <role rolename="tomcat"></role>
  <role rolename="manager-gui"></role>
  <role rolename="manager-script"></role>
  <role rolename="manager-status"></role>
  <role rolename="manager-jmx"></role>
  <user username="tomcat" password="tomcat" roles="tomcat,manager-gui,manager-script,manager-jmx,manager-status"></user>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2012/01/03/using-cargo-for-maven-war-deployments-to-tomcat-6-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centos 6.2 with Firefox 9 and Google Chrome 16</title>
		<link>http://ralf.schaeftlein.de/2011/12/21/centos-6-2-with-firefox-9-and-google-chrome-16/</link>
		<comments>http://ralf.schaeftlein.de/2011/12/21/centos-6-2-with-firefox-9-and-google-chrome-16/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 15:38:55 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[google chrome]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=280</guid>
		<description><![CDATA[Centos recently published v6.2.  &#160; Out of the box is Firefox 3.x and no Google Chrome installed. Steps to install Google Chrome 16 (as root) Steps to install Firefox 9 (as before as root). To install the Virtual box Guest Additions: yum update yum install gcc yum install kernel-devel Mount Guest Additions iso image Run [...]]]></description>
			<content:encoded><![CDATA[<p>Centos recently published v<a title="6.2" href="http://lists.centos.org/pipermail/centos-announce/2011-December/018335.html" target="_blank">6.2</a>. <img class="alignnone" style="border-style: initial; border-color: initial;" title="Centos 6.2" src="https://www.centos.org/themes/centos/images/centos_icon_60.png" alt="" width="63" height="60" /></p>
<p>&nbsp;</p>
<p>Out of the box is Firefox 3.x and no Google Chrome installed.</p>
<p><a title="Steps" href="http://www.if-not-true-then-false.com/2010/install-google-chrome-with-yum-on-fedora-red-hat-rhel/" target="_blank">Steps </a>to install Google Chrome 16 (as root)</p>
<p><a title="Steps" href="http://www.if-not-true-then-false.com/2011/install-firefox-on-fedora-centos-red-hat-rhel/" target="_blank">Steps </a>to install Firefox 9 (as before as root).</p>
<p>To install the Virtual box Guest Additions:</p>
<ol>
<li>yum update</li>
<li>yum install gcc</li>
<li>yum install kernel-devel</li>
<li>Mount Guest Additions iso image</li>
<li>Run autostart on the cd</li>
<li>Enter root password</li>
<li>After install reboot vm</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2011/12/21/centos-6-2-with-firefox-9-and-google-chrome-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Samsung Galaxy S2 with vodafone firmware 2.3.5 and no gps&#8230;</title>
		<link>http://ralf.schaeftlein.de/2011/11/28/samsung-galaxy-s2-with-vodafone-firmware-2-3-5-and-no-gps/</link>
		<comments>http://ralf.schaeftlein.de/2011/11/28/samsung-galaxy-s2-with-vodafone-firmware-2-3-5-and-no-gps/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 18:54:19 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[samsung]]></category>
		<category><![CDATA[sgs2]]></category>
		<category><![CDATA[vodafone]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=267</guid>
		<description><![CDATA[I had recently updated my Samsung Galaxy S2 via Kies to Android 2.3.6 with vodafone branding. So far seems to be all working but GPS based Apps fails because of missing satellite fix. Looking around at twitter i found one tweet and with this several forums: Vodafone UK Android Hilfe (german) Vodafone Germany (german): 1 / 2 The [...]]]></description>
			<content:encoded><![CDATA[<p>I had recently updated my Samsung Galaxy S2 via Kies to Android 2.3.6 with vodafone branding. So far seems to be all working but GPS based Apps fails because of missing satellite fix. Looking around at twitter i found one <a title="tweet" href="https://twitter.com/#!/following_tech">tweet</a> and with this several forums:</p>
<p><a title="Vodafone UK" href="http://forum.vodafone.co.uk/t5/Samsung-Galaxy-S2/SGS2-GT-I9100-GPS-issues-taking-ages-to-get-a-lock/td-p/925317" target="_blank">Vodafone UK</a></p>
<p><a title="Android Hilfe" href="http://www.android-hilfe.de/samsung-galaxy-s2-i9100-forum/167705-kein-gps-empfang-vodafone-19.html" target="_blank">Android Hilfe</a> (german)</p>
<p>Vodafone Germany (german): <a title="1" href="https://www.vodafone.de/forum/posts/list/90/8772.page" target="_blank">1</a> / <a title="2" href="https://www.vodafone.de/forum/posts/list/270/7594.page" target="_blank">2</a></p>
<p>The short term solution is to install the &#8220;<a title="GPS Test" href="https://market.android.com/details?id=com.chartcross.gpstest" target="_blank">GPS Test</a>&#8221; app from the market and do the following steps:</p>
<ol>
<li>Hold the power button  (optional)</li>
<li>Disable data transfer (optional)</li>
<li>Enable GPS</li>
<li>Start GPS Test</li>
<li>Go to settings</li>
<li>Push &#8220;Clear AGPS&#8221; button</li>
<li>Push &#8220;Update AGPS&#8221; button</li>
<li>Press home button</li>
<li>Start GPS based app like Google Maps&#8230;</li>
</ol>
<div>Vodafone UK had a seperate <a title="topic" href="http://forum.vodafone.co.uk/t5/Samsung-Galaxy-S2/Samsung-Galaxy-S2-and-GPS/td-p/936463" target="_blank">topic </a>to notify customers with updates to the problem.</div>
<div>Other solution for vodafone customers is to root their phone, make an debranding and update to latest official firmware without any guarantee. SGS2 without branding seems to be not affected by that bug.</div>
<div>Update 03.12.2011:</div>
<div>Vodafone <a title="fixed" href="http://forum.vodafone.co.uk/t5/Samsung-Galaxy-S2/Samsung-Galaxy-S2-and-GPS/m-p/940325#M6573" target="_blank">fixed </a>the bug on server/provider side. Seems to be now working.</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2011/11/28/samsung-galaxy-s2-with-vodafone-firmware-2-3-5-and-no-gps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control Hudson or Jenkins from Eclipse Indigo 3.7</title>
		<link>http://ralf.schaeftlein.de/2011/07/15/control-hudson-or-jenkins-from-eclipse-indigo-3-7/</link>
		<comments>http://ralf.schaeftlein.de/2011/07/15/control-hudson-or-jenkins-from-eclipse-indigo-3-7/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 12:34:54 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ci]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[jenkins]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=253</guid>
		<description><![CDATA[For the latest eclipse release 3.7 called indigo is a plugin available to watch and control your build server based on hudson or jenkins. It is part of mylyn 3.5 as a view called &#8220;Builds&#8221;. See here for more information about the new features of mylyn 3.5. Their is as well a commercial plugin suite called [...]]]></description>
			<content:encoded><![CDATA[<p>For the latest eclipse release 3.7 called <a title="indigo" href="http://eclipse.org/indigo/">indigo </a>is a plugin available to watch and control your build server based on <a title="hudson" href="http://hudson-ci.org/">hudson </a>or <a title="jenkins" href="http://jenkins-ci.org/">jenkins</a>. It is part of <a title="mylyn" href="http://www.eclipse.org/mylyn/">mylyn </a>3.5 as a view called &#8220;Builds&#8221;. See <a title="here" href="http://www.eclipse.org/mylyn/new/">here </a>for more information about the new features of mylyn 3.5. Their is as well a commercial plugin suite called <a title="tasktop" href="http://tasktop.com/blog/mylyn/mylyn-hudson-connector-update">tasktop </a>available.</p>
<p>Howto install:</p>
<ol>
<li>Go to help -&gt; install new software</li>
<li>Click on &#8220;Available software sites&#8221;</li>
<li>Click on add with name &#8220;mylyn&#8221; and url &#8220;http://download.eclipse.org/mylyn/releases/latest&#8221;</li>
<li>Click ok to go back to site list</li>
<li>Click ok to go back to available software</li>
<li>Choose under &#8220;Work with&#8221; mylyn</li>
<li>Choose under &#8220;Mylyn integrations&#8221; the point &#8220;Mylyn Builds Connector: Hudson/Jenkins (Incubation)&#8221;</li>
<li>Choose under &#8220;Mylyn SDKs and Frameworks&#8221; the point  &#8221;Mylyn Builds (Incubation)&#8221;</li>
<li>Click on next</li>
<li>Go through install process and restart eclipse</li>
<li>Choose from menu &#8220;Window&#8221; -&gt; &#8220;show view&#8221;</li>
<li>Choose &#8220;Mylyn&#8221; -&gt; &#8220;Builds&#8221;</li>
</ol>
<div><a href="http://ralf.schaeftlein.de/wp-content/uploads/2011/07/Java-Eclipse-SDK_2011-07-15_14-24-17.png"><img class="aligncenter size-full wp-image-256" title="Java - Eclipse SDK_2011-07-15_14-24-17" src="http://ralf.schaeftlein.de/wp-content/uploads/2011/07/Java-Eclipse-SDK_2011-07-15_14-24-17.png" alt="" width="572" height="166" /></a></div>
<div>With the blue server icon on the left side of the title bar you can add a new build server. Choose &#8220;Hudson&#8221; inside the wizard and click next. Enter the url of your jenkins server and enter a label. Click on refresh at the right side under build plans. Choose your favorite builds and click on finish. After that you should have a view similar to the one above. You can start a new build and get updates as notification during the build process.</div>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2011/07/15/control-hudson-or-jenkins-from-eclipse-indigo-3-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Canon LBP6650 under Ubuntu 11.04</title>
		<link>http://ralf.schaeftlein.de/2011/06/18/canon-lbp6650-under-ubuntu-11-04/</link>
		<comments>http://ralf.schaeftlein.de/2011/06/18/canon-lbp6650-under-ubuntu-11-04/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 17:22:57 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[canon]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ufr]]></category>

		<guid isPermaLink="false">http://ralf.schaeftlein.de/?p=249</guid>
		<description><![CDATA[Canon provide Debian Packages to install the driver under ubuntu for download. Offical supported is only the previous version 10.04 of ubuntu. Extracting the zip file you will find under &#60;language&#62;/32-bit_Driver/Debian the deb packages. First thing to install is cndrvcups-common_2.20-l_i386.deb with dpkg -i &#60;deb file&#62;. The problem is that ubuntu 11.04 doesn&#8217;t contain the required [...]]]></description>
			<content:encoded><![CDATA[<p>Canon provide Debian Packages to install the driver under ubuntu for <a href="http://www.canon.de/Support/Consumer_Products/products/printers/Laser/i-SENSYS_LBP6650dn.aspx?DLtcmuri=tcm:83-823020&amp;page=1&amp;type=download">download</a>. Offical supported is only the previous version 10.04 of ubuntu. Extracting the zip file you will find under</p>
<p>&lt;language&gt;/32-bit_Driver/Debian</p>
<p>the deb packages. First thing to install is cndrvcups-common_2.20-l_i386.deb with dpkg -i &lt;deb file&gt;. The problem is that ubuntu 11.04 doesn&#8217;t contain the required gs-esp package.</p>
<p>Workaround is to <a href="https://launchpad.net/ubuntu/natty/i386/gs-esp/9.01~dfsg~svn12047-0ubuntu1">download </a>and install it with</p>
<p>dpgk -i <a href="http://launchpadlibrarian.net/62641639/gs-esp_9.01~dfsg~svn12047-0ubuntu1_all.deb">gs-esp_9.01~dfsg~svn12047-0ubuntu1_all.deb</a></p>
<p>After that you can install the common canon driver and afterwards the ufr driver:</p>
<p>dpgk -i cndrvcups-common_2.20-1_i386.deb  dpgk -i cndrvcups-ufr2-uk_2.20-1_i386.deb</p>
<p>Now you can open the driver setup application and click on the add button. Choose network printer, enter the ip of your canon printer and click on examine.  Select from the list below Canon and click on next. Select &#8220;LBP6650&#8243; and click on next. Confirm dialog with use button. Test your configuration with printing a test page.</p>
]]></content:encoded>
			<wfw:commentRss>http://ralf.schaeftlein.de/2011/06/18/canon-lbp6650-under-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

