<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Ancient Programming</title>
	
	<link>http://www.ancientprogramming.com</link>
	<description>What I encounter in my software part of life is in danger of being commented upon here</description>
	<pubDate>Thu, 12 Nov 2009 20:34:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AncientProgramming" /><feedburner:info uri="ancientprogramming" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Logging sql statements and parameters using hibernate</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/ytiOQkVrv2Q/</link>
		<comments>http://www.ancientprogramming.com/2009/11/12/logging-sql-statements-and-parameters-using-hibernate/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 20:32:44 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[how to]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[hibernate]]></category>

		<category><![CDATA[logdriver]]></category>

		<category><![CDATA[logging]]></category>

		<category><![CDATA[runtime]]></category>

		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/?p=33</guid>
		<description><![CDATA[


If you need to log sql statements using hibernate you can turn debug on for the org.hibernate.sql logger.
That will log all sql statement, but the actual parameter values will not be logged.
To log the values bound to the hibernate prepared statements, you can turn on trace for the org.hibernate.type logger.
Unfortunately (apparently because of perfomance) the [...]]]></description>
			<content:encoded><![CDATA[<p><div><script type="text/javascript"><!--
google_ad_client = "pub-3557368819388454";
/* 728x90, created 01/03/08 */
google_ad_slot = "3206414101";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>If you need to log sql statements using hibernate you can turn debug on for the org.hibernate.sql logger.<br />
That will log all sql statement, but the actual parameter values will not be logged.</p>
<p>To log the values bound to the hibernate prepared statements, you can turn on trace for the org.hibernate.type logger.</p>
<p>Unfortunately (apparently because of perfomance) the value of the org.hibernate.type logger is evaulated once in a static block, and cached, see:<a href="http://www.docjar.com/html/api/org/hibernate/type/EnumType.java.html" target="_blank"> EnumType.java</a>.</p>
<p>That prevents you from turning the log on and off during runtime using a simple jsp page like the <a href="http://ananthkannan.blogspot.com/2009/10/how-to-change-log-levels-on-fly-using.html" target="_blank">log4jAdmin.jsp</a>. Note that if it were possible you still had to add trace to the page as debug is currently the lowest value.</p>
<p>Of course there must be a reason why the hibernate implementation are caching the value of the org.hibernate.type logger, but I believe it is still valuable to be able to turn on sql logging with parameters at runtime.</p>
<p>For that purpose I came across the <a href="http://rkbloom.net/logdriver/" target="_blank">logDriver</a>. A simple database driver written by Ryan Bloom, that is wrapping an existing jdbc driver.</p>
<p>To use the logdriver all you have to do is set the driver and connection url as follows:</p>
<p>driver:net.rkbloom.logdriver.LogDriver<br />
url:jdbc:log_real_driver_class:real_jdbc_connection_url</p>
<p>Now you can turn on logging by setting the net.rkbloom.logdriver logger to debug.</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/ytiOQkVrv2Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2009/11/12/logging-sql-statements-and-parameters-using-hibernate/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2009/11/12/logging-sql-statements-and-parameters-using-hibernate/</feedburner:origLink></item>
		<item>
		<title>Any good maven support for Google Appengine?</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/XS_2mtQk0Nc/</link>
		<comments>http://www.ancientprogramming.com/2009/06/05/any-good-maven-support-for-google-appengine/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 14:18:44 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[java]]></category>

		<category><![CDATA[maven]]></category>

		<category><![CDATA[appengine]]></category>

		<category><![CDATA[google-appengine]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/?p=29</guid>
		<description><![CDATA[Yesterday I created a appengine project testing the JPA/Spring/Wicket stack.
This was created using the build.xml file found in the appengine documentation. It all worked fine, but I would like to build my project using maven so I started looking for a good maven plugin.
I found this blog talking about what features a good plugin should [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I created a appengine project testing the JPA/Spring/Wicket stack.</p>
<p>This was created using the <a href="http://code.google.com/appengine/docs/java/tools/ant.html">build.xml </a>file found in the appengine documentation. It all worked fine, but I would like to build my project using maven so I started looking for a good maven plugin.</p>
<p>I found this <a href="http://www.sonatype.com/people/2009/04/my-google-app-engine-maven-plugin-wishlist/">blog</a> talking about what features a good plugin should contain and a guy from the <a href="http://www.kindleit.net/">kindleit</a> company claiming that they actually had implemented a <a href="http://code.google.com/p/maven-gae-plugin">maven-gae-plugin</a> capable of executing most of these tasks.</p>
<p>Unfortunately I ran into several problems using this plugin, hence I have created an <a href=" http://code.google.com/p/maven-gae-plugin/issues/detail?id=4">issue</a>.</p>
<p>Untill these tasks in the issue has been fixed I would like to use another plugin.<br />
Can anybody guide me in the direction of a more stable plugin?</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/XS_2mtQk0Nc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2009/06/05/any-good-maven-support-for-google-appengine/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2009/06/05/any-good-maven-support-for-google-appengine/</feedburner:origLink></item>
		<item>
		<title>Howto setup smooth ssh access</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/w4YIxA8c3iU/</link>
		<comments>http://www.ancientprogramming.com/2008/10/24/howto-setup-smooth-ssh-access/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 20:59:21 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[how to]]></category>

		<category><![CDATA[ssh]]></category>

		<category><![CDATA[.ssh/config]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/10/24/howto-setup-smooth-ssh-access/</guid>
		<description><![CDATA[


Everytime I have a new machine or a new ssh access to setup I forgot how to configure the access so I don&#8217;t have to type the username each time (if I login with a different user).
At the same time I would like to use a private rsa key. So here goes a note to [...]]]></description>
			<content:encoded><![CDATA[<p><!-- WSA: ad in context square-right not shown: too many ads -->Everytime I have a new machine or a new ssh access to setup I forgot how to configure the access so I don&#8217;t have to type the username each time (if I login with a different user).<br />
At the same time I would like to use a private rsa key. So here goes a note to myself and other scatter brains <img src='http://www.ancientprogramming.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Instead of always have to type username and password like this:</p>
<pre>[jeyben@machine ~]$ ssh username@www.ancientprogramming.com
Password:
Last login: Fri Oct 24 16:31:03 2008 from somewhere
[username@servername ~]$</pre>
<p>I would like to just do the following:</p>
<pre>[jeyben@machine ~]$ ssh ancientprogramming
Last login: Fri Oct 24 16:31:03 2008 from somewhere
[username@servername ~]$</pre>
<h3>Create and use a public/private key pair</h3>
<p><strong>Client</strong></p>
<pre>$ ssh-keygen -t rsa
$ scp ~/.ssh/id_rsa.pub www.ancientprogramming.com:~</pre>
<p><strong>Server</strong></p>
<pre>$ cat ~/id_rsa.pub &gt;&gt; .ssh/authorized_keys</pre>
<h3>Modify .ssh/config</h3>
<pre>Host ancientprogramming
  User &lt;username&gt;
  Port 22
  HostName www.ancientprogramming.com
  LocalForward 3307 localhost:3306 (setup a localforward for the default mysql port)</pre>
<p><!-- WSA: ad in context leaderboard not shown: too many ads --></p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/w4YIxA8c3iU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/10/24/howto-setup-smooth-ssh-access/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/10/24/howto-setup-smooth-ssh-access/</feedburner:origLink></item>
		<item>
		<title>Fixedformat4j now supports primitive datatypes as well as innerclasses</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/uKx7UXjCuZk/</link>
		<comments>http://www.ancientprogramming.com/2008/10/16/fixedformat4j-now-supports-primitive-datatypes-as-well-as-innerclasses/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 19:02:49 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[fixedformat4j]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/10/16/fixedformat4j-now-supports-primitive-datatypes-as-well-as-innerclasses/</guid>
		<description><![CDATA[Support for primitive datatypes is added to the latest 1.2.1 release of fixedformat4j. I would like to thank Marcos Lois Bermúdez for contributing with this extension. The latest release can be downloaded here.
The same 1.2.1 release also fixed the bug that made it impossible to use annotate and format static nested classes and inner classes
The [...]]]></description>
			<content:encoded><![CDATA[<p>Support for primitive datatypes is added to the latest 1.2.1 release of fixedformat4j. I would like to thank Marcos Lois Bermúdez for contributing with this extension. The latest release can be downloaded <a href="http://code.google.com/p/fixedformat4j/downloads/list">here</a>.</p>
<p>The same 1.2.1 release also fixed the bug that made it impossible to use annotate and format static nested classes and inner classes</p>
<p>The complete <a href="http://fixedformat4j.ancientprogramming.com/changes-report.html">changelist</a> can be found on the <a href="http://fixedformat4j.ancientprogramming.com/">project website</a>.</p>
<p>In a few days the release should be available from ibiblio.</p>
<p>I encourage all users of fixedformat4j to contribute or create <a href="http://code.google.com/p/fixedformat4j/issues/list">issues</a> if they find a bug or would like new features to be added.<br />
<!-- WSA: ad in context leaderboard not shown: too many ads --></p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/uKx7UXjCuZk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/10/16/fixedformat4j-now-supports-primitive-datatypes-as-well-as-innerclasses/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/10/16/fixedformat4j-now-supports-primitive-datatypes-as-well-as-innerclasses/</feedburner:origLink></item>
		<item>
		<title>Automatically reconnect to NAS under Mac OS X</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/blTDPxJZHf8/</link>
		<comments>http://www.ancientprogramming.com/2008/06/27/automatically-reconnect-to-nas-under-mac-os-x/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 21:21:20 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[how to]]></category>

		<category><![CDATA[mac]]></category>

		<category><![CDATA[automator]]></category>

		<category><![CDATA[connect]]></category>

		<category><![CDATA[nas]]></category>

		<category><![CDATA[os x]]></category>

		<category><![CDATA[reconnect]]></category>

		<category><![CDATA[remount]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/27/automatically-reconnect-to-nas-under-mac-os-x/</guid>
		<description><![CDATA[Mac OS X doesn&#8217;t remount network drives when booted. You have to do this yourselves.
You can easily automate this by creating an application using the automator and add it to your login items.

You automator script should contain two items:

Get Specified Servers
Connect to Servers

Save the script as an application and put it into login items for [...]]]></description>
			<content:encoded><![CDATA[<p>Mac OS X doesn&#8217;t remount network drives when booted. You have to do this yourselves.</p>
<p>You can easily automate this by creating an application using the automator and add it to your login items.</p>
<p style="text-align: center"><a href="http://www.ancientprogramming.com/wp-content/uploads/2008/06/automator-connect.gif" title="Automator - create application"><img src="http://www.ancientprogramming.com/wp-content/uploads/2008/06/automator-connect.gif" alt="Automator - create application" height="220" width="460" /></a></p>
<p>You automator script should contain two items:</p>
<ul>
<li>Get Specified Servers</li>
<li>Connect to Servers</li>
</ul>
<p>Save the script as an application and put it into login items for your user account. This will execute your small application each time you login and you should be reconnected to your NAS on startup.</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/blTDPxJZHf8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/06/27/automatically-reconnect-to-nas-under-mac-os-x/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/06/27/automatically-reconnect-to-nas-under-mac-os-x/</feedburner:origLink></item>
		<item>
		<title>Fixedformat4j 1.2.0 released</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/tkQbDV2v3H4/</link>
		<comments>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 21:07:44 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/</guid>
		<description><![CDATA[This evening I released a new version of fixedformat4j containing improved error reporting when failing to parse data using the FixedFormatManager.
The lack of good error reporting was a bit of a pain. It was not easy to see where in the parsing failed and it was not possible to get a complete list of format [...]]]></description>
			<content:encoded><![CDATA[<p>This evening I released a new version of fixedformat4j containing improved error reporting when failing to parse data using the FixedFormatManager.</p>
<p>The lack of good error reporting was a bit of a pain. It was not easy to see where in the parsing failed and it was not possible to get a complete list of format instructions.</p>
<p>A new ParseException is now thrown which contains the nessesary information.</p>
<p>See example of the new and improved stacktrace:</p>
<pre name="code" class="java">
com.ancientprogramming.fixedformat4j.format.ParseException: failed to parse 'barfooba' at offset 16 as java.util.Date from 'foobarfoobarfoobarfoobar'. Got format instructions from com.ancientprogramming.fixedformat4j.format.impl.MyRecord.getDateData. See details{FormatContext{offset=16, dataType=java.util.Date, formatter=com.ancientprogramming.fixedformat4j.format.impl.ByTypeFormatter}, FormatInstructions{length=8, alignment=LEFT, paddingChar=' ', fixedFormatPatternData=FixedFormatPatternData{pattern='yyyyMMdd'}, fixedFormatBooleanData=FixedFormatBooleanData{trueValue='T', falseValue='F'}, fixedFormatNumberData=FixedFormatNumberData{signing=NOSIGN, positiveSign='+', negativeSign='-'}, fixedFormatDecimalData=FixedFormatDecimalData{decimals=2, useDecimalDelimiter=false, decimalDelimiter='.'}}}
 at com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerImpl.readDataAccordingFieldAnnotation(FixedFormatManagerImpl.java:179)
 at com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerImpl.load(FixedFormatManagerImpl.java:70)</pre>
<p>Feel free to <a href="http://code.google.com/p/fixedformat4j/downloads/list">download</a> the latest version and take a look at the <a href="http://fixedformat4j.ancientprogramming.com/changes-report.html">changelist</a>.</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/tkQbDV2v3H4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/06/12/fixedformat4j-120-released/</feedburner:origLink></item>
		<item>
		<title>How to create macros for maven-site-plugin</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/Cxd9y0Ccpsw/</link>
		<comments>http://www.ancientprogramming.com/2008/06/05/how-to-create-macros-for-maven-site-plugin/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 20:16:20 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[how to]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[maven]]></category>

		<category><![CDATA[doxia]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[macro]]></category>

		<category><![CDATA[maven-site-plugin]]></category>

		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/05/how-to-create-macros-for-maven-site-plugin/</guid>
		<description><![CDATA[Many maven projects uses the maven site plugin to generate there documentation.
The maven-site-plugin uses the doxia to let authors write xdoc, apt and fml documents as the source for there project documentation. These written documents is processed by doxia to generate html and merged into the complete project site by the maven-site-plugin.
I found doxia and [...]]]></description>
			<content:encoded><![CDATA[<p><!-- WSA: ad in context square-right not shown: too many ads -->Many maven projects uses the maven site plugin to generate there documentation.</p>
<p>The maven-site-plugin uses the doxia to let authors write xdoc, apt and fml documents as the source for there project documentation. These written documents is processed by doxia to generate html and merged into the complete project site by the maven-site-plugin.</p>
<p>I found doxia and especially the apt language somehow lacking in functionality. I would like to use the <a href="http://code.google.com/p/syntaxhighlighter">syntaxhighlighter</a> to be able to highlight code examples on the <a href="http://fixedformat4j.ancientprogramming.com">fixedformat4j</a> project.</p>
<p>Doxia comes out-of-the-box with a <a href="http://maven.apache.org/doxia/macros/index.html">small bunch of macros</a> and you have the ability to write custom macros as well.</p>
<p><strong>Custom macro</strong><br />
<!-- WSA: ad in context leaderboard not shown: too many ads --><br />
I wrote a simple macro based on the core snippet macro:</p>
<p>pom.xml:</p>
<pre name="code" class="xml">
<project>
<parent>
    <groupid>org.apache.maven.doxia</groupid>
    <artifactid>doxia-modules</artifactid>
    <version>1.0-alpha-11</version>
  </parent>
  <modelversion>4.0.0</modelversion>
  <groupid>com.ancientprogramming.maven.doxia</groupid>
  <artifactid>doxia-module-syntaxhighlighter</artifactid>
  <version>1.0-alpha-11</version>
  <name>Doxia :: syntaxhighlighter</name>
  <build>
<plugins>
<plugin>
        <groupid>org.codehaus.plexus</groupid>
        <artifactid>plexus-maven-plugin</artifactid>
        <executions>
          <execution>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project></pre>
<p>Changes to the <a href="https://svn.apache.org/repos/asf/maven/doxia/doxia/tags/doxia-1.0-alpha-11/doxia-core/src/main/java/org/apache/maven/doxia/macro/snippet/SnippetMacro.java">snippet</a> plugin:</p>
<pre name="code" class="java">
...
  public void execute(Sink sink, MacroRequest request)
      throws MacroExecutionException {
    System.out.println("ancientprogramming - running execute");
    String id = (String) request.getParameter("id");

    required(id, "id");

    String urlParam = (String) request.getParameter("url");

    String fileParam = (String) request.getParameter("file");

    String codeParam = (String) request.getParameter("code");

    required(codeParam, "code");

    URL url;

    if (!StringUtils.isEmpty(urlParam)) {
      try {
        url = new URL(urlParam);
      }
      catch (MalformedURLException e) {
        throw new IllegalArgumentException(urlParam + " is a malformed URL");
      }
    } else if (!StringUtils.isEmpty(fileParam)) {
      File f = new File(fileParam);

      if (!f.isAbsolute()) {
        f = new File(request.getBasedir(), fileParam);
      }

      try {
        url = f.toURL();
      }
      catch (MalformedURLException e) {
        throw new IllegalArgumentException(urlParam + " is a malformed URL");
      }
    } else {
      throw new IllegalArgumentException("Either the 'url' or the 'file' param has to be given.");
    }

    StringBuffer snippet;

    try {
      snippet = getSnippet(url, id);
    }
    catch (IOException e) {
      throw new MacroExecutionException("Error reading snippet", e);
    }

   sink.rawText("... syntaxhighlighter prefix ...");
   sink.rawText(snippet.toString());
   sink.rawText("... syntaxhighlighter postfix ...");
}
...</pre>
<p>Note: wordpress obfuscates the above code where I wrote the syntax hightlighter pre and post fix. You can see what you actually should write at the <a href="http://code.google.com/p/syntaxhighlighter/">syntaxhighligther</a> project.</p>
<p><strong>Use custom macro</strong><br />
To be able to use the macro you have to add your macro as dependency to the maven-site-plugin:</p>
<pre name="code" class="xml">
<plugin>
  <groupid>org.apache.maven.plugins</groupid>
   <artifactid>maven-site-plugin</artifactid>
   <configuration>
     <templatedirectory>${basedir}/src/site</templatedirectory>
     <templatefile>src/site/fixedformat4j-template.vm</templatefile>
   </configuration>
   <dependencies>
    <dependency>
      <groupid>com.ancientprogramming.maven.doxia</groupid>
      <artifactid>doxia-module-syntaxhighlighter</artifactid>
      <version>1.0-alpha-11</version>
    </dependency>
  </dependencies>
</plugin></pre>
<p><!-- WSA: ad in context leaderboard not shown: too many ads --><br />
Now you can use the macro by writing the following in your apt files:</p>
<pre>%{code-snippet|id=basicusage|code=java|file=../../BasicUsageRecord.java}</pre>
<p><strong>Change your site template</strong><br />
Before the the source can be highlighted in your documentation you should add the syntaxhighlighter javascript and stylesheets to your template.<br />
See how to change your template <a href="http://maven.apache.org/plugins/maven-site-plugin/examples/templatefile.html">here</a>.</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/Cxd9y0Ccpsw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/06/05/how-to-create-macros-for-maven-site-plugin/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/06/05/how-to-create-macros-for-maven-site-plugin/</feedburner:origLink></item>
		<item>
		<title>Fixedformat4j scores well on sonar</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/PeCAZzco13E/</link>
		<comments>http://www.ancientprogramming.com/2008/06/05/fixedformat4j-scores-well-on-sonar/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 19:31:15 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[fixedformat4j]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[opensource]]></category>

		<category><![CDATA[sonar]]></category>

		<category><![CDATA[sonarsoftware]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/06/05/fixedformat4j-scores-well-on-sonar/</guid>
		<description><![CDATA[Today I found fixedformat4j was obtained at sonarsoftware and it was exciting to see that it scored  pretty well compared to some other very well known opensource projects like the commons series, some of the spring module and even the Apache Maven project.

I didn&#8217;t know sonar before today. They describe them as:
 Sonar is [...]]]></description>
			<content:encoded><![CDATA[<p>Today I found <a href="http://fixedformat4j.ancientprogramming.com/">fixedformat4j</a> was obtained at <a href="http://www.sonarsoftware.org/" target="_blank">sonarsoftware</a> and it was exciting to see that it scored  pretty well compared to some other very well known opensource projects like the commons series, some of the spring module and even the Apache Maven project.<br />
<!-- WSA: ad in context leaderboard not shown: too many ads --><br />
I didn&#8217;t know sonar before today. They describe them as:</p>
<blockquote><p> Sonar is an entreprise quality control tool, distributed under the terms of the GNU LGPL. Its basic purpose is to join existing continuous integration tools to place Java development projects under quality control.</p></blockquote>
<p>Even though the metrics at sonar doesn&#8217;t draw the complete picture on how good or mature a project is, it still gives a hint.</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/PeCAZzco13E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/06/05/fixedformat4j-scores-well-on-sonar/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/06/05/fixedformat4j-scores-well-on-sonar/</feedburner:origLink></item>
		<item>
		<title>Fixedformat4j 1.1.1 released</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/juXiFlbkoFc/</link>
		<comments>http://www.ancientprogramming.com/2008/05/30/fixedformat4j-111-released/#comments</comments>
		<pubDate>Fri, 30 May 2008 20:12:18 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[fixedformat4j]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[fixedformat4j-1.1.0]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/05/30/fixedformat4j-111-released/</guid>
		<description><![CDATA[We use fixedformat4j on my current project and I am developing fixedformat4j along the way. We have found the initial 1.0.0 release lacking in the ability to parse signed numbers like:
00011050+, that equals a two digit signed bigdecimal number 100.50

The fixedformatnumber annotation was introduced with the ability to add a signed attribute.
This is how you [...]]]></description>
			<content:encoded><![CDATA[<p>We use fixedformat4j on my current project and I am developing fixedformat4j along the way. We have found the initial 1.0.0 release lacking in the ability to parse signed numbers like:</p>
<p>00011050+, that equals a two digit signed bigdecimal number 100.50<br />
<!-- WSA: ad in context leaderboard not shown: too many ads --><br />
The fixedformatnumber annotation was introduced with the ability to add a signed attribute.</p>
<p>This is how you would annotate your method to be able to read and write a string like 000010050+:</p>
<pre name="code" class="java">
...
@Field(offset = 1, length = 10, align = Align.RIGHT, paddingChar = '0')
@FixedFormatDecimal(useDecimalDelimiter = true)
@FixedFormatNumber(sign = Sign.APPEND)
public BigDecimal getBigDecimalData() {
  return bigDecimalData;
}
...</pre>
<p>This was added in version 1.1.0, but some bugs was spotted and fixed so quickly a 1.1.1 version was released.</p>
<p>Feel free to <a href="http://code.google.com/p/fixedformat4j/downloads/list">download</a> the latest version and take a look at the <a href="http://fixedformat4j.ancientprogramming.com/changes-report.html">changelist</a>.</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/juXiFlbkoFc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/05/30/fixedformat4j-111-released/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/05/30/fixedformat4j-111-released/</feedburner:origLink></item>
		<item>
		<title>Fixedformat4j released!</title>
		<link>http://feedproxy.google.com/~r/AncientProgramming/~3/W4bRgWh_pz8/</link>
		<comments>http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/#comments</comments>
		<pubDate>Sun, 25 May 2008 21:09:16 +0000</pubDate>
		<dc:creator>Jacob von Eyben</dc:creator>
		
		<category><![CDATA[fixedformat4j]]></category>

		<category><![CDATA[java]]></category>

		<category />

		<category><![CDATA[api]]></category>

		<category><![CDATA[fixedformat]]></category>

		<guid isPermaLink="false">http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/</guid>
		<description><![CDATA[At my current project we decided to use fixedformat4j.
So after all your feedback on my recent draft implementation I have been working quite hard this weekend to get fixedformat4j shined up.
The implementation looks pretty much what Niels proposed here and I implemented support for bigdecimal as Bob wished. That means that javassist is gone and [...]]]></description>
			<content:encoded><![CDATA[<p><!-- WSA: ad in context square-right not shown: too many ads -->At my current project we decided to use <a href="http://fixedformat4j.ancientprogramming.com/">fixedformat4j</a>.<br />
So after all your feedback on my recent draft implementation I have been working quite hard this weekend to get fixedformat4j shined up.</p>
<p>The implementation looks pretty much what Niels proposed <a href="http://www.ancientprogramming.com/2008/03/17/fixedformat4j-api-bring-on-your-feedback/">here</a> and I implemented support for bigdecimal as Bob wished. That means that javassist is gone and fixedformat4j is now much less intrusive - you don&#8217;t have ti extend or implement anything to be able to load and export data.</p>
<p>You can see just how easy on the &#8220;getting started&#8221; at the <a href="http://fixedformat4j.ancientprogramming.com/">frontpage</a> of the project.</p>
<p>At this time of writing the api is only available through the <a href="http://code.google.com/p/fixedformat4j/downloads/list">download page</a>, but I have send a <a href="http://jira.codehaus.org/browse/MAVENUPLOAD-2077">maven upload request</a> so soon it will be available from ibiblio.</p>
<img src="http://feeds.feedburner.com/~r/AncientProgramming/~4/W4bRgWh_pz8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.ancientprogramming.com/2008/05/25/fixedformat4j-released/</feedburner:origLink></item>
	</channel>
</rss>
