<?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>mackaz.de</title>
	<atom:link href="http://mackaz.de/feed" rel="self" type="application/rss+xml" />
	<link>http://mackaz.de</link>
	<description>while(!sleep) writeCode</description>
	<lastBuildDate>Sun, 22 Jan 2012 10:36:19 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flex: Show HTML text inside an Alert</title>
		<link>http://mackaz.de/681</link>
		<comments>http://mackaz.de/681#comments</comments>
		<pubDate>Sat, 15 Jan 2011 18:06:30 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=681</guid>
		<description><![CDATA[As i just wanted to insert some bold text into an Alert box, I wondered why the Flex Alert doesn&#8217;t support HTML Text. So i wrote a Custom Alert class which just overwrites the regular Alert.show(). Through a trick, it allows to use HTML tags inside the text.
package tools
{
	import flash.display.Sprite;

	import mx.controls.Alert;
	import mx.core.IFlexModuleFactory;
	import mx.core.mx_internal;

	/**
	 * Alert-Box [...]]]></description>
			<content:encoded><![CDATA[<p>As i just wanted to insert some bold text into an Alert box, I wondered why the Flex Alert doesn&#8217;t support HTML Text. So i wrote a Custom Alert class which just overwrites the regular <code>Alert.show()</code>. Through a trick, it allows to use HTML tags inside the text.</p>
<pre class="brush:[java]">package tools
{
	import flash.display.Sprite;

	import mx.controls.Alert;
	import mx.core.IFlexModuleFactory;
	import mx.core.mx_internal;

	/**
	 * Alert-Box which makes using HTML text possible
	 */
	public class HTMLAlert extends Alert
	{
		/**
		 * Given text is interpreted as HTML text,
		 * Example: "<b>bold text</b>" is rendered as bold text.
		 */
		public static function show(text:String = "", title:String = "",
						flags:uint = 0x4,
						parent:Sprite = null,
						closeHandler:Function = null,
						iconClass:Class = null,
						defaultButtonFlag:uint = 0x4,
						moduleFactory:IFlexModuleFactory = null):Alert
		{
			var alert:Alert = Alert.show(text, title, flags, parent,
				closeHandler, iconClass, defaultButtonFlag, moduleFactory);
			alert.mx_internal::alertForm.mx_internal::textField.htmlText = text;
			return alert;
		}
	}
}
</pre>
<p>Just use it by calling it like the regular Alert-class:</p>
<pre class="brush:[java]">HTMLAlert.show("A <b>bold</b> Alert text", "HTMLAlert", Alert.OK);</pre>
<p>Which then looks like this:<br />
<a href="http://mackaz.de/wp-content/uploads/htmlalert.png"><img class="alignnone size-full wp-image-694" title="htmlalert" src="http://mackaz.de/wp-content/uploads/htmlalert.png" alt="" width="220" height="145" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/681/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Python script: Wait for a site to come up and notify me</title>
		<link>http://mackaz.de/654</link>
		<comments>http://mackaz.de/654#comments</comments>
		<pubDate>Mon, 10 Jan 2011 14:09:37 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=654</guid>
		<description><![CDATA[For the last weeks, i&#8217;ve been working a lot with different servers, which take longer and longer to deploy new application bundles. Mostly i know that the deployment is complete when the website or the webservices of that application are up and return a successful status code (not 404).
Another use case is when trying to [...]]]></description>
			<content:encoded><![CDATA[<p>For the last weeks, i&#8217;ve been working a lot with different servers, which take longer and longer to deploy new application bundles. Mostly i know that the deployment is complete when the website or the webservices of that application are up and return a successful status code (not 404).<br />
Another use case is when trying to access a remote website which is temporarily down, but you want to be notified immediately when it comes up again.</p>
<p>Since i don&#8217;t want to sit in front of my browser hitting F5 again and again (especially if it takes some minutes), i found it nice to watch the HTTP Server with a little script, which can run in background and send a little OS notification when the Site or Webservice is up again.</p>
<p>I&#8217;ll share it and hope anyone also has a use for this. For the notifications, you need the OS-independent notification library <code>pynotify</code>. If you are running Debian/Ubuntu, get it with <code>apt-get install python-notify</code></p>
<pre class="brush:[python]">#!/usr/bin/python
# Partly "borrowed" from:
# http://code.activestate.com/recipes/267197-urllib2-for-actions-depending-on-http-response-cod/
import urllib2
import pynotify
import time
import sys
from urllib2 import Request, urlopen, URLError, HTTPError

url = sys.argv[1]

print "Waiting for Site " + url + " to come up"

while True:
  try:
    urllib2.urlopen(url)
  except urllib2.HTTPError, e:
    if e.code == 401:
      print 'not authorized'
    elif e.code == 404:
      print 'not found'
    elif e.code == 503:
      print 'service unavailable'
    else:
      print 'unknown error: '
    time.sleep(3)
  else:
    print 'success'
    if pynotify.init("HTTP Monitor"):
      title_string = "HTTP Monitor"
      author_string = "Site " + url + " is available"
      n = pynotify.Notification(title_string, author_string, "emblem-shared")
      n.set_timeout(0)
      n.show()
      print author_string
      break</pre>
<p>How the script is called:</p>
<pre style="color: white; background-color: black;">python ~/tools/watchsite.py http://192.168.178.152:8080/UserService/UserServiceWSService?wsdl</pre>
<p>Which looks like this:</p>
<pre style="color: white; background-color: black;">Waiting for Site http://192.168.178.152:8080/UserService/UserServiceWSService?wsdl to come up....</pre>
<p>And gives this nice notification (on Gnome) when the Server/Site/Service is up:<br />
<a href="http://mackaz.de/wp-content/uploads/notification.gif"><img class="alignnone size-medium wp-image-661" title="notification" src="http://mackaz.de/wp-content/uploads/notification-300x113.gif" alt="" width="300" height="113" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/654/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash script: Recursively convert line breaks in all files from Dos/Windows to Unix AND Replace Tabs with Spaces.</title>
		<link>http://mackaz.de/605</link>
		<comments>http://mackaz.de/605#comments</comments>
		<pubDate>Sat, 07 Aug 2010 00:50:47 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[dailyhelpers]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=605</guid>
		<description><![CDATA[It&#8217;s really annoying that on Windows, nearly every program that deals with text saves the text in Windows-format. That&#8217;s not good when you work in a multi-OS-environment.
Another annoying thing are TABS, which often are much wider in Linux editors than in Windows, and are generally superflous as i think. Especially when programming Scala, where the [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s really annoying that on Windows, nearly every program that deals with text saves the text in Windows-format. That&#8217;s not good when you work in a multi-OS-environment.<br />
Another annoying thing are TABS, which often are much wider in Linux editors than in Windows, and are generally superflous as i think. Especially when programming Scala, where the style guide suggests using spaces instead of tabs.</p>
<p>So today i ended my misery with converting text-files and tabs by hand and finally wrote a Bash script. It works both on Linux and on Cygwin.</p>
<p>It solves both problems at once: It converts Windows CR/LF line breaks (only when there is one!), AND replaces those superflous tabs with spaces. And all that with one single line.</p>
<p><span id="more-605"></span></p>
<pre class="brush:[bash]">find . -type f -regextype posix-awk -regex "(.*.java|.*.scala)" -exec sed -i -e 's/^M$//' -e 's/\t/  /g' {} ';'</pre>
<p>What does it?</p>
<p><strong>find .</strong><br />
recursively finding files in the current directory</p>
<p><strong>-type f</strong><br />
only use files (d for directory)</p>
<p><strong>-regextype posix-awk -regex &#8220;(.*.java|.*.scala)&#8221;</strong><br />
Find all files with extension Java OR Scala (you can add more)</p>
<p><strong>-exec sed -i -e &#8217;s/^M$//&#8217;</strong><br />
Remove CR/LF line break. -i means that the changes are written to the source immediately, -e is to concatenate multiple replacements</p>
<p><strong>-e &#8217;s/\t/  /g&#8217; </strong><br />
replace all Tabs with 2 spaces</p>
<p><strong>{} &#8216;;&#8217;</strong><br />
use files found by find as parameters for sed, end</p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/605/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Weld project running in Glassfish Tools Bundle for Eclipse 1.2</title>
		<link>http://mackaz.de/589</link>
		<comments>http://mackaz.de/589#comments</comments>
		<pubDate>Sat, 12 Jun 2010 17:47:51 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[weld]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=589</guid>
		<description><![CDATA[Today i took a look into the GlassFish Tools Bundle for Eclipse to see if it could speed up my Java EE6-development. I was especially  curious about the hot-deployment capabilities.
After downloading the Glassfish Tools from the download site and importing a simple Weld-JEE-project (i was using the Maven archetype &#8220;weld-jsf-jee-archetype&#8221;), an error showed up, [...]]]></description>
			<content:encoded><![CDATA[<p>Today i took a look into the GlassFish Tools Bundle for Eclipse to see if it could speed up my Java EE6-development. I was especially  curious about the hot-deployment capabilities.</p>
<p>After downloading the Glassfish Tools from the download site and importing a simple Weld-JEE-project (i was using the Maven archetype &#8220;weld-jsf-jee-archetype&#8221;), an error showed up, pointing to the beans.xml of my project and saying</p>
<blockquote style="color: red;"><p>Referenced file contains errors (jar:file:/D:/Program Files (x86)/GlassFish-Tools-Bundle-For-Eclipse-1.2/dropins/feature-1.0.50/eclipse/plugins/com.sun.enterprise.jst.server.sunappsrv_1.0.50.jar!/ee6_schemas/beans_1_0.xsd).</p></blockquote>
<p>So i opened the file <strong>com.sun.enterprise.jst.server.sunappsrv_1.0.50.jar</strong> in the mentioned directory with an archiver, where i found the beans_1_0.xsd in the folder <strong>ee6_schemas</strong>, which i opened with a text editor.</p>
<p>The targetNamespace of the schema file was pointing to the Seamframework, which sounded strange to me. So i googled to find another beans_1_0.xsd schema file and found one in the <a href="https://anonsvn.jboss.org/repos/weld/api/trunk/cdi/src/main/resources/beans_1_0.xsd" onclick="urchinTracker('/outgoing/anonsvn.jboss.org/repos/weld/api/trunk/cdi/src/main/resources/beans_1_0.xsd?referer=');">Weld  trunk</a>, with the targetNamespace=&#8221;http://java.sun.com/xml/ns/javaee&#8221; &#8211; which sounded much better to me.</p>
<p>So i replaced the schema file in the archive with the one from the Weld repo (you have to shutdown the GlassFish Tools Bundle first) and restarted the bundle, made a clean of my project  &#8211; and voilà, the error vanished!</p>
<p>[EDIT]<br />
I switched back to Eclipse and downloaded the Glassfish adapter seperately. Seems to work faster and more stable to me.</p>
<p>Also, there are some really annoying issues when deploying a Maven JEE6-app on Glassfish within Eclipse (both in bundled and non-bundle version with GF3 adapter). When &#8220;enable dependency management&#8221; in M2Eclipse is enabled, i can&#8217;t deploy the project. When it&#8217;s disabled, deploying works &#8211; but programming is hard because of the missing dependencies (although it works somehow).<br />
Will write an article about that issue soon&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/589/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Weld Logging on Glassfish with Maven</title>
		<link>http://mackaz.de/577</link>
		<comments>http://mackaz.de/577#comments</comments>
		<pubDate>Fri, 28 May 2010 19:43:39 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[weld]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=577</guid>
		<description><![CDATA[Just figured out how to use a Weld-injected Logger on Glassfish.
Unfortunately, i couldn&#8217;t get Log4J12 as SL4J Implementation running, like the author of this post did (i hope i&#8217;ll find out later), but with the sl4j-jdk14 binding, the logging just works.
Steps:

Add the following dependencies to the pom.xml:

&#60;!-- SL4J API --&#62;
 &#60;dependency&#62;
 &#60;groupId&#62;org.slf4j&#60;/groupId&#62;
 &#60;artifactId&#62;slf4j-api&#60;/artifactId&#62;
 &#60;version&#62;1.6.0&#60;/version&#62;
 &#60;/dependency&#62;

 [...]]]></description>
			<content:encoded><![CDATA[<p>Just figured out how to use a Weld-injected Logger on Glassfish.<br />
Unfortunately, i couldn&#8217;t get Log4J12 as SL4J Implementation running, like the author of <a href="http://weblogs.java.net/blog/schaefa/archive/2007/08/to_the_hell_wit_1.html" onclick="urchinTracker('/outgoing/weblogs.java.net/blog/schaefa/archive/2007/08/to_the_hell_wit_1.html?referer=');">this post</a> did (i hope i&#8217;ll find out later), but with the sl4j-jdk14 binding, the logging just works.</p>
<p>Steps:</p>
<ol>
<li>Add the following dependencies to the pom.xml:</li>
</ol>
<pre style="background-color: #dfdfdf;">&lt;!-- SL4J API --&gt;
 &lt;dependency&gt;
 &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
 &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
 &lt;version&gt;1.6.0&lt;/version&gt;
 &lt;/dependency&gt;

 &lt;!-- SLF4J JDK14 Binding  --&gt;
 &lt;dependency&gt;
 &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
 &lt;artifactId&gt;slf4j-jdk14&lt;/artifactId&gt;
 &lt;version&gt;1.6.0&lt;/version&gt;
 &lt;/dependency&gt;

 &lt;!-- Injectable Weld-Logger --&gt;
 &lt;dependency&gt;
 &lt;groupId&gt;org.jboss.weld&lt;/groupId&gt;
 &lt;artifactId&gt;weld-logger&lt;/artifactId&gt;
 &lt;version&gt;1.0.0-CR2&lt;/version&gt;
 &lt;/dependency&gt;</pre>
<p>2. Inject the Logger and use it as usual:</p>
<pre class="brush:[java]">
import javax.inject.Inject;
import org.slf4j.Logger;

public class Example {
  @Inject
  private Logger logger;

  public void exampleFunc() {
    logger.info("Hello Logger!");
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/577/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Use Ant-Contrib Tasks in Maven</title>
		<link>http://mackaz.de/493</link>
		<comments>http://mackaz.de/493#comments</comments>
		<pubDate>Tue, 11 May 2010 11:36:23 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=493</guid>
		<description><![CDATA[I just messed around a while to get a simple Ant-contrib task running inside a Maven build &#8211; a simple &#60;if&#62;.
The examples on the net weren&#8217;t very helpful or too bloated, so i&#8217;ll post a very simple one.
The problem with Ant-contrib is that this library doesn&#8217;t come with the regular Ant-distribution. So it has to [...]]]></description>
			<content:encoded><![CDATA[<p>I just messed around a while to get a simple Ant-contrib task running inside a Maven build &#8211; a simple &lt;if&gt;.<br />
The examples on the net weren&#8217;t very helpful or too bloated, so i&#8217;ll post a very simple one.</p>
<p>The problem with Ant-contrib is that this library doesn&#8217;t come with the regular Ant-distribution. So it has to be downloaded separately.<br />
But inside the Maven-antrun-plugin, Ant can&#8217;t access the ant-contrib.jar without explicitely referencing it with a hard-coded path (for example <em>classpath=&#8221;C:/Dev/Ant/ant-contrib-1.0b3.jar&#8221;</em>) &#8211; although it&#8217;s in the system classpath.</p>
<p>As it&#8217;s not the best practice to refer to local filesystem dependencies and rather downloading and using them within the Maven lifecycle, i&#8217;m referencing the ant-contrib.jar that Maven downloads when resolving the dependencies.</p>
<p>In my example i&#8217;m checking if the environment variable GLASSFISH has been set, failing the complete build if it&#8217;s not.<br />
So my pom.xml looks like this:<span id="more-493"></span></p>
<pre class="brush:[xml]">&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
 &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
 &lt;groupId&gt;mackaz&lt;/groupId&gt;
 &lt;artifactId&gt;antcontrib&lt;/artifactId&gt;
 &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;

 &lt;dependencies&gt;
  &lt;!-- Ant-Contrib for Special Ant Tasks (IF) --&gt;
  &lt;dependency&gt;
   &lt;groupId&gt;ant-contrib&lt;/groupId&gt;
   &lt;artifactId&gt;ant-contrib&lt;/artifactId&gt;
   &lt;version&gt;1.0b3&lt;/version&gt;
   &lt;exclusions&gt;
    &lt;exclusion&gt;
     &lt;groupId&gt;ant&lt;/groupId&gt;
     &lt;artifactId&gt;ant&lt;/artifactId&gt;
    &lt;/exclusion&gt;
   &lt;/exclusions&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
   &lt;groupId&gt;ant&lt;/groupId&gt;
   &lt;artifactId&gt;ant-nodeps&lt;/artifactId&gt;
   &lt;version&gt;1.6.5&lt;/version&gt;
  &lt;/dependency&gt;
 &lt;/dependencies&gt;

 &lt;build&gt;
  &lt;plugins&gt;
  &lt;!-- Ant Task with Contrib --&gt;
   &lt;plugin&gt;
    &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
    &lt;executions&gt;
     &lt;execution&gt;
     &lt;phase&gt;validate&lt;/phase&gt;
     &lt;configuration&gt;
     &lt;tasks&gt;
       &lt;!-- point to the dependency in the local Maven repository --&gt;
       &lt;taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${settings.localRepository}/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar" /&gt;
        &lt;if&gt;
         &lt;not&gt;&lt;isset property="env.GLASSFISH" /&gt;&lt;/not&gt;
         &lt;then&gt;
          &lt;fail&gt;Glassfish Environment Property not set!&lt;/fail&gt;
         &lt;/then&gt;
         &lt;else&gt;
          &lt;echo&gt;Glassfish Environment Property is correct.&lt;/echo&gt;
         &lt;/else&gt;
        &lt;/if&gt;
       &lt;/tasks&gt;
      &lt;/configuration&gt;
      &lt;goals&gt;
       &lt;goal&gt;run&lt;/goal&gt;
      &lt;/goals&gt;
     &lt;/execution&gt;
    &lt;/executions&gt;
   &lt;/plugin&gt;
  &lt;/plugins&gt;
 &lt;/build&gt;
&lt;/project&gt;</pre>
<p>It&#8217;s also not perfect, but better then the examples i saw. The only downside is that when upgrading or downgrading Ant-contrib, the referenced path has to be modified.</p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/493/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Batch script: Convert long folder name to short 8.3 name</title>
		<link>http://mackaz.de/394</link>
		<comments>http://mackaz.de/394#comments</comments>
		<pubDate>Wed, 28 Apr 2010 20:25:38 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[dailyhelpers]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=394</guid>
		<description><![CDATA[When running Windows, i often had problems with long folder-names, especially on the command line.
Since Scala also has a problem with a JDK lying in a folder like &#8220;Program Files(x86)&#8221; i decided to write a little batch-helper to convert long folder names to the short 8.3-form.
Then i put the short name of my JDK folder [...]]]></description>
			<content:encoded><![CDATA[<p>When running Windows, i often had problems with long folder-names, especially on the command line.<br />
Since Scala also has a problem with a JDK lying in a folder like &#8220;Program Files(x86)&#8221; i decided to write a little batch-helper to convert long folder names to the short 8.3-form.<br />
Then i put the short name of my JDK folder into my environment variables, voilà &#8211; i don&#8217;t need to move the JDK to satisfy Scalas needs <img src='http://mackaz.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
The script works like this:</p>
<pre style="color: white; background-color: black;">C:\&gt;83conv C:\Program Files (x86)\Java\jdk1.6.0_20
C:\PROGRA~2\Java\JDK16~1.0_2

C:\&gt;</pre>
<p>The source:<br />
<span id="more-394"></span></p>
<pre class="brush:[cmd]">@echo off
rem # Shorten long Windows pathname to 8.3 pathname
rem # e.g. C:\Program Files (x86)\Java\jdk1.6.0_20\lib --&gt; C:\PROGRA~2\Java\JDK16~1.0_2\lib
if %1!==! goto WRONGPARAM
if NOT exist "%*" goto :NODIR
set filename="%*"
FOR /F "delims=" %%I in ('echo %filename%') do @echo %%~sI
goto :eof

:WRONGPARAM
echo Usage:
echo    83conv [PATH]
echo.

:NODIR
echo 83conv: Not a directory 1&gt;&amp;2</pre>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/394/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Programmer approaching</title>
		<link>http://mackaz.de/379</link>
		<comments>http://mackaz.de/379#comments</comments>
		<pubDate>Sun, 18 Apr 2010 16:08:58 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=379</guid>
		<description><![CDATA[And now for something completely different:

No, i wasn&#8217;t the pilot. Not yet  
]]></description>
			<content:encoded><![CDATA[<p>And now for something completely different:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/vkwwRKY3iWM&#038;hl=de&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vkwwRKY3iWM&#038;hl=de&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>No, i wasn&#8217;t the pilot. Not yet <img src='http://mackaz.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/379/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven &amp; Scala: Add source folder to Eclipse Project</title>
		<link>http://mackaz.de/304</link>
		<comments>http://mackaz.de/304#comments</comments>
		<pubDate>Thu, 15 Apr 2010 18:11:25 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=304</guid>
		<description><![CDATA[EDIT:
You don&#8217;t need to do the things described here if you&#8217;re also using Scala. In this case, you can switch to the m2eclipse-scala integration which automatically adds the Scala source folder (beside some other useful things).
Just solved one another annoying problem:
Everytime i had to clean my maven-eclipse-project with &#8220;mvn eclipse:clean&#8221; and re-created the project, i [...]]]></description>
			<content:encoded><![CDATA[<p><strong>EDIT</strong>:<br />
<em>You don&#8217;t need to do the things described here if you&#8217;re also using Scala. In this case, you can switch to the <a href="http://www.assembla.com/wiki/show/scala-ide/With_M2Eclipse" target="_self" onclick="urchinTracker('/outgoing/www.assembla.com/wiki/show/scala-ide/With_M2Eclipse?referer=');">m2eclipse-scala integration</a> which automatically adds the Scala source folder (beside some other useful things).</em></p>
<p>Just solved one another annoying problem:<br />
Everytime i had to clean my maven-eclipse-project with &#8220;mvn eclipse:clean&#8221; and re-created the project, i had to manually re-add the &#8220;src/test/scala&#8221;-folder to the eclipse project.<br />
Now i found a way to tell maven additional source folders to integrate into the eclipse project: the <a href="http://mojo.codehaus.org/build-helper-maven-plugin/project-info.html" onclick="urchinTracker('/outgoing/mojo.codehaus.org/build-helper-maven-plugin/project-info.html?referer=');">build-helper-plugin</a>.</p>
<p>So to add my src/test/scala-folder permanently i added the following plugin-configuration to my pom.xml (i also had to add the source) :</p>
<pre style="background-color: #dfdfdf;">&lt;!-- ================== MAVEN BUILDER PLUGIN =================== --&gt;
&lt;plugins&gt;
(...)
&lt;plugin&gt;
  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
  &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;
  &lt;version&gt;1.1&lt;/version&gt;
  &lt;executions&gt;
    &lt;execution&gt;
      &lt;id&gt;add-source&lt;/id&gt;
      &lt;phase&gt;generate-sources&lt;/phase&gt;
      &lt;goals&gt;
        &lt;goal&gt;add-source&lt;/goal&gt;
      &lt;/goals&gt;
      &lt;configuration&gt;
        &lt;sources&gt;
          &lt;source&gt;src/main/scala&lt;/source&gt;
        &lt;/sources&gt;
      &lt;/configuration&gt;
    &lt;/execution&gt;
    &lt;execution&gt;
      &lt;id&gt;add-test-source&lt;/id&gt;
      &lt;phase&gt;generate-sources&lt;/phase&gt;
      &lt;goals&gt;
        &lt;goal&gt;add-test-source&lt;/goal&gt;
      &lt;/goals&gt;
      &lt;configuration&gt;
        &lt;sources&gt;
          &lt;source&gt;src/test/scala&lt;/source&gt;
        &lt;/sources&gt;
      &lt;/configuration&gt;
    &lt;/execution&gt;
  &lt;/executions&gt;
&lt;/plugin&gt;
(...)
&lt;/plugins&gt;</pre>
<p>Wonderful plugin. You can add infinite source folders to your project.<br />
I will surely need it again, when i&#8217;m adding the next programming language to my project <img src='http://mackaz.de/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/304/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Maven Scala Build Error &#8220;error while loading Function1, class file needed by Function1 is missing&#8221;</title>
		<link>http://mackaz.de/293</link>
		<comments>http://mackaz.de/293#comments</comments>
		<pubDate>Wed, 14 Apr 2010 17:31:32 +0000</pubDate>
		<dc:creator>ingo</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://mackaz.de/?p=293</guid>
		<description><![CDATA[Scala and Maven&#8230; a kinda&#8217; fragile combination 
Today i got the following error when trying to compile my scala-project with &#8220;mvn compile&#8221;:

[ERROR] error: error while loading Function1, class file needed by Function1 is missing.
[INFO] reference value Unit of package scala refers to nonexisting symbol.
[ERROR] one error found
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
[ERROR] BUILD ERROR
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited [...]]]></description>
			<content:encoded><![CDATA[<p>Scala and Maven&#8230; a kinda&#8217; fragile combination <img src='http://mackaz.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Today i got the following error when trying to compile my scala-project with &#8220;mvn compile&#8221;:</p>
<p style="color:white;background-color:black;">
[ERROR] error: error while loading Function1, class file needed by Function1 is missing.<br />
[INFO] reference value Unit of package scala refers to nonexisting symbol.<br />
[ERROR] one error found<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[ERROR] BUILD ERROR<br />
[INFO] &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
[INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1)
</p>
<p>Nothing worked anymore &#8211; no compiling, cleaning, testing or anything else concerning scala and maven.<br />
My solution: Delete all scala-folders/files in your Maven Repository (%USER%/.M2), so that maven re-downloads them.<br />
After that, anything worked again for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://mackaz.de/293/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

