<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Jan&#039;s Blog</title>
	<atom:link href="http://janmaterne.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://janmaterne.wordpress.com</link>
	<description>My personal blog about all and nothing ...</description>
	<lastBuildDate>Wed, 08 May 2013 10:14:46 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='janmaterne.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/5ae25132b2878a27f29c94781bee1f38?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Jan&#039;s Blog</title>
		<link>http://janmaterne.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://janmaterne.wordpress.com/osd.xml" title="Jan&#039;s Blog" />
	<atom:link rel='hub' href='http://janmaterne.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Custom Eclipse Window Title</title>
		<link>http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title-2/</link>
		<comments>http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title-2/#comments</comments>
		<pubDate>Tue, 06 Nov 2012 09:12:43 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title-2/</guid>
		<description><![CDATA[I used Eclipse for a long time. Now I have to manage multiple running instances &#8211; mostly for the development branch and the production branch of our project. The problem is distinguishing the running instances by their task icon/window title. I search a little bit and found how to customize the branding or the -showlocation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=374&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I used Eclipse for a long time. Now I have to manage multiple running instances &#8211; mostly for the development branch and the production branch of our project. The problem is distinguishing the running instances by their task icon/window title. I search a little bit and found how to <a href="http://www.eclipse.org/articles/Article-Branding/branding-your-application.html">customize the branding</a> or the <a href="http://stackoverflow.com/questions/8664917/is-it-possible-to-change-the-eclipse-title">-showlocation</a> startup parameter. But after looking at the Eclipse preferences I found a very nice way: General | Workspace | Workspace name</p>
<p><a href="http://janmaterne.files.wordpress.com/2012/11/blog-1.jpg"><img id="i-370" class="size-full wp-image" alt="Bild" src="http://janmaterne.files.wordpress.com/2012/11/blog-1.jpg?w=580" /></a></p>
<p>This results in a nice and short solution to this problem &#8211; in the task bar</p>
<p><a href="http://janmaterne.files.wordpress.com/2012/11/blog-2.jpg"><img id="i-371" class="size-full wp-image" alt="Bild" src="http://janmaterne.files.wordpress.com/2012/11/blog-2.jpg?w=163" /></a></p>
<p>and in the Eclipse title bar</p>
<p><a href="http://janmaterne.files.wordpress.com/2012/11/blog-3.jpg"><img id="i-372" class="size-full wp-image" alt="Bild" src="http://janmaterne.files.wordpress.com/2012/11/blog-3.jpg?w=156" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/374/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=374&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2012/11/blog-1.jpg?w=580" medium="image">
			<media:title type="html">Bild</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2012/11/blog-2.jpg?w=163" medium="image">
			<media:title type="html">Bild</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2012/11/blog-3.jpg?w=156" medium="image">
			<media:title type="html">Bild</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom Eclipse Window Title</title>
		<link>http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title/</link>
		<comments>http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title/#comments</comments>
		<pubDate>Tue, 06 Nov 2012 09:12:36 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[title]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title/</guid>
		<description><![CDATA[I used Eclipse for a long time. Now I have to manage multiple running instances &#8211; mostly for the development branch and the production branch of our project. The problem is distinguishing the running instances by their task icon/window title. I search a little bit and found how to customize the branding or the -showlocation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=373&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I used Eclipse for a long time. Now I have to manage multiple running instances &#8211; mostly for the development branch and the production branch of our project. The problem is distinguishing the running instances by their task icon/window title. I search a little bit and found how to <a href="http://www.eclipse.org/articles/Article-Branding/branding-your-application.html">customize the branding</a> or the <a href="http://stackoverflow.com/questions/8664917/is-it-possible-to-change-the-eclipse-title">-showlocation</a> startup parameter. But after looking at the Eclipse preferences I found a very nice way: General | Workspace | Workspace name</p>
<p><a href="http://janmaterne.files.wordpress.com/2012/11/blog-1.jpg"><img id="i-370" class="size-full wp-image" alt="Bild" src="http://janmaterne.files.wordpress.com/2012/11/blog-1.jpg?w=580" /></a></p>
<p>This results in a nice and short solution to this problem &#8211; in the task bar</p>
<p><a href="http://janmaterne.files.wordpress.com/2012/11/blog-2.jpg"><img id="i-371" class="size-full wp-image" alt="Bild" src="http://janmaterne.files.wordpress.com/2012/11/blog-2.jpg?w=163" /></a></p>
<p>and in the Eclipse title bar</p>
<p><a href="http://janmaterne.files.wordpress.com/2012/11/blog-3.jpg"><img id="i-372" class="size-full wp-image" alt="Bild" src="http://janmaterne.files.wordpress.com/2012/11/blog-3.jpg?w=156" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/373/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=373&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2012/11/06/custom-eclipse-window-title/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2012/11/blog-1.jpg?w=580" medium="image">
			<media:title type="html">Bild</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2012/11/blog-2.jpg?w=163" medium="image">
			<media:title type="html">Bild</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2012/11/blog-3.jpg?w=156" medium="image">
			<media:title type="html">Bild</media:title>
		</media:content>
	</item>
		<item>
		<title>Java-Cron-Jobs with Spring and Quartz</title>
		<link>http://janmaterne.wordpress.com/2012/02/03/java-cron-jobs-with-spring-and-quartz/</link>
		<comments>http://janmaterne.wordpress.com/2012/02/03/java-cron-jobs-with-spring-and-quartz/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 20:26:48 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[quartz]]></category>
		<category><![CDATA[scheduler]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=327</guid>
		<description><![CDATA[We have several Jobs running the business. At the moment they are implemented as Spring-driven TimerTasks. But the next job should be run only nightly and a cron-like configuration syntax would be fine. So I found Quartz and had to integrate that. For getting familiar with Quartz+Spring I wrote a small proof of concept. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=327&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>We have several Jobs running the business. At the moment they are implemented as <a href="http://static.springsource.org/spring/docs/3.0.5.RELEASE/reference/scheduling.html#scheduling-jdk-timer" target="_blank">Spring-driven</a> <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/TimerTask.html" target="_blank">TimerTasks</a>. But the next job should be run only nightly and a <a href="http://en.wikipedia.org/wiki/Cron" target="_blank">cron</a>-like configuration syntax would be fine.</p>
<p>So I found <a href="http://www.quartz-scheduler.org/" target="_blank">Quartz </a>and had to integrate that. For getting familiar with <a href="http://static.springsource.org/spring/docs/3.0.5.RELEASE/reference/scheduling.html#scheduling-quartz" target="_blank">Quartz+Spring</a> I wrote a small proof of concept.</p>
<p>The job implementation is just a POJO with a public void method. It should not throw any exception. The bean can be configured via usual Spring DI:</p>
<pre class="brush: java; title: ; notranslate">
public class MyBean {

private String message;

public void doIt() {
System.out.println(&quot;Hello World: &quot; + message);
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

}
</pre>
<p>So fine. But how to test? For this PoC a very simple test is ok &#8211; just wait for some Quartz run and check the output manually:</p>
<pre class="brush: java; title: ; notranslate">
import static org.junit.Assert.assertNotNull;

import org.junit.AfterClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class QuartzTest {

@Test
public void context() {
System.out.println(&quot;Starting Spring and within that: Quartz&quot;);
ApplicationContext ctx = new ClassPathXmlApplicationContext(&quot;spring-config.xml&quot;);
assertNotNull(ctx);
}

@AfterClass public static void sleep() throws InterruptedException {
System.out.println(&quot;Wait for job output&quot;);
Thread.sleep(8000);
System.out.println(&quot;ready&quot;);
}
}
</pre>
<p>When using Spring, we have to provide the configuration.<br />
First I define my Job-bean</p>
<pre class="brush: xml; title: ; notranslate">
&lt;bean id=&quot;myBean&quot;&gt;
&lt;property name=&quot;message&quot; value=&quot;TEST&quot; /&gt;
&lt;/bean&gt;
</pre>
<p>After that I configure Quartz:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;bean id=&quot;scheduler&quot;
class=&quot;org.springframework.scheduling.quartz.SchedulerFactoryBean&quot;
scope=&quot;singleton&quot;&gt;
&lt;property name=&quot;triggers&quot;&gt;
&lt;list&gt;
&lt;!-- trigger list --&gt;
&lt;ref bean=&quot;job1&quot; /&gt;
&lt;/list&gt;
&lt;/property&gt;
&lt;/bean&gt;
</pre>
<p>The binding between job and Quartz is done via a configured <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/scheduling/quartz/CronTriggerBean.html" target="_blank">CronTriggerBean</a>.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;bean id=&quot;job1&quot;&gt;
&lt;property name=&quot;cronExpression&quot; value=&quot;0/2 * * * * ?&quot; /&gt;
&lt;property name=&quot;jobDetail&quot;&gt;
&lt;bean&gt;
&lt;property name=&quot;name&quot; value=&quot;job1&quot; /&gt;
&lt;property name=&quot;group&quot; value=&quot;nightlyJobs&quot; /&gt;
&lt;!-- Delegieren auf unsere Bean und unsere Methode --&gt;
&lt;property name=&quot;targetObject&quot; ref=&quot;myBean&quot; /&gt;
&lt;property name=&quot;targetMethod&quot; value=&quot;doIt&quot; /&gt;
&lt;property name=&quot;concurrent&quot; value=&quot;false&quot; /&gt;
&lt;/bean&gt;
&lt;/property&gt;
&lt;/bean&gt;
</pre>
<p>This CronTriggerBean defines two values:<br />
1. cronExpression specifies when to run the job. An explanation about that syntax can be found at <a href="http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger" target="_blank">http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger</a>.<br />
2. <a href="http://www.quartz-scheduler.org/documentation/quartz-1.x/tutorials/TutorialLesson03" target="_blank">jobDetail </a>specifies a JavaBean with information about the job. But we dont have to write this Bean, we just can configure the generic one from Spring:<br />
- name and group for controlling the execution via control interfaces<br />
- targetObject and targetMethod for the delegation to our JobBean<br />
- specify if this job should run in concurrent mode (where concurrent means in one VM!)</p>
<p>Building this sample with Maven is easy. You&#8217;ll need just following dependencies:</p>
<ul>
<li>org.springframework::spring-core::3.0.5.RELEASE</li>
<li>org.springframework::spring-context::3.0.5.RELEASE</li>
<li>org.springframework::spring-context-support::3.0.5.RELEASE</li>
<li>org.springframework::spring-tx::3.0.5.RELEASE</li>
<li>org.quartz-scheduler::quartz::1.8.5</li>
<li>junit::junit::4.9::{scope=test}</li>
</ul>
<p>As far as I <a href="http://forum.springsource.org/showthread.php?114336-What-Maven-dependencies-do-I-need-to-include-Quartz-support-Failing-with-NoClass&amp;p=378925#post378925" target="_blank">read </a>you can&#8217;t use Quartz 2.x because Spring 3 doesnt support that. But I havent tried it.</p>
<p>When running you&#8217;ll get this output:</p>
<pre class="brush: plain; title: ; notranslate">
Starting Spring and within that: Quartz
... logs from Spring
... infos from SLF4J
INFO: Starting Quartz Scheduler now
Wait for job output
Hello World: TEST
Hello World: TEST
Hello World: TEST
Hello World: TEST
Hello World: TEST
ready
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=327&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2012/02/03/java-cron-jobs-with-spring-and-quartz/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>
	</item>
		<item>
		<title>Die Photovoltaikanlage im Steuerrecht</title>
		<link>http://janmaterne.wordpress.com/2011/08/20/die-photovoltaikanlage-im-steuerrecht/</link>
		<comments>http://janmaterne.wordpress.com/2011/08/20/die-photovoltaikanlage-im-steuerrecht/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 09:44:02 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[7g]]></category>
		<category><![CDATA[photovoltaik]]></category>
		<category><![CDATA[pv]]></category>
		<category><![CDATA[steuer]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=318</guid>
		<description><![CDATA[Tja, nun bin ich auch betroffen. Ich habe eine Photovoltaikanlage geordert. Und der Vertreter sprach davon, dass man diese über 20 Jahre lang abschreiben kann und sogar die Mehrwertsteuer wiederbekommt! Toll &#8230;. Aber als ehemaliger Steuerrechtler wollte ich das genauer wissen. Ja, das EEG, das Erneuerbare-Energien-Gesetz, könnte ja so einiges bieten. Aber fündig geworden bin [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=318&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Tja, nun bin ich auch betroffen. Ich habe eine Photovoltaikanlage geordert. Und der Vertreter sprach davon, dass man diese über 20 Jahre lang abschreiben kann und sogar die Mehrwertsteuer wiederbekommt! Toll &#8230;. Aber als ehemaliger Steuerrechtler wollte ich das genauer wissen. Ja, das <a title="EEG 2009" href="http://www.gesetze-im-internet.de/eeg_2009/" target="_blank">EEG</a>, das <a title="Das EEG bei Wikipedia" href="http://de.wikipedia.org/wiki/Erneuerbare-Energien-Gesetz" target="_blank">Erneuerbare-Energien-Gesetz</a>, könnte ja so einiges bieten.</p>
<p>Aber fündig geworden bin ich ganz normal im Einkommensteuergesetz (<a title="EStG" href="http://www.gesetze-im-internet.de/estg/" target="_blank">EStG</a>) wegen der Abschreibung und dem Umsatzsteuergesetz (<a title="UStG" href="http://www.gesetze-im-internet.de/ustg_1980/index.html" target="_blank">UStG</a>) wegen der Märchensteuer&#8230; Also mal von vorne <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Das UStG betrifft &#8220;Unternehmer&#8221;. Und jeder der &#8220;nachhaltig&#8221; Einnahmen erzielt, ist erst einmal Unternehmer. Da ich nun mit der Photovoltaikanlage ein paar Jahre Strom einspeise und vergütet bekomme, ist dieses zu bejahen. Auf einen eventuellen Gewinn ist nach UStG übrigens nicht abzustellen. Ich bin also Unternehmer im Sinne der Umsatzsteuer. Damit habe ich entsprechende Rechte und Pflichten. Mein primäres Recht: der Vorsteuerabzug. Hierüber bekomme ich die USt des Kaufpreises wieder. Die Pflichten: regelmäßige Umsatzsteuererklärungen (idR jährlich) und die Versteuerung meiner Einnahmen. Ups &#8211; muss ich da 19% von meinem eingenommen Geld wieder abführen? Ne &#8211; der Energieversorger muss wissen, dass ich Unternehmer bin, dann zahlt er die oben drauf &#8211; meine &#8220;Rendite&#8221; ist also nicht davon betroffen. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Einnahmen = Unternehmer = USt-Erklärung? Aber nicht immer! Das UStG führt im §19 die &#8220;Kleinunternehmerregel&#8221;. Wer wenig einnimmt, kann sich den ganzen steuerlichen Kram sparen. Es entfallen somit die lästigen Pflichten &#8211; aber eben auch die Rechte! Ich will aber meine Vorsteuer &#8230;. Ok, bleibe ich halt Unternehmer. Einen Strich könnte noch eine weitere Regel durch die Rechnung machen. Wenn meine Einnahmen komplett steuerfrei wären, könnte ich auch keine Vorsteuer abziehen. Sind sie aber nicht und daher bleibts beim Regelfall &#8220;Vorsteuer+Erklärungen&#8221;.</p>
<p>Aber wer vorher schon Kleinunternehmer war, muss etwas anderes berücksichtigen: das UStG kennt pro Person nur ein Unternehmen! Wenn die Photovoltaikanlage also regelbesteuert werden soll, dann werden auch die regelmäßigen eBay-Verkäufe oder Programmierarbeiten grundsätzlich steuerpflichtig &#8230; (eventuelle Steuerbefreiungen müssten dann geprüft werden). Also Vorsicht!</p>
<p>Nachdem ich also meine 19% Märchensteuer für den Kauf der Anlage wiederbekomme, die abzuführende Märchensteuer für die Einspeisung vom Versorger oben drauf kriege und also nur regelmäßig meine Steuerklärung machen muss, wäre noch zu klären, wie das mit der Abschreibung kommt.</p>
<p>Die Antwort liegt im EStG. Dieses gilt für alle &#8220;unbeschränkt Einkommersteuerpflichtigen&#8221;. Jemand mit Hauptwohnsitz in Deutschland ist das. Und damit dürfte dann die meisten sein, die sich eine PV-Anlagen aufs eigene Dach schrauben lassen&#8230; Per EStG greift der Staat nun für jeden verdienten Euro etwas ab. Auch hier gibt es Befreiungsvorschriften, die aber nicht zum Zuge kommen. Die Frage stellt sich nun nach dem Verdienst.</p>
<p>Mit dem Einspeisen von Strom in das Stromnetz gegen Geld nehme ich am gewerblichen Leben teil. Damit sind die Einspeisevergütungen Einnahmen aus Gewerbebetrieb (§15 EStG). (@myself: Vielleicht noch mal genauer subsummieren <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Der zu versteuernde &#8220;Verdienst&#8221; ermittelt sich somit nach §4 und im einfachen Fall nach §4(3) EStG &#8211; der &#8220;Einnahme-Überschuss-Rechnung&#8221;. Also: alle Einnahmen abzüglich aller Ausgaben ergibt den Gewinn oder halt den Verlust, der dann mit allen anderen Einnahmen (z.B. Arbeitslohn, Künstlerhonorar, Mieteinnahmen, &#8230;) zusammen zur Einkommensteuer veranlagt wird.</p>
<p>Also alle Einnahmen: mmh, da wäre nur die brutto-Einspeisevergütung.</p>
<p>Und die Ausgaben? Der direkte Geldabfluss: die USt auf die Einspeisevergütung, die ich ja ans Finanzamt abführen muss. Eventuelle Ausgaben für eine PV-Versicherung, &#8230;. falls mal eine Wartung fällig wird &#8230; Finanzierungskosten (Zinsen, falls ich die Anlage fremdfinanziere) &#8230; Und dann noch die &#8220;umgelegten Ausgaben&#8221; &#8211; die &#8220;Abschreibung für Abnutzung&#8221; oder kurz AfA. Die kann ich gem. §7 EStG ansetzten und zwar so, dass die Anschaffungs- oder Herstellungskosten auf die Nutzungsdauer umgelegt werden. Die Anschaffungskosten sind hier der Netto-Preis, da ich als (USt)-Unternehmer die Märchensteuer ja nicht selber tragen muss. Die Nutzungsdauer wurde mal mit 20 Jahren festgelegt. Die Abschreibung kann mittlerweile nur noch linear erfolgen, so dass ich 5% jährlich abschreiben kann. Wobei allerdings monatsgenau zu rechnen ist.</p>
<p>Spitze, habe ich also auch die Abschreibung gefunden. Aber halt &#8211; da gibt es noch eine: Zur Förderung kleiner Betriebe (so wie mein PV-Betrieb) hat der Gesetzgeber die Förderung nach §7g EStG &#8220;Investitionsabzugsbeträge und Sonderabschreibungen zur Förderung kleiner und mittlerer Betriebe&#8221; eingeführt. Mal genauer ansehen: &#8220;Steuerpflichte können für zukünftige Anschaffungen von beweglichen abnutzbaren Wirtschaftsgütern bis zu 40% der AK abziehen, wenn [der Betrieb klein ist, also bei einer 4(3)-Rechnung nicht mehr als 100.000 Euro jährlich rausspringen.&#8221; Klingt gut, wenn es da nicht heißen würde &#8220;zukünftig&#8221;. Also im folgenden Jahr&#8230;. Also für alle, die die PV noch planen: wenn der Auftrag dieses Jahr rausgeht, aber erst im nächsten Jahr realisiert wird, wird das für Euch interessant! Aber dieser Abzug verschiebt nur die Kosten &#8211; der im Vorjahr abgezogene Betrag ist im Investitionsjahr wieder drauf zu rechnen. Schade &#8230;</p>
<p>Aber noch einen im 7g: nach Absatz 5 können zusätzlich zur regulären (monatsgenauen) AfA weitere 20% in den ersten fünf Jahren abgesetzt werden! (Was dann natürlich nicht das Abschreibungsvolumen erhöht. Die Anlage ist dann schneller abgeschrieben.) Mal genauer ansehen:</p>
<ol>
<li>abnutzbar</li>
<li>beweglich</li>
<li>Wirtschaftsgut (WG) des Anlagevermögens</li>
<li>Voraussetzungen des Absatzes 6:</li>
<ol>
<li>Kleinbetrieb wie vor (4(3)-Überschuss 100.000 €; 4(1)-Bilanz-Betriebsvermögen bis 235.000 €)</li>
<li>WG im Anschaffungs- und Folgejahr im Inland</li>
<li>fast ausschließlich betrieblich genutzt</li>
</ol>
</ol>
<p>Also:</p>
<ul>
<li>&#8220;abnutzbar&#8221;: jepp, sonst könnte ich das ja gar nicht linear abschreiben (bND=20Jahre)</li>
<li>&#8220;WG des AV&#8221;: jepp, will die Anlage ja betreiben</li>
<li>&#8220;Kleinbetrieb&#8221;: so groß ist meine PV auch wieder nicht, also ja.</li>
<li>&#8220;Inland&#8221;: da steht mein Haus, also auch ok</li>
<li>&#8220;betriebliche Nutzung&#8221;: sowohl das Einspeisen von Strom bringt Geld als auch der Eigenverbrauch (!). Damit 100% &#8220;betriebliche&#8221; Nutzung.</li>
<li>&#8220;beweglich&#8221;????? Die ist doch fest am Dach! Aber halt nicht fest genug <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Man könnte sie abmontieren ohne dass die PV oder das Haus Schaden nehmen würde. Damit liegt ein &#8220;Scheinbestandteil&#8221; des Hauses vor und die PV bleibt &#8220;beweglich&#8221; &#8211; puh &#8230;. Also auch ok.</li>
</ul>
<p>Damit habe ich eine zusätzliche Abschreibungsmöglichkeit gefunden.</p>
<p>Dem Gewerbesteuerrecht widme ich mich jetzt hier nicht. Ein paar Links müsste ich noch einpflegen &#8230; Aber noch kurz eine Anregung wegen der Finanzierungskosten: Wenn zusätzlich zur PV beispielsweise noch ein Auto oder eine neue Heizung fällig wird und nicht beides direkt bezahlt werden kann, dann bitte die PV finanzieren, da diese Zinsen bei der ESt abgesetzt werden können. Bei Auto und Heizung ist das eher unwahrscheinlich &#8230; Ein nachträgliches Ändern müsste gehen (ich meine, da gab es mal einige BFH-Urteile), werden aber bestimmt nicht so einfach geschluckt &#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/318/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=318&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2011/08/20/die-photovoltaikanlage-im-steuerrecht/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>
	</item>
		<item>
		<title>10 vor Weihnachten</title>
		<link>http://janmaterne.wordpress.com/2010/11/24/10-vor-weihnachten/</link>
		<comments>http://janmaterne.wordpress.com/2010/11/24/10-vor-weihnachten/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 21:23:13 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[de]]></category>
		<category><![CDATA[konzert]]></category>
		<category><![CDATA[niederrhein brass]]></category>
		<category><![CDATA[trompete]]></category>
		<category><![CDATA[trumpet]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=311</guid>
		<description><![CDATA[Die 10 Blechbläser von NiederrheinBrass mit dem Schlagwerker Rolf Hildebrandt werden die Kirchenmauern wieder ordentlich zum Wackeln bringen. Das Programm ist wie immer abwechslungsreich: Zwischen Bach und Big-Band-Sound sollen die Konzertbesucher auch selbst mitsingen bei alten wohl bekannten Advents- und Weihnachtsliedern. So 05.12.2010 (2.Advent) 17:00: Ev.Stadtkirche Moers So 12.12.2010 (3.Advent) 17:00: Ev.Dorfkirche Vluyn Eintritt frei. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=311&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Die 10 Blechbläser von NiederrheinBrass mit dem Schlagwerker Rolf Hildebrandt werden die Kirchenmauern wieder ordentlich zum Wackeln bringen. Das Programm ist wie immer abwechslungsreich: Zwischen Bach und Big-Band-Sound sollen die Konzertbesucher auch selbst mitsingen bei alten wohl bekannten Advents- und Weihnachtsliedern.</p>
<p>So 05.12.2010 (2.Advent) 17:00: <a title="Google Maps Moers" href="http://maps.google.com/maps?f=q&amp;hl=de&amp;geocode=&amp;q=moers+stadtkirche&amp;sll=51.438686,6.529858&amp;sspn=0.011904,0.033817&amp;ie=UTF8&amp;z=16&amp;iwloc=addr">Ev.Stadtkirche Moers</a><br />
So 12.12.2010 (3.Advent) 17:00: <a title="Google Maps Vluyn" href="http://maps.google.com/maps?f=q&amp;hl=de&amp;geocode=&amp;q=vluyn+kirchplatz&amp;sll=51.437818,6.531909&amp;sspn=0.005952,0.016909&amp;ie=UTF8&amp;z=16&amp;iwloc=addr">Ev.Dorfkirche Vluyn</a></p>
<p>Eintritt frei.</p>
<p>Weitere Infos unter <a title="Homepage" href="http://www.NiederrheinBrass.de">www.NiederrheinBrass.de</a></p>
<p><a href="http://janmaterne.files.wordpress.com/2010/11/nrb_mail_winter_10sm.jpg"><img class="aligncenter size-full wp-image-312" title="nrb_mail_winter_10sm" src="http://janmaterne.files.wordpress.com/2010/11/nrb_mail_winter_10sm.jpg?w=450" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/311/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/311/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=311&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2010/11/24/10-vor-weihnachten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2010/11/nrb_mail_winter_10sm.jpg" medium="image">
			<media:title type="html">nrb_mail_winter_10sm</media:title>
		</media:content>
	</item>
		<item>
		<title>Update to the Hudson book</title>
		<link>http://janmaterne.wordpress.com/2010/11/22/update-to-the-hudson-book/</link>
		<comments>http://janmaterne.wordpress.com/2010/11/22/update-to-the-hudson-book/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 20:58:23 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[simon wiest]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=304</guid>
		<description><![CDATA[News from the Hudson by Simon Wiest book I reviewed: it is now in the press and if you order it (e.g. at Amazon), you should be able to read it by Xmas (if you can read German :-O )<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=304&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>News from the <a title="Hudsons homepage" href="http://hudson-ci.org/" target="_blank">Hudson</a> by <a title="Homepage Simon Wiest" href="http://www.simonwiest.de/" target="_blank">Simon Wiest</a> <a title="Book at the publisher" href="http://www.dpunkt.de/buecher/3293.html" target="_blank">book</a> I <a title="My blog about it" href="http://janmaterne.wordpress.com/2010/11/08/hudson-review-and-ideas/" target="_blank">reviewed</a>: it is now in the press and if you order it (e.g. at <a title="Order at Amazon" href="http://www.amazon.de/gp/product/3898646904/" target="_blank">Amazon</a>), you should be able to read it by Xmas <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  (if you can read German :-O )</p>
<p><a href="http://janmaterne.files.wordpress.com/2010/11/32931.jpg"><img class="aligncenter size-full wp-image-297" title="Cover &quot;Continuous Integration mit Hudson&quot; by Simon Wiest" src="http://janmaterne.files.wordpress.com/2010/11/32931.jpg?w=450" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/304/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=304&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2010/11/22/update-to-the-hudson-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2010/11/32931.jpg" medium="image">
			<media:title type="html">Cover &#34;Continuous Integration mit Hudson&#34; by Simon Wiest</media:title>
		</media:content>
	</item>
		<item>
		<title>Links for 2010-11-08</title>
		<link>http://janmaterne.wordpress.com/2010/11/08/links-for-2010-11-08/</link>
		<comments>http://janmaterne.wordpress.com/2010/11/08/links-for-2010-11-08/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 10:00:13 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[cakefest]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[launchy]]></category>
		<category><![CDATA[mock]]></category>
		<category><![CDATA[mockito]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=302</guid>
		<description><![CDATA[TecChannel had a (German) article about one of my favorite tools: Launchy - a program for starting applications or opening web pages &#8230; &#160; If you are a PHP programmer and interested in CakePHP, CakeFest was a conference for you. Not attended? There are slides online: Re-imagining CakePHP (Graham Weldon) Using and re-using CakePHP plugins [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=302&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.tecchannel.de/">TecChannel </a>had a (German) <a href="http://www.tecchannel.de/pc_mobile/tools/2029979/windows_7_vista_xp_launchy_programme_schnell_starten/">article </a>about one of my favorite tools: <a href="http://www.launchy.net/">Launchy </a>- a program for starting applications or opening web pages &#8230;</p>
<p>&nbsp;</p>
<p>If you are a PHP programmer and interested in CakePHP, CakeFest was a conference for you. Not attended? There are slides online:</p>
<ul>
<li><a href="//www.slideshare.net/predominant/reimaginging-cakephp">Re-imagining CakePHP</a> (Graham Weldon)</li>
<li><a href="http://www.slideshare.net/real34/using-reusingplugins">Using and re-using CakePHP plugins</a> (Pierre Martin)</li>
<li><a href="http://www.slideshare.net/ichikaway/cakefest-ichikawa-upload">How to use MongoDB with CakePHP</a> (Yasushi Ichikawa)</li>
<li><a href="http://www.slideshare.net/therealphpdiddy/cakefest-higher-education">CakePHP in higher education</a> (J. Erik Schaeffer)</li>
<li><a href="http://www.slideshare.net/mtovey/plumbing-w-cake">Plumbing with Cake: Integrating CakePHP and Drupal</a> (Mark Tovey)</li>
<li><a href="http://www.slideshare.net/neilcrookes/designing-cakephp-plugins-for-consuming-apis">Designing CakePHP plugins for consuming APIs</a> (Neil Crookes)</li>
<li>Simplifying heavy client side web applications using CakePHP and Adobe Flash Builder 4 (Brandon Plasters)</li>
<li>CakePHP Community: The whole is greater than the sum of its parts (Larry Masters)</li>
<li><a href="http://mark-story.com/downloads/view/win-at-life-with-unit-testing">Win at life with unit testing </a>(Mark Story)</li>
<li>Its easier to ask forgiveness than it is to get ACL permissions! (Erik Peterson)</li>
<li><a href="http://www.slideshare.net/andrewcurioso/cakefest-2010-api-development">Developing an API</a> (Andrew Curioso)</li>
<li><a href="http://www.slideshare.net/andygale/cake-php-at-a-massive-scale-on-a-budget">CakePHP at a massive scale, on a budget</a> (Andy Gale)</li>
</ul>
<p>And according to <a href="http://entwickler.com/itr/news/psecom,id,54840,nodeid,82.html">Entwickler.COM</a> the conference should be held in 2011 too&#8230;</p>
<p>&nbsp;</p>
<p>If you are a Java programmer unit tests are a standard. Therefore mocking is also a discipline you know. If you are interested in the mock library <a href="http://code.google.com/p/mockito/">Mockito</a>, the <a href="http://java.dzone.com/">DZone </a>article &#8220;<a href="http://java.dzone.com/articles/5-minute-mockito-tutorial-howto?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+javalobby%2Ffrontpage+(Javalobby+%2F+Java+Zone)">5 minute Mockito</a>&#8221; is worth reading.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/302/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=302&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2010/11/08/links-for-2010-11-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>
	</item>
		<item>
		<title>Hudson: Review and ideas</title>
		<link>http://janmaterne.wordpress.com/2010/11/08/hudson-review-and-ideas/</link>
		<comments>http://janmaterne.wordpress.com/2010/11/08/hudson-review-and-ideas/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 22:01:29 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[ideas]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=295</guid>
		<description><![CDATA[In June I had the pleasure to do a review of the first German book about CI with Hudson by Simon Wiest. The book is announced for December 2010 and it will cover topics from basic (setup, first jobs) up to deep knowledge like writing plugins for Hudson. As with earlier reviews I had printed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=295&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In June I had the pleasure to do a review of the first German book about <a href="http://www.dpunkt.de/buecher/3293.html">CI with Hudson</a> by <a href="http://www.simonwiest.de/">Simon Wiest</a>. The book is announced for December 2010 and it will cover topics from basic (setup, first jobs) up to deep knowledge like writing plugins for Hudson.<a href="http://janmaterne.files.wordpress.com/2010/11/32931.jpg"><img class="aligncenter size-full wp-image-297" title="Cover &quot;Continuous Integration mit Hudson&quot; by Simon Wiest" src="http://janmaterne.files.wordpress.com/2010/11/32931.jpg?w=450" alt=""   /></a></p>
<p>As with earlier reviews I had printed the book (draft), read it and made comments on the side (and Simon had to listen to them for hours <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>But some comments weren&#8217;t for the author &#8211; they &#8220;just&#8221; ideas which came into my mind. But because I won&#8217;t have the time for implementing them, I&#8217;ll write about them &#8230;</p>
<h1>Capability Plugin</h1>
<p>The main idea is automatic dispatching of jobs to slaves according to their needs. If I remember right, TeamCity has this feature too &#8230;</p>
<h2>The Slaves</h2>
<p>The slaves have some capabilities. There are two kinds of them:</p>
<ol>
<li>automatic capabilities: result from tool configuration, operating system, jdk versions, build tool name+version, &#8230;</li>
<li>manual capabilities: the admin of the slave can define key-value pairs</li>
</ol>
<h2>The Jobs</h2>
<p>For jobs you define requirements according to the provided capabilities. And like them there are two requirements:</p>
<ol>
<li>automatic requirements: selected jdk, build tool, operating system (if you use e.g. a Windows Batch &#8230;)</li>
<li>manual requirement: define additional requirements (or overwrite the complete formula). Use key=value (aspectj.available=true) or comparisons (ant.version &gt;= 1.8) and combine them (and, or, xor, &#8230;)</li>
</ol>
<h2>Dispatcher strategy</h2>
<p>The dispatcher must select all slaves which fit the defined requirements. From this list it selects the one by looking at the build queue of the slave (does it have time for building?) and net-response-time (don&#8217;t forget that much data has to be transfered &#8230;)</p>
<p>&nbsp;</p>
<p>Not sure if there is something like this now &#8230;. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/295/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=295&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2010/11/08/hudson-review-and-ideas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2010/11/32931.jpg" medium="image">
			<media:title type="html">Cover &#34;Continuous Integration mit Hudson&#34; by Simon Wiest</media:title>
		</media:content>
	</item>
		<item>
		<title>Another Admin job Hudson: ensure that there are not too many old builds &#8230;</title>
		<link>http://janmaterne.wordpress.com/2010/08/14/another-admin-job-hudson-ensure-that-there-are-not-too-many-old-builds/</link>
		<comments>http://janmaterne.wordpress.com/2010/08/14/another-admin-job-hudson-ensure-that-there-are-not-too-many-old-builds/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 12:56:13 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[discard old builds]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[hudson]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=288</guid>
		<description><![CDATA[Especially if you have a large number of jobs and they are running more often, you&#8217;ll come to a point, where your disk is full of old builds. Hudson provides a configuration parameter for that: &#8220;discard old builds&#8221;. This will delete old builds according to the specified number of days or number of builds. For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=288&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Especially if you have a large number of jobs and they are running more often, you&#8217;ll come to a point, where your disk is full of old builds.</p>
<p>Hudson provides a configuration parameter for that: &#8220;discard old builds&#8221;. This will delete old builds according to the specified number of days or number of builds.</p>
<p style="text-align:center;"><a href="http://janmaterne.files.wordpress.com/2010/08/hudson1.jpg"><img class="aligncenter size-full wp-image-289" title="hudson1" src="http://janmaterne.files.wordpress.com/2010/08/hudson1.jpg?w=450" alt=""   /></a></p>
<p>For Apache I wrote a script which ensures, that all jobs have &#8220;discard&#8221; setting and that existing values are not higher than a defined maximum value.</p>
<p><a href="http://janmaterne.files.wordpress.com/2010/08/hudson2.jpg"><img class="aligncenter size-full wp-image-290" title="hudson2" src="http://janmaterne.files.wordpress.com/2010/08/hudson2.jpg?w=450&#038;h=146" alt="" width="450" height="146" /></a></p>
<pre class="brush: groovy; title: ; notranslate">

/** Default-Setting for the &quot;number of old builds&quot; */
numberOfOldBuilds  = 10

/** Maximum of &quot;number of days&quot; */
maxDaysOfOldBuilds = 14

/** Should we override existing values? */
overrideExistingValues = true

/** Closures for setting default 'max number' */
setMaxNum = { job -&gt;
   job.logRotator = new hudson.tasks.LogRotator(-1, numberOfOldBuilds)
}

/** Closures for setting default 'max number' */
setMaxDays = { job -&gt;
 job.logRotator = new hudson.tasks.LogRotator(maxDaysOfOldBuilds, -1)
}

// ----- Do the work. -----

// Access to the Hudson Singleton
hudsonInstance = hudson.model.Hudson.instance

// Retrieve all active Jobs
allItems = hudsonInstance.items
activeJobs = allItems.findAll{job -&gt; job.isBuildable()}

// Table header
col1 = &quot;Old&quot;.center(10)
col2 = &quot;New&quot;.center(10)
col3 = &quot;Job&quot;.center(50)
col4 = &quot;Action&quot;.center(14)
header = &quot;$col1 | $col2 | $col3 | $col4&quot;
line = header.replaceAll(&quot;[^|]&quot;, &quot;-&quot;).replaceAll(&quot;\\|&quot;, &quot;+&quot;)
title = &quot;Set 'Discard old builds'&quot;.center(line.size())

println title
println line
println header
println line

// Do work and create the result table
activeJobs.each { job -&gt;

 // Does the job have a discard setting?
 discardActive = job.logRotator != null

 // Enforce the settings
 action   = &quot;&quot;
 newValue = &quot;&quot;
 oldValue = &quot;&quot;
 if (!discardActive) {
 // No discard settings, so set the default
 setMaxNum.call(job)
 action   = &quot;established&quot;
 newValue = &quot;$numberOfOldBuilds jobs&quot;
 } else {
 // What are the current settings?
 oldDays = job.logRotator.daysToKeep
 oldNums    = job.logRotator.numToKeep

 if (oldNums &gt; 0) {
 // We have a set value for 'numbers'
 if (oldNums &gt; numberOfOldBuilds &amp;&amp; overrideExistingValues) {
 // value is too large so set a new one
 setMaxNum.call(job)
 action   = &quot;updated&quot;
 newValue = &quot;$numberOfOldBuilds jobs&quot;
 oldValue = &quot;$oldNums jobs&quot;
 } else {
 // Correct value or we arent allowed to override.
 oldValue = &quot;$oldNums jobs&quot;
 }
 } else {
 // we have a value for 'days'
 if (oldDays &gt; maxDaysOfOldBuilds &amp;&amp; overrideExistingValues) {
 // value is too large so set a new one
 setMaxDays.call(job)
 action   = &quot;updated&quot;
 newValue = &quot;$maxDaysOfOldBuilds days&quot;
 oldValue = &quot;$oldDays days&quot;
 } else {
 // Correct value or we aren't allowed to override.
 oldValue = &quot;$oldDays days&quot;
 }
 }
 }

 // String preparation for table output
 oldValue = oldValue.padLeft(10)
 newValue = newValue.padLeft(10)
 jobname  = job.name.padRight(50)

 // Table output
 println &quot;$oldValue | $newValue | $jobname | $action&quot;
}
println line

// Meaningful output on the Groovy console
// (the console will output the result of the last statement)
printout = &quot;Number of Jobs: $activeJobs.size&quot;

</pre>
<p>In the first section I define the &#8220;constants&#8221; (line 001-008). After that I define two closures which update a given Hudson job (line 010-018).<br />
The basic structure is the one I used in<a href="http://janmaterne.wordpress.com/2010/07/11/how-to-check-if-all-hudson-jobs-have-a-timeout/"> earlier scripts</a> &#8230;<br />
The work here is in lines 053-088. But that&#8217;s pretty easy: check the given values and eventually set new values using the pre defined closures.<br />
New is the last line: I dont use a &gt;x = &#8220;&#8221;&lt; instruction for suppressing the output. I use a more meaningful message: the number of jobs.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/288/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=288&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2010/08/14/another-admin-job-hudson-ensure-that-there-are-not-too-many-old-builds/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2010/08/hudson1.jpg" medium="image">
			<media:title type="html">hudson1</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2010/08/hudson2.jpg" medium="image">
			<media:title type="html">hudson2</media:title>
		</media:content>
	</item>
		<item>
		<title>Extend Windows-Search in Windows 7</title>
		<link>http://janmaterne.wordpress.com/2010/08/13/extend-windows-search-in-windows-7/</link>
		<comments>http://janmaterne.wordpress.com/2010/08/13/extend-windows-search-in-windows-7/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 20:05:13 +0000</pubDate>
		<dc:creator>janmaterne</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[extend]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[windows search]]></category>

		<guid isPermaLink="false">http://janmaterne.wordpress.com/?p=280</guid>
		<description><![CDATA[I wanted to search for a string in Java properties files. I knew that there was one entry &#8211; somewhere deep in the codebase &#8230; But the search from Win7 didnt find it. Sounds familiar? So read further &#8230; I remembered that the search works only on particular files (doc, ppt &#8230;) and my properties [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=280&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I wanted to search for a string in Java properties files. I knew that there was one entry &#8211; somewhere deep in the codebase &#8230; But the search from Win7 didnt find it.</p>
<p>Sounds familiar? So read further &#8230;</p>
<p>I remembered that the search works only on particular files (doc, ppt &#8230;) and my properties files are not in that list. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /><br />
So I wanted to tune the search:</p>
<p>Open the system configuration via the start menu and type &#8220;search&#8221; into the search field. You should find the &#8220;index options&#8221; somewhere.</p>
<p><a href="http://janmaterne.files.wordpress.com/2010/08/screenshot1.jpg"><img class="aligncenter size-full wp-image-281" title="screenshot" src="http://janmaterne.files.wordpress.com/2010/08/screenshot1.jpg?w=450&#038;h=337" alt="" width="450" height="337" /></a></p>
<p>Press the &#8220;Advanced&#8221; button (translated from the German &#8220;Erweitert&#8221;) and swith to the second &#8220;file types&#8221; tab.</p>
<p>Here you can add additional file types by their suffix and specify their index option (only file information, file content).</p>
<p><a href="http://janmaterne.files.wordpress.com/2010/08/screenshot2.png"><a href="http://janmaterne.files.wordpress.com/2010/08/screenshot2.jpg"><img class="aligncenter size-full wp-image-284" title="screenshot2" src="http://janmaterne.files.wordpress.com/2010/08/screenshot2.jpg?w=450" alt=""   /></a><br />
</a></p>
<p>Reindexing needs time &#8230;. but I hope after this I will be able to find my file <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/janmaterne.wordpress.com/280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/janmaterne.wordpress.com/280/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=janmaterne.wordpress.com&#038;blog=544265&#038;post=280&#038;subd=janmaterne&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://janmaterne.wordpress.com/2010/08/13/extend-windows-search-in-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e965379db91e0faa68ee5c211e49118c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">janmaterne</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2010/08/screenshot1.jpg" medium="image">
			<media:title type="html">screenshot</media:title>
		</media:content>

		<media:content url="http://janmaterne.files.wordpress.com/2010/08/screenshot2.jpg" medium="image">
			<media:title type="html">screenshot2</media:title>
		</media:content>
	</item>
	</channel>
</rss>
