<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Gridshore software engineering weblog - Technology</title>
    <link>http://www.gridshore.nl/blog/</link>
    <description>This weblog is about everything that has to do with software engineering. It will focus on items like Springframework, acegi, hibernate and other tools to help creating good software</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.2.1 - http://www.s9y.org/</generator>
    <pubDate>Tue, 29 Jan 2008 10:27:03 GMT</pubDate>

    <image>
        <url>http://www.gridshore.nl/blog/templates/gridshore/img/s9y_banner_small.png</url>
        <title>RSS: Gridshore software engineering weblog - Technology - This weblog is about everything that has to do with software engineering. It will focus on items like Springframework, acegi, hibernate and other tools to help creating good software</title>
        <link>http://www.gridshore.nl/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Last entry ...</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/74-Last-entry-....html</link>
            <category>acegi</category>
            <category>ajax</category>
            <category>Announcements</category>
            <category>Books</category>
            <category>gridshore</category>
            <category>Java</category>
            <category>News</category>
            <category>spring-osgi</category>
            <category>Springframework</category>
            <category>Technology</category>
            <category>Webservices</category>
            <category>Websites&amp;products</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/74-Last-entry-....html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=74</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=74</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Welcome to the last entry of this blog. No I am not quitting, I am just moving. I just installed a new blog software framework. I was starting to dislike the way to interact and I wanted something that contained more out of the box. I am in the middle of moving to wordpress software. There is a very good reason to do this. I had found a great tool on the mac called MarsEdit. And again this could not be used with serendipity. I hope I did make a good choice. Since there is a lot of information in the old blog, I did not take this blog offline. It will stay to exist, but I will not make changes there anymore.&lt;br /&gt;
&lt;br /&gt;
I hope to see you at the new version of the blog (check the page at http://www.gridshore.nl). You can attach you feedreader to the following url: feed://www.gridshore.nl/feed/ 
    </content:encoded>

    <pubDate>Sat, 19 Jan 2008 20:58:56 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/74-guid.html</guid>
    
</item>
<item>
    <title>Using vmware and apache http server as a proxy</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/58-Using-vmware-and-apache-http-server-as-a-proxy.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/58-Using-vmware-and-apache-http-server-as-a-proxy.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=58</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Currently I am working with vmware. I want to be flexible in reconfiguring my server without constantly having to re-install. Next to that I like it that I can configure my complete server and then move it to the production server. I am also looking into virtualization for the production server. Some of my collegues are also looking at it, and it looks very promising.&lt;br /&gt;
&lt;br /&gt;
Ofcourse when using a new technique, you will be facing some problems. Within this blog I will explain my idea and the solution that I created.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Demand&lt;/strong&gt;&lt;br /&gt;
I want an environment where I am able to install new servers on demand. I want to be able to have a continuous intergation server, a test server, a quality assureance server and of course a production server. If I go to my management and tell them I need 4 servers to start with they will not like it. It is better to ask for one big server and use vmware. Next to that I am very flexible in moving around servers. I can configure the server locally and put it on the host server if I am done. In the end there will be almost no downtime for testers etc.&lt;br /&gt;
Oke, that point should be clear now. There is another thing. I do not want to expose all virtual servers to the clients. This could lead to a lot of firewall rules, ip addresses to remember or dns entries. I want to be flexible. That is why I want a proxy in front of the virtual machines. This proxy is installed on the host machine and redirects to virtual machines.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Solution&lt;/strong&gt;&lt;br /&gt;
The following image shows the complete picture in a deployment diagram&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 352px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;img width=&#039;352&#039; height=&#039;324&#039;  src=&quot;http://www.gridshore.nl/blog/uploads/deploymentdiagvmware.jpg&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Deployment diagram showing the host server and the virtual machines.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This diagram shows the host server that is running windows 2003 server edition. This server can be reached using a vpn and remote terminal client. Within this server we have vmware running with two images. One image for continuous integration and the maven reports, the second image contains apache tomcat with our deployed application.&lt;br /&gt;
&lt;br /&gt;
First we install the linux virtual machines. I took a pre configured ubuntu installation:&lt;br /&gt;
&lt;a href=&quot;http://www.thoughtpolice.co.uk/vmware/&quot;  title=&quot;http://www.thoughtpolice.co.uk/vmware/&quot;&gt;http://www.thoughtpolice.co.uk/vmware/&lt;/a&gt;&lt;br /&gt;
After that I needed to install java, tomcat,continuum,apache2, ssh. It surprised my how easy this is nowadays. As an example, the next command downloads and configures ssh on the server.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
$ sudo apt-get install ssh&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
It cannot get more easy than this. Simular steps were necessary for the other components. One other I want to mention is downloading the continuum jar. This is done with a command called wget.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
$ wget http://www.apache.org/dyn/closer.cgi/maven/binaries/continuum-1.0.3-bin.tar.gz&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Again, very easy. If you want to have more information, these websites helped me figuring out the right commands:&lt;br /&gt;
&lt;a href=&quot;http://www.kintespace.com/rasxlog/?p=468&quot;  title=&quot;http://www.kintespace.com/rasxlog/?p=468&quot;&gt;http://www.kintespace.com/rasxlog/?p=468&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.spaceprogram.com/knowledge/2006/05/installing-java-5-jdk-and-tomcat-on.html&quot;  title=&quot;http://www.spaceprogram.com/knowledge/2006/05/installing-java-5-jdk-and-tomcat-on.html&quot;&gt;http://www.spaceprogram.com/knowledge/2006/05/installing-java-5-jdk-and-tomcat-on.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now you want to install and configure the apache 2 http server. Installation is not that difficult on most systems. You need to include the proxy module for apache. This can be done with the command&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
$ sudo a2enmod proxy&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The final part is configuring the proxy, therefore you must add the following lines of code to the file &lt;em&gt;/etc/apache2/mods-enabled/proxy.conf&lt;/em&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
ProxyPass /ci http://192.168.93.130/continuum&lt;br /&gt;
ProxyPassReverse /ci http://192.168.93.130/continuum&lt;br /&gt;
&lt;br /&gt;
ProxyPass /naboo http://192.168.93.130/naboo&lt;br /&gt;
ProxyPassReverse /naboo http://192.168.93.130/naboo&lt;br /&gt;
&lt;br /&gt;
ProxyPass /test http://192.168.93.130:8080/scheduling&lt;br /&gt;
ProxyPassReverse /test http://192.168.93.130:8080/scheduling&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
It is not the best step-by-step approach I have created, still I thing this will do. If you are have questions, use the comments. If you want more information about the mod_proxy module have a look at this website:&lt;br /&gt;
&lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_proxy.html&quot;  title=&quot;http://httpd.apache.org/docs/2.2/mod/mod_proxy.html&quot;&gt;http://httpd.apache.org/docs/2.2/mod/mod_proxy.html&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sat, 11 Nov 2006 09:54:38 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/58-guid.html</guid>
    
</item>
<item>
    <title>Centralized or distributed SCM</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/57-Centralized-or-distributed-SCM.html</link>
            <category>gridshore</category>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/57-Centralized-or-distributed-SCM.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=57</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    For a project I did a while ago we were thinking about using a branch for each developer while working on large changes/additions. Why, you ask? Well I&#039;ll try to explain, believe me I know there are alternatives but think about it before you judge.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Scenario&lt;/strong&gt;&lt;br /&gt;
We want to deliver version 3.0 of our application but we also want to continue creating some new usecases. Since we use test driven development, we create a test, implement functionality and run the test. After this we want to check in the stuff and let the integration test run by our continuous build. One possible obvious solution could be to use a branche for the 3.0 release and continuo working on the head. &lt;br /&gt;
This all sounds clear, we use subversion as an scm (Source Control Management) system. I do have one problem though. The repository is on a server of a friend of mine, I need to use an scm which I cannot use everywhere due to firewall settings. Therefore I cannot checkin code, which makes I cannot separate the different features I implement.&lt;br /&gt;
Last week I listened to the &lt;a href=&quot;http://www.javaposse.com/&quot;  title=&quot;javaposse&quot;&gt;javaposse&lt;/a&gt; podcast. There was an item about distributed scm. I got interested and desided to investigate further. I had a look at &lt;a href=&quot;http://www.selenic.com/mercurial/wiki/index.cgi/Mercurial&quot;  title=&quot;Mercurial&quot;&gt;Mercurial&lt;/a&gt; and I am still curious. I copied the following piece of text from&lt;a href=&quot;http://www.selenic.com/mercurial/wiki/index.cgi/DistributedSCM&quot;  title=&quot;DistributedSCM from mercurial wiki&quot;&gt; their wiki&lt;/a&gt;:&lt;br /&gt;
&lt;em&gt;A distributed SCM tool is designed to support a model in which each Repository is loosely coupled to many others. Each Repository contains a complete set of metadata describing one or more projects. These repositories may be located almost anywhere. Individual developers only need access to their own repositories, not to a central one, in order to Commit changes. &lt;br /&gt;
Distributed SCMs provide mechanisms for propagating changes between repositories.&lt;/em&gt;&lt;br /&gt;
I installed the stuff (very easy, good manual, only 2.5 Mb or so download). There is a nice &lt;a href=&quot;http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial&quot;  title=&quot;mercurial tutorial&quot;&gt;tutorial&lt;/a&gt; giving you the basics of using mercurial.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Next steps&lt;/strong&gt;&lt;br /&gt;
I am not convinced I need a distributed scm. I like the idea of having a local repository. I think this can help you when working in a gridshore project. I want to have a better look at a good workflow for such a system. How are you going to configure your continuous integration? The first thing I did was looking for a mercurial maven scm plugin. There is a very current thread in jira about &lt;a href=&quot;http://www.mail-archive.com/issues@maven.apache.org/msg11017.html&quot;  title=&quot;Maven mercurial&quot;&gt;maven and mercurial&lt;/a&gt;. I want to start an experiment with this, so if you are reading this and you have experience or good articles please post a comment or send an email. 
    </content:encoded>

    <pubDate>Sun, 15 Oct 2006 21:04:43 +0200</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/57-guid.html</guid>
    
</item>
<item>
    <title>Luntbuild and Maven 2, the ideal couple?</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/46-Luntbuild-and-Maven-2,-the-ideal-couple.html</link>
            <category>Java</category>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/46-Luntbuild-and-Maven-2,-the-ideal-couple.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=46</wfw:comment>

    <slash:comments>9</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=46</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    After playing around with continuum I am back on my luntbuild feet. I really tried continuum, good community by the way, but the maven site integration is not really possible. That is at least a little bit strange. The same is valid for labelling builds. Why this introduction for a luntbuild maven story, well, with luntbuild it is possible. Maybe not perfect but possible.&lt;br /&gt;
&lt;br /&gt;
Let me explain, luntbuild does have maven 2 integration, I wanted to be able to copy the results of the site target to the luntbuild artifacts directory. This is not possible out of the box. But with a small experiment I created a maven mojo that does the trick. First disadvantage, you need to provide an extra part to the pom that is only needed for copying the site. I do want to do some more research whether this was really necessary, but for now it works.&lt;br /&gt;
&lt;br /&gt;
So what is in this blog item? I will give you some details on creating a plugin for maven. Then Ill present you with the configuration of luntbuild to pass parameters to maven by using environment variables. In the end just a screenshot with the artifacts of the different maven projects.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Creating the maven plugin, or mojo&lt;/h2&gt;&lt;br /&gt;
There is a &lt;a href=&quot;http://maven.apache.org/guides/plugin/guide-java-plugin-development.html&quot; target=&quot;_blank&quot;&gt;guide&lt;/a&gt; available on the maven website. Read this first, then come back for the step by step approach.&lt;br /&gt;
&lt;br /&gt;
Use the appropriate archetype to create the project with maven:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
mvn archetype:create &lt;br /&gt;
       -DgroupId=nl.gridshore.maven.plugin &lt;br /&gt;
       -DartifactId=maven-copy-site-plugin &lt;br /&gt;
       -DarchetypeArtifactId=maven-archetype-mojo&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Compile the project, create the eclipse project space and start up eclipse&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
mvn package eclipse:eclipse&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
An example for a plugin is allready available in the generated project. We will create our own by subclassing the AbstractPlugin class. I do not want to teach java specifics in this blog item. Therefore just the code:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
package nl.gridshore.maven.plugin;&lt;br /&gt;
&lt;br /&gt;
import java.io.File;&lt;br /&gt;
&lt;br /&gt;
import org.apache.maven.plugin.AbstractMojo;&lt;br /&gt;
import org.apache.maven.plugin.MojoExecutionException;&lt;br /&gt;
import org.apache.maven.plugin.MojoFailureException;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 &lt;strong&gt; @author Jettro.Coenradie&lt;br /&gt;
 &lt;/strong&gt; &lt;br /&gt;
 &lt;strong&gt; @goal copydirectory&lt;br /&gt;
 &lt;/strong&gt; &lt;br /&gt;
 &lt;strong&gt; @description Copies the provided directory to the other provided directory &lt;br /&gt;
 &lt;/strong&gt;/&lt;br /&gt;
public class CopyFolderMojo extends AbstractMojo {&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     &lt;strong&gt; Location of the directory to copy from.&lt;br /&gt;
     &lt;/strong&gt; @parameter expression=&quot;${project.build.directory}&quot;&lt;br /&gt;
     &lt;strong&gt; @required&lt;br /&gt;
     &lt;/strong&gt;/&lt;br /&gt;
    private File inputDirectory;&lt;br /&gt;
	&lt;br /&gt;
    /**&lt;br /&gt;
     &lt;strong&gt; Location of the directory to copy to.&lt;br /&gt;
     &lt;/strong&gt; @parameter expression=&quot;&quot;&lt;br /&gt;
     &lt;strong&gt; @required&lt;br /&gt;
     &lt;/strong&gt;/&lt;br /&gt;
    private File outputDirectory;&lt;br /&gt;
    &lt;br /&gt;
    /**&lt;br /&gt;
     &lt;strong&gt; Name of the current project&lt;br /&gt;
     &lt;/strong&gt; @parameter expression=&quot;${project.name}&quot;&lt;br /&gt;
     &lt;strong&gt; @required&lt;br /&gt;
     &lt;/strong&gt;/&lt;br /&gt;
    private String projectName;&lt;br /&gt;
    &lt;br /&gt;
    public void execute() throws MojoExecutionException, MojoFailureException {&lt;br /&gt;
	getLog().info(&quot;Input directory : &quot;+inputDirectory.toString()+&quot;\\site&quot;);&lt;br /&gt;
	getLog().info(&quot;Output directory : &quot;+outputDirectory.toString());&lt;br /&gt;
	File in = new File(inputDirectory,&quot;site&quot;);&lt;br /&gt;
	if (!in.exists()) {&lt;br /&gt;
		getLog().info(&quot;No site available to be copied&quot;);&lt;br /&gt;
		return;&lt;br /&gt;
	}&lt;br /&gt;
	File out = new File(outputDirectory,projectName);&lt;br /&gt;
	if (!out.exists()) {&lt;br /&gt;
		out.mkdirs();&lt;br /&gt;
	}&lt;br /&gt;
	in.renameTo(new File(out,in.getName()));&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
If you have read the guide I mentioned, you now the javadoc attributes are important. These are used to set the parameter values and the name of the goal that is created.&lt;br /&gt;
&lt;br /&gt;
Having done that, we can package and install the new goal and test it.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
mvn nl.gridshore.maven.plugin:maven-copy-site-plugin:1.0-SNAPSHOT:copydirectory&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
You probalby get an error message, that is because you are missing a part in the pom. You need to define the outputDirectory for the move goal.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
	&amp;lt;build&gt;&lt;br /&gt;
		&amp;lt;plugins&gt;&lt;br /&gt;
		  	&amp;lt;plugin&gt;&lt;br /&gt;
			  &amp;lt;groupId&gt;nl.gridshore.maven.plugin&amp;lt;/groupId&gt;&lt;br /&gt;
			  &amp;lt;artifactId&gt;maven-copy-site-plugin&amp;lt;/artifactId&gt;&lt;br /&gt;
			  &amp;lt;configuration&gt;&lt;br /&gt;
			    &amp;lt;outputDirectory&gt;temp&amp;lt;/outputDirectory&gt;&lt;br /&gt;
			  &amp;lt;/configuration&gt;&lt;br /&gt;
			&amp;lt;/plugin&gt;            &lt;br /&gt;
  		&amp;lt;/plugins&gt;&lt;br /&gt;
	&amp;lt;/build&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Running the command again should result into the following:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
[INFO] ----------------------------------------------------------------------------&lt;br /&gt;
[INFO] [copy-site:copydirectory]&lt;br /&gt;
[INFO] Input directory : D:\sources\java\mavenplugincopysite\copy-site\target\site&lt;br /&gt;
[INFO] Output directory : D:\sources\java\mavenplugincopysite\copy-site\temp&lt;br /&gt;
[INFO] No site available to be copied&lt;br /&gt;
[INFO] ----------------------------------------------------------------------------&lt;br /&gt;
[INFO] BUILD SUCCESSFUL&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Actually that is all there is to it. In order to shorten the amount of typing needed on the command line, you will need to add your plugin&#039;s group ID to the list of group IDs searched by default. To do this, you need to add the following to your settings.xml file:&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
&amp;lt;pluginGroups&gt;&lt;br /&gt;
  &amp;lt;pluginGroup&gt;nl.gridshore.maven.plugin&amp;lt;/pluginGroup&gt;&lt;br /&gt;
&amp;lt;/pluginGroups&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Now you can run the following command and the result should be the same.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
mvn copy-site:copydirectory&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Integrating maven 2 with luntbuild&lt;/h2&gt;&lt;br /&gt;
There a re two important screens in luntbuild with respect to maven:&lt;br /&gt;
&lt;img width=&#039;400&#039; height=&#039;287&#039; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.gridshore.nl/blog/uploads/luntbuildmaven2_2.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;img width=&#039;400&#039; height=&#039;318&#039; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.gridshore.nl/blog/uploads/luntbuildmaven2_1.jpg&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
Finally you have to prepare you pom(s):&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
    ....&lt;br /&gt;
	&amp;lt;version&gt;${buildVersion}&amp;lt;/version&gt;&lt;br /&gt;
    ....&lt;br /&gt;
    &amp;lt;plugin&gt;&lt;br /&gt;
        &amp;lt;groupId&gt;nl.gridshore.maven.plugin&amp;lt;/groupId&gt;&lt;br /&gt;
        &amp;lt;artifactId&gt;maven-copy-site-plugin&amp;lt;/artifactId&gt;&lt;br /&gt;
        &amp;lt;configuration&gt;&lt;br /&gt;
            &amp;lt;outputDirectory&gt;${artifactsDir}&amp;lt;/outputDirectory&gt;&lt;br /&gt;
        &amp;lt;/configuration&gt;&lt;br /&gt;
    &amp;lt;/plugin&gt;            &lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
If you are having problems, the sample is available at:&lt;br /&gt;
http://svn.javaforge.com/svn/Equinox_Student_Registration_Sample/trunk/registrations&lt;br /&gt;
&lt;br /&gt;
Beware that browsing source code from the javaforge website does not work very well, it does not refresh.&lt;br /&gt;
&lt;br /&gt;
Hope this helps, please drop me a comment if it does help or if you are heving problems. 
    </content:encoded>

    <pubDate>Fri, 03 Feb 2006 20:29:34 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/46-guid.html</guid>
    
</item>
<item>
    <title>Cobertura and maven</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/45-Cobertura-and-maven.html</link>
            <category>Java</category>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/45-Cobertura-and-maven.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=45</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=45</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Today I was experimenting with maven. I wanted to add code coverage. Ofcourse I start thinking about cobertura immediately. So I dived into cobertura and maven integration. It became kind of an experience. I know a lot more about maven now. I have to figure out some stuff, but for now it is good enough. This entry gives some steps to help you get up to speed with cobertura.&lt;br /&gt;
&lt;br /&gt;
1. Install maven 2&lt;br /&gt;
&lt;a href=&quot;http://maven.apache.org/guides/getting-started/index.html&quot;  title=&quot;quick start guide maven&quot;&gt;quick start guide maven&lt;/a&gt;&lt;br /&gt;
2. Create an application that knows how to handle the goals package and site.&lt;br /&gt;
see the quick start guide&lt;br /&gt;
3. The fun part begins : compile and install your own cobertura plugin.&lt;br /&gt;
Download the sources from the codehaus subversion repository. You can use the following url to download them anonymously with a tool like &lt;a href=&quot;http://tortoisesvn.tigris.org/&quot; &gt;tortoisesvn&lt;/a&gt;&lt;br /&gt;
https://svn.codehaus.org/mojo/trunk/mojo/mojo-sandbox/cobertura-maven-plugin&lt;br /&gt;
Then you have the sources. Now you need to alter the pom of that project to be able to check for latest versions. See the &lt;a href=&quot;http://mojo.codehaus.org/using-sandbox-plugins.html&quot; &gt;guide on the plugins website&lt;/a&gt;.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
&amp;lt;repositories&gt;&lt;br /&gt;
  &amp;lt;repository&gt;&lt;br /&gt;
    &amp;lt;id&gt;Maven Snapshots&amp;lt;/id&gt;&lt;br /&gt;
    &amp;lt;url&gt;http://snapshots.maven.codehaus.org/maven2/&amp;lt;/url&gt;&lt;br /&gt;
    &amp;lt;snapshots&gt;&lt;br /&gt;
      &amp;lt;enabled&gt;true&amp;lt;/enabled&gt;&lt;br /&gt;
    &amp;lt;/snapshots&gt;&lt;br /&gt;
    &amp;lt;releases&gt;&lt;br /&gt;
      &amp;lt;enabled&gt;false&amp;lt;/enabled&gt;&lt;br /&gt;
    &amp;lt;/releases&gt;&lt;br /&gt;
  &amp;lt;/repository&gt;&lt;br /&gt;
&amp;lt;/repositories&gt;&lt;br /&gt;
&amp;lt;pluginRepositories&gt;&lt;br /&gt;
  &amp;lt;pluginRepository&gt;&lt;br /&gt;
    &amp;lt;id&gt;Maven Snapshots&amp;lt;/id&gt;&lt;br /&gt;
    &amp;lt;url&gt;http://snapshots.maven.codehaus.org/maven2/&amp;lt;/url&gt;&lt;br /&gt;
    &amp;lt;snapshots&gt;&lt;br /&gt;
      &amp;lt;enabled&gt;true&amp;lt;/enabled&gt;&lt;br /&gt;
    &amp;lt;/snapshots&gt;&lt;br /&gt;
    &amp;lt;releases&gt;&lt;br /&gt;
      &amp;lt;enabled&gt;false&amp;lt;/enabled&gt;&lt;br /&gt;
    &amp;lt;/releases&gt;&lt;br /&gt;
  &amp;lt;/pluginRepository&gt;&lt;br /&gt;
&amp;lt;/pluginRepositories&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Issue the following command for the cobertura-maven-plugin project you have just downloaded and altered.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
mvn install&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Now you are ready for the next step&lt;br /&gt;
&lt;br /&gt;
4. Configure the pom.xml of your project to create the cobertura report.&lt;br /&gt;
There are two aspects, first you need to add the plugin to the build part, then to the reports part. See the &lt;a href=&quot;http://mojo.codehaus.org/cobertura-maven-plugin/usage.html&quot; &gt;usage page&lt;/a&gt; of the plugin home page&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
&amp;lt;build&gt;&lt;br /&gt;
  &amp;lt;plugins&gt;&lt;br /&gt;
    &amp;lt;plugin&gt;&lt;br /&gt;
      &amp;lt;groupId&gt;org.codehaus.mojo&amp;lt;/groupId&gt;&lt;br /&gt;
      &amp;lt;artifactId&gt;cobertura-maven-plugin&amp;lt;/artifactId&gt;&lt;br /&gt;
      &amp;lt;executions&gt;&lt;br /&gt;
        &amp;lt;execution&gt;&lt;br /&gt;
          &amp;lt;goals&gt;&lt;br /&gt;
            &amp;lt;goal&gt;clean&amp;lt;/goal&gt;&lt;br /&gt;
          &amp;lt;/goals&gt;&lt;br /&gt;
        &amp;lt;/execution&gt;&lt;br /&gt;
      &amp;lt;/executions&gt;&lt;br /&gt;
    &amp;lt;/plugin&gt;  	&lt;br /&gt;
  &amp;lt;/plugins&gt;&lt;br /&gt;
&amp;lt;/build&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
&amp;lt;reporting&gt;&lt;br /&gt;
  &amp;lt;plugins&gt;&lt;br /&gt;
    &amp;lt;plugin&gt;&lt;br /&gt;
      &amp;lt;groupId&gt;org.codehaus.mojo&amp;lt;/groupId&gt;&lt;br /&gt;
      &amp;lt;artifactId&gt;cobertura-maven-plugin&amp;lt;/artifactId&gt;&lt;br /&gt;
    &amp;lt;/plugin&gt;&lt;br /&gt;
  &amp;lt;/plugins&gt;&lt;br /&gt;
&amp;lt;/reporting&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
5. Run the site goal and start browsing your coverage files.&lt;br /&gt;
This is where I am having problems, it does work but you must do some parts alone. First I will give you what works, then I will give you what I am having problems with.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
mvn clean package cobertura:cobertura&lt;br /&gt;
mvn site&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The first thing that gives problems is doing the code coverage on the top project that does not have sources itself. An error due to the fact that target/classes is missing is thrown. The second problem I have is that I cannot do the two commands at once, there is a class loading issue.&lt;br /&gt;
&lt;br /&gt;
I want to emphasize that this is a beginners perspective. The issues I am having might not be the complete truth. If you now more, or if I find out more, I will revise this part.&lt;br /&gt;
&lt;br /&gt;
You can find the sources at my &lt;a href=&quot;http://www.javaforge.com/proj/summary.do?proj_id=71&quot; &gt;sample project&lt;/a&gt; at javaforge.&lt;br /&gt;
&lt;b&gt;resources&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://mojo.codehaus.org/source-repository.html&quot; &gt;http://mojo.codehaus.org/source-repository.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://cobertura.sf.net&quot; &gt;http://cobertura.sf.net&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mojo.codehaus.org/cobertura-maven-plugin&quot; &gt;http://mojo.codehaus.org/cobertura-maven-plugin&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 29 Jan 2006 13:55:55 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/45-guid.html</guid>
    
</item>
<item>
    <title>ExtremeComponents: a nice taglibrary</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/41-ExtremeComponents-a-nice-taglibrary.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/41-ExtremeComponents-a-nice-taglibrary.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=41</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=41</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    A few years ago I was using the DisplayTag library, a very nice library I must add. When doing some coding for a project I had to many records to be in the table. Therefore I used the pagination, that is the moment I ran into problems. I wanted to do the paginations via the hibernate dataaccess layer. The current DisplayTag library does not support that. There are some samples with the HEAD version, I could not get the building process with maven to work. Therefore I started to look around and found a very nice component:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://extremecomponents.org/extremesite/welcome.jsp&quot;&gt;http://extremecomponents.org/extremesite/welcome.jsp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This library includes a very nice view, good paginations backed by server components you can easily write yourself. Therefore I am writing this item, just to show you all how easy it is to do pagination and filtering of your objects in a nicely formatted table.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;The jsp&lt;/h3&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
1.  &amp;lt;ec:table &lt;br /&gt;
2.      id=&quot;orderstable&quot;&lt;br /&gt;
3.      items=&quot;orders&quot;&lt;br /&gt;
4.      action=&quot;${ctx}/listOrders.html&quot;&lt;br /&gt;
5.      imagePath=&quot;${ctx}/images/table/*.gif&quot;&lt;br /&gt;
6.      title=&quot;&quot;&lt;br /&gt;
7.      width=&quot;100%&quot;&lt;br /&gt;
8.      var=&quot;order&quot;&lt;br /&gt;
9.      retrieveRowsCallback=&quot;org.extremecomponents.table.callback.LimitCallback&quot;&lt;br /&gt;
10.    filterRowsCallback=&quot;org.extremecomponents.table.callback.LimitCallback&quot;&lt;br /&gt;
11.    sortRowsCallback=&quot;org.extremecomponents.table.callback.LimitCallback&quot;&lt;br /&gt;
12.    showPagination=&quot;true&quot;&lt;br /&gt;
13. &gt;&lt;br /&gt;
14.    &amp;lt;ec:row &lt;br /&gt;
15.        highlightRow=&quot;true&quot; &lt;br /&gt;
16.        onclick=&quot;javascript:document.location.href=&#039;${ctx}/editOrderOverview.html?id=${pageScope.order.id}&#039;&quot;&gt;&lt;br /&gt;
17.            &amp;lt;ec:column property=&quot;id&quot; title=&quot;order.id&quot;&gt;&lt;br /&gt;
18.                &amp;lt;a  href=&quot;${ctx}/editOrderOverview.html?id=${pageScope.order.id}&quot;&gt;&lt;br /&gt;
19.                    ${pageScope.order.id}&lt;br /&gt;
20.                &amp;lt;/a&gt;&lt;br /&gt;
21.            &amp;lt;/ec:column&gt;&lt;br /&gt;
22.            &amp;lt;ec:column property=&quot;status&quot; title=&quot;order.status&quot;  cell=&quot;nl.primatras.backoffice.web.help.StatusCellView&quot; filterable=&quot;false&quot; sortable=&quot;false&quot;/&gt;&lt;br /&gt;
23.            &amp;lt;ec:column property=&quot;orderId&quot; title=&quot;order.orderid&quot; filterable=&quot;false&quot; sortable=&quot;false&quot;/&gt;&lt;br /&gt;
24.            &amp;lt;ec:column property=&quot;customer.lastname&quot; title=&quot;person.lastname&quot;/&gt;&lt;br /&gt;
25.            &amp;lt;ec:column property=&quot;customer.address.city&quot; title=&quot;address.city&quot;/&gt;&lt;br /&gt;
26.            &amp;lt;ec:column property=&quot;createdate&quot; title=&quot;order.createdate&quot; format=&quot;dd-MM-yyyy (HH:mm)&quot; cell=&quot;date&quot; filterable=&quot;false&quot;/&gt;&lt;br /&gt;
27.        &amp;lt;/ec:row&gt;&lt;br /&gt;
28.    &amp;lt;/ec:table&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
Actually, I think this is a lot of code, so let&#039;s step through it. Lines 9-11 take care of using an external pagination, filtering and sorting. The LimitCallback is used for that purpose. Line 8 shows you the name that can be used as the current item. Have a look at line 19, here you can see we use the &lt;b&gt;order&lt;/b&gt; property to obtain the current value for the field &lt;b&gt;order.id&lt;/b&gt;. Other interesting stuff, you can switch off filtering and sorting for each column, you can easily format a date field, and you can create your own cell formatters as well. Line 22 shows you how to define them in the jsp. We will show you the code for the formatter as well. But first we&#039;ll show you the spring controller that calls the appropriate service.&lt;br /&gt;
&lt;h3&gt;The spring controller&lt;/h3&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
...&lt;br /&gt;
1. Limit limit = LimitFactory.createInstanceOfLimit(request, &quot;ec&quot;);&lt;br /&gt;
2. LimitFactory.setLimitFilterAndSortAttr(limit);&lt;br /&gt;
3. LimitFactory.setLimitPageAndRowAttr(limit, DEFAULT_ROWS_DISPLAYED, DEFAULT_ROWS_DISPLAYED);&lt;br /&gt;
...&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
I am having problems getting this to work, the second instance of &lt;i&gt;DEFAULT_ROWS_DISPLAYED&lt;/i&gt; should be the value from the drop down list that lets you choose the number of items to display.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
...&lt;br /&gt;
1. if (limit.getFilterSet().isFiltered()) {&lt;br /&gt;
2.     Filter[] filters = limit.getFilterSet().getFilters();&lt;br /&gt;
3.     for (Filter filter : filters) {&lt;br /&gt;
4.         String property = filter.getProperty();&lt;br /&gt;
5.         String value = filter.getValue();&lt;br /&gt;
6.         BeanUtils.copyProperty(searchOrder,property,value);&lt;br /&gt;
7.     }&lt;br /&gt;
8. }&lt;br /&gt;
...&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The Jakarta Bean-Utils package is used to set the values from the filters into the object that is send to the search service. If you enter a value in the lastname box, the searchOrder object will receive this value for lastname so that you can use it in your data access component. The next part of source code does something simular for the ordering.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
...&lt;br /&gt;
1. QueryResultsOrder orderBy = null;&lt;br /&gt;
2. if (limit.getSort().getProperty() != null) {&lt;br /&gt;
3.     orderBy = new QueryResultsOrder();&lt;br /&gt;
4.     orderBy.setOrderByProperty(limit.getSort().getProperty());&lt;br /&gt;
5.     orderBy.setDirection(limit.getSort().getSortOrder());&lt;br /&gt;
6. }&lt;br /&gt;
...&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
We created a special object called &lt;b&gt;QueryResultsOrder&lt;/b&gt; to hold the field for sorting and the direction in one object. &lt;br /&gt;
Now you have all the data to call your service and put back the following to items in the request.&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
...&lt;br /&gt;
request.setAttribute(&quot;orders&quot;,orders.getOrders());&lt;br /&gt;
request.setAttribute(&quot;totalRows&quot;,orders.getTotalNumberOrders());&lt;br /&gt;
...&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The last part I promised is the formatting of the cell. There is a BaseCell class that you can extend. The only method you need to overwiter is the &lt;b&gt;html()&lt;/b&gt; method. There are a lot of utility methods. This method could look like this.&lt;br /&gt;
&lt;h3&gt;StatusCellView extends BaseCell&lt;/h3&gt;&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
1. public String html() {&lt;br /&gt;
2.     HtmlBuilder htmlBuilder = new HtmlBuilder();&lt;br /&gt;
3.     Object value = column.getValue();&lt;br /&gt;
4.     String spanClass = getSpanClass(value);&lt;br /&gt;
5.     htmlBuilder.append(startTD());&lt;br /&gt;
6.     htmlBuilder.span().styleClass(spanClass).close();&lt;br /&gt;
7.     htmlBuilder.append(value.toString());&lt;br /&gt;
8.     htmlBuilder.spanEnd();&lt;br /&gt;
9.     htmlBuilder.append(endTD());&lt;br /&gt;
10.   return htmlBuilder.toString();&lt;br /&gt;
11.}&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
The &lt;b&gt;HtmlBuilder&lt;/b&gt; object is used to append all html elements to. Line 4 obtains the style sheet class for the span element to create. Line 6 adds the span element and sets the style attribute class. The span element is also closed in line 6, this way the next text is added after the opening span element. This is done in line 7, and in line 8 the closing span element is added. Actually that is all there is to it. Sounds fun doesn&#039;t it?&lt;br /&gt;
&lt;br /&gt;
Hope this helps some of you to get a quick start into the &lt;b&gt;eXtremeComponents&lt;/b&gt; 
    </content:encoded>

    <pubDate>Mon, 09 Jan 2006 22:05:11 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/41-guid.html</guid>
    
</item>
<item>
    <title>Google analytics</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/37-Google-analytics.html</link>
            <category>Technology</category>
            <category>Websites&amp;products</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/37-Google-analytics.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=37</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=37</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    A few weeks a go I started using &lt;a href=&quot;http://www.google.com/analytics&quot;  title=&quot;Google analytics&quot;&gt;google analytics&lt;/a&gt;. What a cool tool. You can gather a lot of information about the usage of your website. Some very nice graphs are produced as well. Have a look at their website for more info. At the moment you cannot start using your own statistics. There were to many request, so they had to stop new requests from coming in for a while. Some of the statistics for my website.&lt;br /&gt;
&lt;br /&gt;
Browsers used : Firefox 57%, ie 37%, Safari 4%, Opera 4%&lt;br /&gt;
Platform : windows 85%, linux 12%&lt;br /&gt;
Screen resolution : 1024x768 34%, 1280x1024 33%&lt;br /&gt;
&lt;br /&gt;
Other interesting information is that most people find my website via google, some of the words most people search for are : &lt;br /&gt;
acegi&lt;br /&gt;
spring&lt;br /&gt;
ajax&lt;br /&gt;
&lt;br /&gt;
Other good referers are the forum of springframework and the websites of the products that I use:&lt;br /&gt;
&lt;a href=&quot;http://www.s9y.org/&quot;  title=&quot;Serendipity&quot;&gt;Serendipity&lt;/a&gt;, &lt;a href=&quot;http://www.pmwiki.org/&quot;  title=&quot;Pmwiki&quot;&gt;Pmwiki&lt;/a&gt;, and &lt;a href=&quot;http://www.minibb.net/&quot;  title=&quot;MiniBB&quot;&gt;MiniBB&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Most of you reed the blog, I guess this information changes the most. Reminds me that I want to start using the wiki for more thorough articles. But time is also limited for me &lt;img src=&quot;http://www.gridshore.nl/blog/templates/gridshore/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;. If people drill down into a blog subject, most of the time it is the item about &lt;a href=&quot;index.php?/archives/29-Doing-ajax-with-ajaxtags-and-springframework.html&quot;  title=&quot;ajaxtags&quot;&gt;ajaxtags&lt;/a&gt;. Other articles you are interested in are : &lt;a href=&quot;index.php?/archives/8-Using-Hsqldb-with-your-java-development.html&quot;  title=&quot;hsql and java&quot;&gt;hsql and java&lt;/a&gt; and &lt;a href=&quot;index.php?/archives/5-Creating-an-rss-feed-with-spring-and-Rome.html&quot;  title=&quot;rss and rome with spring&quot;&gt;rss and rome with spring&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Interesting stuff, Google analytics, next time I will show you some of the graphs. 
    </content:encoded>

    <pubDate>Tue, 29 Nov 2005 09:16:12 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/37-guid.html</guid>
    
</item>
<item>
    <title>Using springframework to send an email with streaming attachment</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/36-Using-springframework-to-send-an-email-with-streaming-attachment.html</link>
            <category>Springframework</category>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/36-Using-springframework-to-send-an-email-with-streaming-attachment.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=36</wfw:comment>

    <slash:comments>5</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=36</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    For a customer of mine I had another fine problem to resolve. He must send an email with a csv file as an attachment to his transport partner. The content for the csv file come from the database. Creating a string that has the contents for the file is easy, it would also be fairly easy to create a file, store it on the file system and add the file as an attachment. There is however one problem; I do not need the file after it has been attached to the email and send. &lt;br /&gt;
&lt;br /&gt;
I started lookin at the api&#039;s of springframework related to email. It is not that hard to find some code that looks like the following to create the email to be sent:&lt;br /&gt;
&lt;br /&gt;
1. MimeMessage message = getJavaMailSender().createMimeMessage();&lt;br /&gt;
2. MimeMessageHelper helper = new MimeMessageHelper(message,true);&lt;br /&gt;
3. helper.setFrom(&quot;from@gridshore.nl&quot;);&lt;br /&gt;
4. helper.setTo(&quot;to@gridshore.nl&quot;);&lt;br /&gt;
5. helper.setText(&quot;Text of the email&quot;);&lt;br /&gt;
6. helper.setSubject(&quot;attachment mail sample&quot;);&lt;br /&gt;
&lt;br /&gt;
Now for the fun part, how can we attach a generated csv file to the email without storing it on th efile system first.&lt;br /&gt;
&lt;br /&gt;
7. InputStream attach = new ByteArrayInputStream(mailMessage.getBytes());&lt;br /&gt;
8. StreamAttachmentDataSource datasource = new StreamAttachmentDataSource(attach,&quot;attachment&quot;, &quot;txt/plain&quot;);&lt;br /&gt;
9. helper.addAttachment(attachmentName,datasource);&lt;br /&gt;
10.getJavaMailSender().send(message);&lt;br /&gt;
&lt;br /&gt;
The fun part is in line 8, you must create a custom implementation for the &lt;b&gt;org.springframework.core.io.AbstractResource&lt;/b&gt;. This resource must convert an inputstream to an attachment. The code for this class looks like this:&lt;br /&gt;
&lt;br /&gt;
public class StreamAttachmentDataSource extends AbstractResource {&lt;br /&gt;
&amp;#160;	private final static Log logger = LogFactory.getLog(StreamAttachmentDataSource.class);&lt;br /&gt;
&amp;#160;	private ByteArrayOutputStream outputStream;&lt;br /&gt;
&amp;#160;	private String name;&lt;br /&gt;
&amp;#160;	private String contentType;&lt;br /&gt;
	&lt;br /&gt;
&amp;#160;	public StreamAttachmentDataSource(InputStream inputStream, String name,&lt;br /&gt;
&amp;#160;			String contentType) {&lt;br /&gt;
&amp;#160;		this.outputStream = new ByteArrayOutputStream();&lt;br /&gt;
&amp;#160;		this.name = name;&lt;br /&gt;
&amp;#160;		this.contentType = contentType;&lt;br /&gt;
		&lt;br /&gt;
&amp;#160;		int read;&lt;br /&gt;
&amp;#160;		byte[] buffer = new byte[256];&lt;br /&gt;
&amp;#160;        try {&lt;br /&gt;
&amp;#160;			while((read = inputStream.read(buffer)) != -1) {&lt;br /&gt;
&amp;#160;				getOutputStream().write(buffer, 0, read);&lt;br /&gt;
&amp;#160;			}&lt;br /&gt;
&amp;#160;		} catch (IOException e) {&lt;br /&gt;
&amp;#160;			logger.error(&quot;Cannot create inputstream for mail attachment&quot;);&lt;br /&gt;
&amp;#160;			throw new AddAttachmentMailException(&quot;error.technical.mail.attachment&quot;);&lt;br /&gt;
&amp;#160;		}&lt;br /&gt;
&amp;#160;	}&lt;br /&gt;
	&lt;br /&gt;
&amp;#160;	public String getDescription() {&lt;br /&gt;
&amp;#160;		return &quot;Stream resource used for attachments&quot;;&lt;br /&gt;
&amp;#160;	}&lt;br /&gt;
&lt;br /&gt;
&amp;#160;	public InputStream getInputStream() throws IOException {&lt;br /&gt;
&amp;#160;		return new ByteArrayInputStream(this.outputStream.toByteArray());&lt;br /&gt;
&amp;#160;	}&lt;br /&gt;
&lt;br /&gt;
&amp;#160;	public String getContentType() {&lt;br /&gt;
&amp;#160;		return contentType;&lt;br /&gt;
&amp;#160;	}&lt;br /&gt;
&lt;br /&gt;
&amp;#160;	public String getName() {&lt;br /&gt;
&amp;#160;		return name;&lt;br /&gt;
&amp;#160;	}&lt;br /&gt;
&lt;br /&gt;
&amp;#160;	public ByteArrayOutputStream getOutputStream() {&lt;br /&gt;
&amp;#160;		return outputStream;&lt;br /&gt;
&amp;#160;	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The hard part is not in the code, it is in finding the right code &lt;img src=&quot;http://www.gridshore.nl/blog/templates/gridshore/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;. What makes this a spring sample? I did use a number of utility classes from spring:&lt;br /&gt;
MimeMessageHelper - helps you with creating the mail message, a lot of try catch blocks less than with the standard way.&lt;br /&gt;
AbstractResource - This is a convenience class for creating your custom resources&lt;br /&gt;
JavaMailSender - Used to send messages that cannot be send as a SimpleMailMessage, implementation of th MailSender interface. 
    </content:encoded>

    <pubDate>Tue, 22 Nov 2005 22:46:42 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/36-guid.html</guid>
    
</item>
<item>
    <title>problems while upgrading sample from acegi 0.8.3 to 0.9.0</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/35-problems-while-upgrading-sample-from-acegi-0.8.3-to-0.9.0.html</link>
            <category>acegi</category>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/35-problems-while-upgrading-sample-from-acegi-0.8.3-to-0.9.0.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=35</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=35</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Today I did an upgrade of acegi for my sample application. Ofcourse there are a lot of resources about upgrading. There is an entry on the homepage of &lt;a href=&quot;http://acegisecurity.sf.net&quot;  title=&quot;acegi&quot;&gt;acegi&lt;/a&gt; and the blog from &lt;a href=&quot;http://jroller.com/page/raible?entry=how_to_upgrade_from_acegi&quot;  title=&quot;Matt Raible ~ upgrading acegi&quot;&gt;Matt Raible&lt;/a&gt;. These are my findings.&lt;br /&gt;
&lt;br /&gt;
I have a CustomJdbcDaoImpl class, I used to obtain the granted authorities with the following lines of code:&lt;br /&gt;
&lt;br /&gt;
PersonDetails person = (PersonDetails) users.get(0);&lt;br /&gt;
List dbAuths = getAuthoritiesByUsernameMapping().execute(person.getUsername());&lt;br /&gt;
if (dbAuths.size() == 0) {&lt;br /&gt;
&amp;#160;   throw new UsernameNotFoundException(&quot;User has no GrantedAuthority&quot;);&lt;br /&gt;
}&lt;br /&gt;
GrantedAuthority[] arrayAuths = {};&lt;br /&gt;
addCustomAuthorities(person.getUsername(), dbAuths);&lt;br /&gt;
&lt;br /&gt;
There is however a problem with the method &#039; getAuthoritiesByUsernameMapping()&#039;, this does not exist anymore in the 0.9.0 acegi version.&lt;br /&gt;
&lt;b&gt;To be continued&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The following change is getting a secure context. With the new version we use the following code to obtain a secure context:&lt;br /&gt;
SecurityContextHolder.getContext()&lt;br /&gt;
&lt;br /&gt;
There is an issue with the events as well, there are now two main events, one for authentication and one for authorization:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;bean id=&quot;authenticationLoggerListener&quot; class=&quot;net.sf.acegisecurity.event.authentication.LoggerListener&quot;/&gt;&lt;br /&gt;
&amp;lt;bean id=&quot;authorizationLoggerListener&quot; class=&quot;net.sf.acegisecurity.event.authorization.LoggerListener&quot;/&gt;&lt;br /&gt;
&lt;br /&gt;
I also had to change my SecurityEventListener, the names of the events are changed, the code now looks like this:&lt;br /&gt;
public void onApplicationEvent(ApplicationEvent event) {&lt;br /&gt;
&amp;#160;        if (event instanceof AuthenticationFailureBadCredentialsEvent) {&lt;br /&gt;
&amp;#160;        	AuthenticationFailureBadCredentialsEvent authEvent = (AuthenticationFailureBadCredentialsEvent) event;&lt;br /&gt;
&amp;#160;          securityManager.disablePerson(((User)authEvent.getAuthentication().getPrincipal()).getUsername());&lt;br /&gt;
&amp;#160;        }&lt;br /&gt;
&amp;#160;        if (event instanceof AuthenticationSuccessEvent) {&lt;br /&gt;
&amp;#160;        	AuthenticationSuccessEvent authEvent = (AuthenticationSuccessEvent) event;&lt;br /&gt;
&amp;#160;        securityManager.savePersonLastLoggedOn(((User)authEvent.getAuthentication().getPrincipal()).getUsername());&lt;br /&gt;
&amp;#160;        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
And finally, since my tag for authentication is now within the project I removed all the customized code for my custom taglibrary. See earliar posts if you want to know what I am talking about.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 21 Nov 2005 22:40:11 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/35-guid.html</guid>
    
</item>
<item>
    <title>Doing ajax with ajaxtags and springframework</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/29-Doing-ajax-with-ajaxtags-and-springframework.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/29-Doing-ajax-with-ajaxtags-and-springframework.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=29</wfw:comment>

    <slash:comments>13</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=29</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Today I created a nice autocomplete box with ajax and springframework. In my backoffice application I want to be able to select a product for an orderline. The moment I start typing valid options should be retreived from the database. Since I am creating a spring mvc application, so the ajax stuff must be incorporated into the spring application.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;What did I use?&lt;/h2&gt;&lt;br /&gt;
I used the &lt;a href=&quot;http://ajaxtags.sourceforge.net/&quot;  title=&quot;ajaxtags&quot;&gt;ajaxtag project&lt;/a&gt; libraries and spring framework to do the ajax stuff. There are a few things to do, I am not going to give a lot of detais, have a look at the samples for a more thorough sample.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;jsp to show form&lt;/h2&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
1. &amp;lt;input type=&quot;text&quot; &lt;br /&gt;
2.   name=&quot;neworderlineproductshortcode&quot; &lt;br /&gt;
3.   id=&quot;neworderlineproductshortcode&quot; &lt;br /&gt;
4.   value=&quot;&quot; &lt;br /&gt;
5.   size=&quot;10&quot; &lt;br /&gt;
6.   class=&quot;form-autocomplete&quot; &lt;br /&gt;
7.   onkeypress=&quot;if (event.keyCode==13) return false;&quot;/&gt;&lt;br /&gt;
8. &amp;lt;input type=&quot;text&quot; &lt;br /&gt;
9.   name=&quot;neworderlineproductshortcodename&quot; &lt;br /&gt;
10.  id=&quot;neworderlineproductshortcodename&quot; &lt;br /&gt;
11.  value=&quot;&quot; &lt;br /&gt;
12.  size=&quot;40&quot; &lt;br /&gt;
13.  readonly=&quot;readonly&quot; &lt;br /&gt;
14.  class=&quot;readonly&quot;/&gt;&lt;br /&gt;
15.&lt;br /&gt;
16.&amp;lt;ajax:autocomplete&lt;br /&gt;
17.  source=&quot;neworderlineproductshortcode&quot;&lt;br /&gt;
18.  target=&quot;neworderlineproductshortcodename&quot;&lt;br /&gt;
19.  baseUrl=&quot;${ctx}/autocompleteProduct.html&quot;&lt;br /&gt;
20.  className=&quot;autocomplete&quot;&lt;br /&gt;
21.  parameters=&quot;neworderlineproductshortcode={neworderlineproductshortcode}&quot;&lt;br /&gt;
22.  progressStyle=&quot;throbbing&quot;&lt;br /&gt;
23.  minimumCharacters=&quot;1&quot; /&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
The code is just like the example, do have a look at line 7, this is a work around to make the enter key work. Actually this is all there is to it to make the ajax part work at the client. Pretty cool stuff. This image shows the webpage this autocomplete is on.&lt;br /&gt;
&lt;br /&gt;
&lt;img width=&#039;600&#039; height=&#039;490&#039; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://www.gridshore.nl/blog/uploads/autocompletescreendump.jpg&quot; alt=&quot;screendump autocomplete&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Where does spring come in?&lt;/h2&gt;&lt;br /&gt;
From the line number 19 in the previous code sample we can see that the view &#039;autocompleteProduct.html&#039; is used to get the ajax popup. We use an abstract controller that gathers the products from the service layer. Then it returns a ModelAndView to the following class:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
1. package nl.primatras.backoffice.web.view;&lt;br /&gt;
2.&lt;br /&gt;
3. import java.util.List;&lt;br /&gt;
4. import java.util.Map;&lt;br /&gt;
5. &lt;br /&gt;
6. import javax.servlet.ServletOutputStream;&lt;br /&gt;
7. import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
8. import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
9.&lt;br /&gt;
10.import nl.primatras.backoffice.domain.Product;&lt;br /&gt;
11.&lt;br /&gt;
12.import org.ajaxtags.helpers.AjaxXmlBuilder;&lt;br /&gt;
13.import org.springframework.web.servlet.view.AbstractView;&lt;br /&gt;
14.&lt;br /&gt;
15.public class AutocompleteProductsView extends AbstractView {&lt;br /&gt;
16.&lt;br /&gt;
17.	protected void renderMergedOutputModel(Map model,&lt;br /&gt;
18.			HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;
19.			throws Exception {&lt;br /&gt;
20.         response.setContentType(&quot;text/xml&quot;);&lt;br /&gt;
21.	    response.setHeader(&quot;Cache-Control&quot;, &quot;no-cache&quot;);&lt;br /&gt;
22.&lt;br /&gt;
23.	    List&lt;Product&gt; products = (List)model.get(&quot;products&quot;);&lt;br /&gt;
24.	    &lt;br /&gt;
25.	    String xml = new AjaxXmlBuilder().addItems(products,&quot;shortCode&quot;,&quot;name&quot;).toString();&lt;br /&gt;
26.	    &lt;br /&gt;
27.         ServletOutputStream out = response.getOutputStream();&lt;br /&gt;
28.         out.print(xml);&lt;br /&gt;
29.         out.close();&lt;br /&gt;
30.	}&lt;br /&gt;
31.&lt;br /&gt;
32.}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Interesting lines in this source code are:&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;20, ajax wants to have xml content to do his thing, so set the content type for the response.&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;25, create an xml string with the help of the AjaxXmlBuilder utility class.&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
Actually that is all there is to it. 
    </content:encoded>

    <pubDate>Tue, 08 Nov 2005 21:00:21 +0100</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/29-guid.html</guid>
    
</item>
<item>
    <title>Creating an rss feed with spring and Rome</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/5-Creating-an-rss-feed-with-spring-and-Rome.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/5-Creating-an-rss-feed-with-spring-and-Rome.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=5</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=5</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Today I wanted to have a different way of using my application besides the plain jsp pages. Suddenly it struck me, i wanted an rss feed. I fired up my friend google and found the project &lt;a href=&quot;http://wiki.java.net/bin/view/Javawsxml/Rome&quot;&gt;Rome&lt;/a&gt;. It did not look that hard by browsing the sample applications. I also found a sample how you could use a servlet. Oke, the step to a spring implementation was not that hard. This blog item will talk you through the creation of a new view in Spring mvc, an &lt;b&gt;RSS feed&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
First you need to download &lt;a href=&quot;http://wiki.java.net/bin/view/Javawsxml/Rome&quot;&gt;Rome&lt;/a&gt; and ,a href=&quot;http://www.jdom.org&quot;&gt;jdom&lt;/a&gt;. After downloading them, add the jars to the lib folder of your web project. (I am not going to discuss in detail how to setup your spring web mvc project, I have used the &lt;a href=&quot;https://equinox.dev.java.net/&quot;&gt;equinox&lt;/a&gt; project as a startup)&lt;br /&gt;
&lt;br /&gt;
Before we can create a class that generates an rss feed, we need to configure spring. We must be able to find the view class.&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;Add a urlMapping to the spring config file&lt;/li&gt;&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;prop key=&quot;/rss.html&quot;&gt;rssController&amp;lt;/prop&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;li&gt; Add the rssController bean, in my case this was just a controller that creates a java.util.List with orders and places it on the request&lt;/li&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
-- action-servlet.xml --&lt;br /&gt;
&amp;lt;bean id=&quot;rssController&quot; class=&quot;nl.primatras.backoffice.web.OrderController&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;toView&quot; value=&quot;rss&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;numOrders&quot; value=&quot;25&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;orderManager&quot; ref=&quot;orderManager&quot;/&gt;&lt;br /&gt;
&amp;lt;/bean&gt;&lt;br /&gt;
&lt;br /&gt;
-- OrderController.java --&lt;br /&gt;
protected ModelAndView handleRequestInternal(HttpServletRequest request,&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;HttpServletResponse response) throws Exception {&lt;br /&gt;
&amp;#160;&amp;#160;List orders = orderManager.listOrders(0,getNumOrders());&lt;br /&gt;
&amp;#160;&amp;#160;return new ModelAndView(this.getToView(),&quot;orders&quot;,orders);&lt;br /&gt;
}&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;li&gt;Add a viewResolver to the views.properties file&lt;/li&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
rss.class=nl.primatras.backoffice.web.view.RssOrderView&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;li&gt;Implement the View class, this is discussed in the remainder of this blog item. The class I created RssOrderView is a subclass of springs AbstractView&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
Creating a feed with Rome is as simple as instantiating a new Feed object, setting the rss type and the content type, creating a feed output, and outputting the output. See the next code for the steps.&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
SyndFeed feed = getFeed(orders,baseUrl); // use a private method to get the feed&lt;br /&gt;
&lt;br /&gt;
String feedType = request.getParameter(FEED_TYPE);&lt;br /&gt;
feedType = (feedType!=null) ? feedType : DEFAULT_FEED_TYPE;&lt;br /&gt;
feed.setFeedType(feedType); // set the type of the rss feed to output&lt;br /&gt;
&lt;br /&gt;
response.setContentType(getContentType()); // Set the content type of the response object to be returned to the clinet.&lt;br /&gt;
&lt;br /&gt;
SyndFeedOutput output = new SyndFeedOutput(); // Create the outputter&lt;br /&gt;
output.output(feed,response.getWriter()); // write the feed to the output&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
A feed consists of a few properties like: author, title, description, etc. It also contains a List with items. These items are called entries. For my sample I created the entries based on a list of orders I obtained through the OrderController by taking the list from the request. Each order becomes an entry. Some important parts are below.&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
SyndFeed feed = new SyndFeedImpl();&lt;br /&gt;
feed.setAuthor(getMessageSourceAccessor().getMessage(&quot;order.feed.author&quot;));&lt;br /&gt;
feed.setTitle(getMessageSourceAccessor().getMessage(&quot;order.feed.title&quot;));&lt;br /&gt;
feed.setDescription(getMessageSourceAccessor().getMessage(&quot;order.feed.description&quot;));&lt;br /&gt;
feed.setLink(contextPath);&lt;br /&gt;
       &lt;br /&gt;
List&lt;SyndEntry&gt; entries = new ArrayList&lt;SyndEntry&gt;();&lt;br /&gt;
for (Order order : orders) {&lt;br /&gt;
&amp;#160;&amp;#160;String entryTitle = order.getCustomer().getLastname();&lt;br /&gt;
&amp;#160;&amp;#160;String entryLink = contextPath + getOrderOverviewView() +&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&quot;?id=&quot; + order.getId();&lt;br /&gt;
&amp;#160;&amp;#160;String entryDescription = order.toString();&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;entries.add(createEntry(entryTitle,entryLink,entryDescription,order.getCreatedate()));&lt;br /&gt;
}&lt;br /&gt;
       &lt;br /&gt;
feed.setEntries(entries);&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
And finally the method to create an entry based on an order:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
private SyndEntry createEntry (String title, String link, String description,&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;Date createDate) {&lt;br /&gt;
&amp;#160;&amp;#160;SyndEntry entry = new SyndEntryImpl();&lt;br /&gt;
&amp;#160;&amp;#160;entry.setTitle(title);&lt;br /&gt;
&amp;#160;&amp;#160;entry.setLink(link);&lt;br /&gt;
&amp;#160;&amp;#160;entry.setPublishedDate(createDate);&lt;br /&gt;
       &lt;br /&gt;
&amp;#160;&amp;#160;SyndContent entryDescription = new SyndContentImpl();&lt;br /&gt;
&amp;#160;&amp;#160;entryDescription.setType(&quot;text/plain&quot;);&lt;br /&gt;
&amp;#160;&amp;#160;entryDescription.setValue(description);&lt;br /&gt;
       &lt;br /&gt;
&amp;#160;&amp;#160;entry.setDescription(entryDescription);&lt;br /&gt;
       &lt;br /&gt;
&amp;#160;&amp;#160;return entry;&lt;br /&gt;
}&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
I hope this will help some of you to create a spring view object and start your own rss feed. You can download the complete class &lt;a href=&quot;http://www.gridshore.nl/zips/RssOrderView.java&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An improved base class for this class is now included in the &lt;a href=&quot;https://springmodules.dev.java.net/&quot;  title=&quot;Springmodules&quot;&gt;Springmodules&lt;/a&gt; project. You can find it &lt;a href=&quot;https://springmodules.dev.java.net/source/browse/springmodules/projects/springmvc-extra/src/java/org/springmodules/web/servlet/view/AbstractRssView.java?rev=1.1&amp;view=markup&quot;  title=&quot;here&quot;&gt;here&lt;/a&gt; 
    </content:encoded>

    <pubDate>Sun, 18 Sep 2005 20:58:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/5-guid.html</guid>
    
</item>
<item>
    <title>Code coverage with cobertura and luntbuild</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/12-Code-coverage-with-cobertura-and-luntbuild.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/12-Code-coverage-with-cobertura-and-luntbuild.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=12</wfw:comment>

    <slash:comments>9</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=12</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Yesterday I was reading other blogs and I came across a code coverage product. About 2 years ago I also was looking for a free opensource code coverage tool. It was GroboCodeCoverage that I found. This tool just did not cut it for me. To much effort to get it to work for my kind of architecture, which consits of multiple projects. Each layer has it&#039;s own project (web,business,domain,data access). And I ran into performance problems very often. So when I heard about another framework I wanted to give it a try. Since I am using luntbuild as a build manager, I also want to integrate the results into luntbuild. The integration must be simular to the junit integration.&lt;br /&gt;
&lt;br /&gt;
Now what is that tool I am talking about? I am talking about &lt;a href=&quot;http://cobertura.sourceforge.net/&quot;&gt;cobertura&lt;/a&gt;. Via the faq of cobertura I also found &lt;a href=&quot;http://emma.sourceforge.net/&quot;&gt;emma&lt;/a&gt;. I choose Cobertura for the easy installation and use, but most of all for the way the reports are created. I like them much more than the reports of emma. I the future I do want to have a look at emma to see if performance is different for the tools.&lt;br /&gt;
&lt;br /&gt;
Sorry for the long introduction, now we are going to install and use cobertura. First I installed version 1.4, but I ran into problems while using it with multiple components into one project. You have to merge the result files of the coverage measurements. This only worked correct in the latest greatest cvs version.&lt;br /&gt;
&lt;br /&gt;
Have a look at another blog item of mine that gives you a better option of presenting the link to the reports : &lt;a href=&quot;http://www.gridshore.nl/blog/index.php?/archives/51-Extending-luntbuild-ognl-possibilities.html&quot;  title=&quot;extending luntbuild with cobertura reports&quot;&gt;extending luntbuild with cobertura reports&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockqoute&gt;&lt;br /&gt;
cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/cobertura login&lt;br /&gt;
(Just hit enter for the password)&lt;br /&gt;
cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/cobertura checkout -P cobertura&lt;br /&gt;
&lt;/blockqoute&gt;&lt;br /&gt;
cd into the cobertura directory and run ant with the coverage jar options&lt;br /&gt;
&lt;blockqoute&gt;&lt;br /&gt;
ant coverage jar&lt;br /&gt;
&lt;/blockqoute&gt;&lt;br /&gt;
This creates a cobertura.jar file.&lt;br /&gt;
&lt;br /&gt;
Before we can use ant we need to add some jars to the ant lib folder. These jars come with the cobertura sources.&lt;br /&gt;
jakarta-oro-2.0.8.jar asm-2.0.jar log4j-1.2.9.jar java-getopt-1.0.9.jar ccl.jar javancss.jar&lt;br /&gt;
&lt;br /&gt;
Now we need to configure our ant build scripts so that the instrumentation (changing the byte code of the classes) takes place. After that we need to run the unit test with the correct classpath and finally run the reports task of cobertura. How does this look in our build script:&lt;br /&gt;
&lt;br /&gt;
&lt;blockqoute&gt;&lt;br /&gt;
&amp;lt;taskdef classpath=&quot;cobertura.jar&quot; resource=&quot;tasks.properties&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;target name=&quot;compiletest&quot; description=&quot;Compile all test code, and instrument classes for coverage&quot;&gt;&lt;br /&gt;
  ... omitted code to compile test cases for clarity ...&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;cobertura-instrument todir=&quot;${dir.component.coverage.instrument}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;ignore regex=&quot;util.*&quot; /&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.component.build}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;exclude name=&quot;**/Test*&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;**/*.class&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/cobertura-instrument&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;copy todir=&quot;${dir.component.coverage.src}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.component.src.java}&quot; includes=&quot;**/*.java&quot; /&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/copy&gt;&lt;br /&gt;
&amp;lt;/target&gt;	&lt;br /&gt;
&lt;/blockqoute&gt;&lt;br /&gt;
This block of code instruments all classes in the build folder except for the test cases, in the end the sources are copied to a central directory. The sources are used to show you the lines that have test coverage. This is a work around, a next release will enable you to have multiple source directories in the report task.&lt;br /&gt;
&lt;br /&gt;
The classes are instrumented, now we must put them on the unit test classpath, we also need the cobertura.jar file at runtime on the classpath.&lt;br /&gt;
&lt;blockqoute&gt;&lt;br /&gt;
&amp;lt;junit printsummary=&quot;on&quot; fork=&quot;true&quot; forkmode=&quot;once&quot; haltonfailure=&quot;false&quot; failureproperty=&quot;test.failed&quot; showoutput=&quot;true&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;sysproperty key=&quot;net.sourceforge.cobertura.datafile&quot; file=&quot;${basedir}/cobertura.ser&quot; /&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;pathelement path=&quot;${dir.component.coverage.instrument}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;path refid=&quot;project.classpath&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;pathelement path=&quot;${compiler.classpath}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;pathelement path=&quot;${dir.component.build}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.component.lib}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;*.jar&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;formatter type=&quot;xml&quot; usefile=&quot;true&quot;/&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;batchtest todir=&quot;${dir.project.junit.report}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.component.src.test}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;**/Test*.java&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/batchtest&gt;&lt;br /&gt;
&amp;lt;/junit&gt;&lt;br /&gt;
&lt;/blockqoute&gt;&lt;br /&gt;
Important in this code are the sysproperty tag, this helps the unit test to find the just data file. Another important thing is to put the instrumented classes on the classpath before the normal classes. The directory for instrumented classes is obtained via the property ${dir.component.coverage.instrument}. The cobertura.jar file is in the lib folder ${dir.project.lib} that is added to the classpath via the project.classpath.&lt;br /&gt;
&lt;br /&gt;
After all unit tests have been executed we have cobertura.ser files for all components. We first need to make one data file and then run reports on this merged datafile. This is done by the following piece of script.&lt;br /&gt;
&lt;blockqoute&gt;&lt;br /&gt;
&amp;lt;target name=&quot;test&quot; depends=&quot;distribution,runtests&quot; description=&quot;Runs the junit report&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
  ... omitted code to execute junitreport for clarity ...&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;cobertura-merge&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${basedir}/&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;*/cobertura.ser&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/cobertura-merge&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;cobertura-report srcdir=&quot;${dir.project.coverage.src}&quot; destdir=&quot;${coverageHtmlReportDir}&quot;/&gt;&lt;br /&gt;
&amp;lt;/target&gt;&lt;br /&gt;
&lt;/blockqoute&gt;&lt;br /&gt;
Important in this code is the merge tag, this looks at all subfolders for cobertura.ser files and merges these into a new cobertura.ser file. Another important part for luntbuild integration is the parameter ${coverageHtmlReportDir}. The value for this parameter is provided by luntbuild and gives the location for storing the report files.&lt;br /&gt;
&lt;br /&gt;
The next image gives an example of the report that is created for my sample application:&lt;br /&gt;
[img]/images/ScreenshotCoverageReport.png[/img]&lt;br /&gt;
Now we want those coverage reports in luntbuild. For starter, this can propobly be done different in the meaning of correct. What I have done is a hack, but for me it works. Have a look at another blogitem of mine for a better way of &lt;a href=&quot;http://www.gridshore.nl/blog/index.php?/archives/51-Extending-luntbuild-ognl-possibilities.html&quot;  title=&quot;better ways of integrating cobertura reports and luntbuild&quot;&gt;integrating the cobertura reports and luntbuild&lt;/a&gt;. Actually there is two things we should do:&lt;br /&gt;
1. Place the report files in the correct directory, this is done by ant but we need to pass the right parameter plus value.&lt;br /&gt;
2. Show a link on the website that directs to the coverage report.&lt;br /&gt;
&lt;br /&gt;
Lets start with the first item, this can be done by configuring the builder. Open your luntbuild project configuration. Go to the builder tab and put an extra variable in the Build properties box:&lt;br /&gt;
&lt;blockqoute&gt;&lt;br /&gt;
coverageHtmlReportDir=&quot;${build.publishDir}/coverage_html_report&quot;&lt;br /&gt;
&lt;/blockqoute&gt;&lt;br /&gt;
This parameter is used by ant to find the luntbuil publish directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we want to add a link to the luntbuild Build view page. This done by adding some lines to the file LUNTBUILD_HOME/WEB-INF/BuildViewer.html&lt;br /&gt;
&lt;blockqoute&gt;&lt;br /&gt;
... more here ...&lt;br /&gt;
&amp;lt;td width=&quot;10%&quot; align=&quot;center&quot; class=&quot;buildTitleRight&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;span jwcid=&quot;@Conditional&quot; condition=&quot;ognl:junitHtmlReport!=null&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;span jwcid=&quot;@GenericLink&quot; href=&quot;ognl:&#039;statefulPublish/coverage_html_report/index.html&#039;&quot; title=&quot;coverage report&quot;&gt;&lt;br /&gt;
        coverage report&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/span&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/span&gt;&lt;br /&gt;
&amp;lt;/td&gt;&lt;br /&gt;
&amp;lt;td width=&quot;10%&quot; align=&quot;center&quot; class=&quot;buildTitleRight&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;span jwcid=&quot;@Conditional&quot; condition=&quot;ognl:junitHtmlReport!=null&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;span jwcid=&quot;@GenericLink&quot; href=&quot;ognl:&#039;statefulPublish/&#039;+ junitHtmlReport&quot; title=&quot;junit report&quot;&gt;junit report&amp;lt;/span&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/span&gt;&lt;br /&gt;
&amp;lt;/td&gt;&lt;br /&gt;
... more here ...&lt;br /&gt;
&lt;/blockqoute&gt;&lt;br /&gt;
I copied the td for junit, what I wanted was an extra parameter coverageHtmlReport. I did not figure out how to do just that. The following image shows what it is looking like.&lt;br /&gt;
&lt;img src=&quot;/images/ScreenshotLuntbuild.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
In reply to a question in the comments I have added the complete build.xml files as well. The project I am using cobertura for has modular design. Therefore there is one main build.xml file that is the starting point. There is another build.xml file that contains the generic targets used by the modules. Finally every module has it&#039;s own build.xml file.&lt;br /&gt;
&lt;a href=&quot;http://www.gridshore.nl/blog/uploads/build-main.xml&quot; title=&quot;build-main.xml&quot; target=&quot;_blank&quot;&gt;build-main.xml&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gridshore.nl/blog/uploads/build-targets.xml&quot; title=&quot;build-targets.xml&quot; target=&quot;_blank&quot;&gt;build-targets.xml&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gridshore.nl/blog/uploads/build.xml&quot; title=&quot;build.xml&quot; target=&quot;_blank&quot;&gt;build.xml&lt;/a&gt;&lt;br/&gt; 
    </content:encoded>

    <pubDate>Tue, 21 Jun 2005 23:22:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/12-guid.html</guid>
    
</item>
<item>
    <title>Installing linux fedora 4 on IBM laptop (T41p) (part 2)</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/14-Installing-linux-fedora-4-on-IBM-laptop-T41p-part-2.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/14-Installing-linux-fedora-4-on-IBM-laptop-T41p-part-2.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=14</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=14</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    I did have a blog entry about installing linux ob my laptop. Now fedora core 4 is released and there were some issues with my last installation. Therefore I had to do it again. After reading my own post i did not find it very intuitive. Therefore I make another post with only the commands that I used to get wireless to work.&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi&lt;br /&gt;
&lt;br /&gt;
# yum install sharutils&lt;br /&gt;
# export COPTS=&quot;$COPTS -DSOFTLED&quot;&lt;br /&gt;
# make&lt;br /&gt;
# make install&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Create the following file:&lt;br /&gt;
/etc/sysconfig/network-scripts/ifcfg-ath0&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
# Atheros Communications, Inc. AR5212 802.11abg NIC&lt;br /&gt;
DEVICE=ath0&lt;br /&gt;
ONBOOT=no&lt;br /&gt;
BOOTPROTO=dhcp&lt;br /&gt;
USERCTL=yes&lt;br /&gt;
PEERDNS=yes&lt;br /&gt;
TYPE=Wireless&lt;br /&gt;
ESSID=&lt;br /&gt;
CHANNEL=1&lt;br /&gt;
MODE=Managed&lt;br /&gt;
RATE=Auto&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Then add the following line to /etc/modprobe.conf:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
alias ath0 ath_pci&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Now open the network settings:&lt;br /&gt;
Desktop &gt; System settings &gt; Network&lt;br /&gt;
&lt;br /&gt;
Edit the wireless device and connect to your network&lt;br /&gt;
&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;check the &#039;activate device when system starts&#039; option in the general tab&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Wireless tab, specify a SSID an the key.&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;Add a hostname to the dnstab, this prevents gnome from giving a strange message about adding a name to the hosts file.&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
Activate the wireless network card and save the configuration.&lt;br /&gt;
&lt;br /&gt;
That did the trick for me.&lt;br /&gt;
&lt;br /&gt;
If you have improvements or just comments, please feel free to add a comment to this blog item. 
    </content:encoded>

    <pubDate>Wed, 15 Jun 2005 23:38:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/14-guid.html</guid>
    
</item>
<item>
    <title>Installing linux fedora 4 on IBM laptop (T41p)</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/15-Installing-linux-fedora-4-on-IBM-laptop-T41p.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/15-Installing-linux-fedora-4-on-IBM-laptop-T41p.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=15</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=15</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Today I have installed fedora core 4 on my ibm laptop. Most was working fine out of the box. I am having some problems finding utlities, but the command line works fine.&lt;br /&gt;
&lt;br /&gt;
I was having some issues with my wireless network, but these are resolved now. Since this can be an issue for others as well I do want to share my experience with you.&lt;br /&gt;
&lt;br /&gt;
The first thing you need to do is find a good website, oke try this one for instance:&lt;br /&gt;
http://www.niemueller.de/wiki/?ThinkpadT41pWithFC3&lt;br /&gt;
&lt;br /&gt;
When following this guideline there was an issue with uudecode. This is not installed per default in fedora. Therefore you need to install these libraries. I found the right command on another website:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
yum install sharutils&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
the website is: (beware, tough to read for some of us)&lt;br /&gt;
http://wiki.nothing.sh/page/ThinkPad/Fedora%20Core%204&lt;br /&gt;
&lt;br /&gt;
Then you probably know that your laptop has a small light for wireless activity. This can be turned on by issuing the following command before you run make:&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
export COPTS=&quot;$COPTS -DSOFTLED&quot;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
Found that on the website:&lt;br /&gt;
http://vsharma.net/thinkpad-t41p-fedora-core1/&lt;br /&gt;
&lt;br /&gt;
Thats all, run make and make install and connect to your network. 
    </content:encoded>

    <pubDate>Mon, 13 Jun 2005 23:40:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/15-guid.html</guid>
    
</item>
<item>
    <title>Continuous Integration and Luntbuild</title>
    <link>http://www.gridshore.nl/blog/index.php?/archives/19-Continuous-Integration-and-Luntbuild.html</link>
            <category>Technology</category>
    
    <comments>http://www.gridshore.nl/blog/index.php?/archives/19-Continuous-Integration-and-Luntbuild.html#comments</comments>
    <wfw:comment>http://www.gridshore.nl/blog/wfwcomment.php?cid=19</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.gridshore.nl/blog/rss.php?version=2.0&amp;type=comments&amp;cid=19</wfw:commentRss>
    

    <author>nospam@example.com (Jettro Coenradie)</author>
    <content:encoded>
    Yesterday was a Continuous Integration day. I am pretty familiar with tools like apache &lt;a href=&quot;http://ant.apache.org&quot;&gt;ant&lt;/a&gt; and &lt;a href=&quot;http://cruisecontrol.sf.net&quot;&gt;Cruisecontrol&lt;/a&gt;. But these tools just don&#039;t cut it. I don&#039;t like the website that you use with cruisecontrol and &lt;a href=&quot;http://maven.apache.org&quot;&gt;Maven&lt;/a&gt; is becoming more popular every day. Then I read that &lt;a href=&quot;http://www.pmease.com/luntbuild/&quot;&gt;Luntbuild&lt;/a&gt; had a new release. I have been experimenting with Luntbuild in the past and thought about giving it another go.&lt;br /&gt;
&lt;br /&gt;
First I needed to install luntbuild. There is an install guideline for dummies on the wiki. According to the guideline I installed tomcat (version 4.1.31), that is really not to hard. Then you should use the installer for luntbuild (version 1.2), this isn&#039;t working on my windows Xp. There is an issue with the script, uses a jar command that is not working out of the box, probably a hole in my knowledge. Then I downloaded the zipped version, altered the web.xml and applicationContext.xml files. I replaced some placeholders with real values&lt;br /&gt;
&lt;br /&gt;
web.xml - installDir, added the real path to the installation directory of luntbuild&lt;br /&gt;
applicationContext.xml - inMemoryAuthenticationDAO, changed the placeholder of the password for luntbuild user&lt;br /&gt;
&lt;br /&gt;
For simplicity I used winzip to create the war file from the luntbuild/web directory. Then go to the tomcat manager website and upload the warfile. Then everything should be working and you should be able to logon to the luntbuild website.&lt;br /&gt;
&lt;br /&gt;
Now what? I have a website then can manage builds. I think I need a build first and to create a build you first need a project. The last few days I have been experimenting with springframework. In order to store the results I created a project at tigris.org, drop me an email if you want to have access to the website. This website uses Subversion as a Repository.&lt;br /&gt;
&lt;br /&gt;
Oke, now I have a project and I need a build that luntbuild can execute. I did have a look at maven, but I feel more confortable with ant. I created the following build.xml file.&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&amp;lt;project name=&quot;SpringSample&quot; default=&quot;compile&quot; basedir=&quot;.&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;dir.src&quot; value=&quot;src&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;dir.build&quot; value=&quot;build&quot; /&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;dir.dist&quot; value=&quot;dist&quot; /&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;dir.lib&quot; value=&quot;lib&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;dir.test&quot; value=&quot;test&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;property name=&quot;build.junitHtmlReportDir&quot; value=&quot;report&quot;/&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;target name=&quot;prepare&quot; depends=&quot;clean&quot; description=&quot;Create output directories&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;mkdir dir=&quot;${dir.build}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;mkdir dir=&quot;${dir.dist}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;mkdir dir=&quot;${build.junitHtmlReportDir}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/target&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;target name=&quot;clean&quot; description=&quot;Remove all generated files&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;delete dir=&quot;${dir.build}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;delete dir=&quot;${dir.dist}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;delete dir=&quot;${build.junitHtmlReportDir}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/target&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;target name=&quot;compile&quot; depends=&quot;prepare&quot; description=&quot;Compile all source code&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;javac srcdir=&quot;${dir.src}&quot; destdir=&quot;${dir.build}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.lib}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;*.jar&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/javac&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/target&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;target name=&quot;jar&quot; depends=&quot;compile&quot; description=&quot;Generates the SpringSample.jar in the &#039;dist&#039; directory&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;jar jarfile=&quot;${dir.dist}/SpringSample.jar&quot; basedir=&quot;${dir.build}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/target&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;target name=&quot;compiletest&quot; description=&quot;Compile all test code&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;javac srcdir=&quot;${dir.test}&quot; destdir=&quot;${dir.build}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;pathelement path=&quot;${dir.build}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.lib}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;*.jar&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/javac&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/target&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;target name=&quot;test&quot; depends=&quot;compile,compiletest&quot; description=&quot;Runs all unit tests&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;junit printsummary=&quot;on&quot; fork=&quot;false&quot; haltonfailure=&quot;false&quot; failureproperty=&quot;test.failed&quot; showoutput=&quot;true&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;pathelement path=&quot;${dir.build}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.lib}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;*.jar&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/classpath&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;formatter type=&quot;xml&quot; usefile=&quot;true&quot;/&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;batchtest todir=&quot;${build.junitHtmlReportDir}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${dir.test}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;**/Test*.java&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/batchtest&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/junit&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;junitreport todir=&quot;${build.junitHtmlReportDir}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;fileset dir=&quot;${build.junitHtmlReportDir}&quot;&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;include name=&quot;TEST-*.xml&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/fileset&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;report format=&quot;frames&quot; todir=&quot;${junitHtmlReportDir}&quot;/&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;lt;/junitreport&gt;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;lt;/target&gt;&lt;br /&gt;
&amp;lt;/project&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
I am not going to explain it here, there are good resources to find on the web about ant. The hardest part for me to find (oke, it was time to go to bed) was the integration with junit and luntbuild. Things that are hard to find are often easy to do. Luntbuild can provide parameter values to the ant script. One of these parameters defined in the project is : junitHtmlReportDir. This parameter is used in the report tag to copy the results to.&lt;br /&gt;
&amp;lt;report format=&quot;frames&quot; todir=&quot;${junitHtmlReportDir}&quot;/&gt;&lt;br /&gt;
&lt;br /&gt;
Luntbuild can be used to send emails with information about the build. Another fine option is to send messages to a jabber account or an msn messenger. To bad I can not get the messenger part to work. Maybe this will go as is should in the next few days.&lt;br /&gt;
&lt;br /&gt;
There is a good manual for luntbuild on theire website.&lt;br /&gt;
&lt;br /&gt;
I like luntbuild, it is fairly easy to use, I do need to do some work on reports like cruisecontrol has though. The user interface is very nice and does what it should.  
    </content:encoded>

    <pubDate>Thu, 02 Jun 2005 23:49:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.gridshore.nl/blog/index.php?/archives/19-guid.html</guid>
    
</item>

</channel>
</rss>