<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Drop By! &#187; Java</title>
	<atom:link href="http://www.rekk.de/bloggy/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rekk.de/bloggy</link>
	<description>Dropping Brain Crumbs ...</description>
	<lastBuildDate>Wed, 09 Jun 2010 16:59:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Netbeans Font Size Settings in Ubuntu</title>
		<link>http://www.rekk.de/bloggy/2009/netbeans-font-size-setting-in-ubuntu/</link>
		<comments>http://www.rekk.de/bloggy/2009/netbeans-font-size-setting-in-ubuntu/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 15:31:57 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=144</guid>
		<description><![CDATA[(ubuntu 9.04 gnome, netbeans 6.5, Java 1.6) I assume you are familiar with: FaqNetbeansConf , Change the Font Size . Setting the font size of your editors is easy : Tools &#8211; Options &#8211; Font and Colors . If you want to change font size of the menues and panels of the GUI and you [...]]]></description>
			<content:encoded><![CDATA[<p>(ubuntu 9.04  gnome, netbeans 6.5, Java 1.6)</p>
<p>I assume you are familiar with: <a href="http://wiki.netbeans.org/FaqNetbeansConf">FaqNetbeansConf</a> , <a href="http://www.netbeans.org/kb/articles/netbeans-hacks-2.html#font-size">Change the Font Size</a> .</p>
<p>Setting the font size of your editors is easy : Tools &#8211; Options &#8211; Font and Colors .</p>
<p>If you want to change font size of the menues and panels of the GUI and you are using startup options<br />
<pre><pre>
--laf javax.swing.plaf.metal.MetalLookAndFeel
</pre></pre><br />
you can set the GUI font size:<br />
<pre><pre>
--fontsize 13
</pre></pre><br />
and it will work without any problems.</p>
<p>In case you are using the default GTK Theme you will find that the last option doesn&#8217;t change the font size of the menues. Here it helps to edit the ~/.gtkrc-2.0 configuration file:<br />
<pre><pre>
# This file was written by KDE
# You can edit it in the KDE control center, under &quot;GTK Styles and Fonts&quot;

include &quot;/usr/share/themes/Qt/gtk-2.0/gtkrc&quot;

style &quot;user-font&quot;
{
&nbsp;&nbsp;font_name=&quot;Verdana 11&quot;
}
widget_class &quot;*&quot; style &quot;user-font&quot;

gtk-theme-name=&quot;Qt&quot;
gtk-font-name=&quot;Verdana 11&quot;
</pre></pre><br />
Change entries like &#8220;Verdana 11&#8243; according to your needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2009/netbeans-font-size-setting-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PMD in Ant Problem &#8211; &#8220;Could not find class&#8221;</title>
		<link>http://www.rekk.de/bloggy/2008/pmd-in-ant-problem-could-not-find-class/</link>
		<comments>http://www.rekk.de/bloggy/2008/pmd-in-ant-problem-could-not-find-class/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 19:01:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[build management]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=117</guid>
		<description><![CDATA[(ant 1.7, pmd 4.2.4) I&#8217;ve recently tried to use PMD &#8211; sourcecode inspection tool in an ant powered build. Here is a basic example from a test in the build.xml of a Netbeans project (the pmd jar is located in ant&#8217;s home lib directory): &#60;target name=&#34;pmd&#34; depends=&#34;init&#34;&#62; &#60;!-- see http://pmd.sourceforge.net/ant-task.html --&#62; &#60;taskdef name=&#34;pmd&#34; classname=&#34;net.sourceforge.pmd.ant.PMDTask&#34;/&#62; &#60;mkdir [...]]]></description>
			<content:encoded><![CDATA[<p>(ant 1.7, pmd 4.2.4)</p>
<p>I&#8217;ve recently tried to use <a href="http://pmd.sourceforge.net/">PMD &#8211; sourcecode inspection tool</a> in an ant powered build. Here is a basic example from a test in the build.xml of a Netbeans project (the pmd jar is located in ant&#8217;s home lib directory):</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pmd&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
         <span style="color: #808080; font-style: italic;">&lt;!-- see http://pmd.sourceforge.net/ant-task.html --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pmd&quot;</span> <span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;net.sourceforge.pmd.ant.PMDTask&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.test.results.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pmd</span> <span style="color: #000066;">targetjdk</span>=<span style="color: #ff0000;">&quot;1.6&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #808080; font-style: italic;">&lt;!-- auxClasspath&gt; </span>
<span style="color: #808080; font-style: italic;">               &lt;pathelement location=&quot;dist/test.jar&quot; /&gt; </span>
<span style="color: #808080; font-style: italic;">            &lt;/auxClasspath --&gt;</span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ruleset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>basic<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ruleset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #808080; font-style: italic;">&lt;!-- ruleset&gt;rulesets/basic.xml&lt;/ruleset --&gt;</span>
            <span style="color: #808080; font-style: italic;">&lt;!-- ruleset&gt;rulesets/braces.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/javabeans.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/unusedcode.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/strings.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/design.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/coupling.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/codesize.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/imports.xml&lt;/ruleset&gt;</span>
<span style="color: #808080; font-style: italic;">            &lt;ruleset&gt;rulesets/naming.xml&lt;/ruleset --&gt;</span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;formatter</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xml&quot;</span> <span style="color: #000066;">toFile</span>=<span style="color: #ff0000;">&quot;${build.test.results.dir}/pmd_report.xml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${src.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.java&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pmd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>More examples you will find at <a href="http://pmd.sourceforge.net/ant-task.html">PMD Ant Task</a>.</p>
<p>Running this task from command line <code>ant -v pmd </code> gives a warning</p>
<p><code>[pmd] Could not find class test.hallo.Main</code></p>
<p>or running same from Netbeans (using external ant).</p>
<p><pre><code>Could not find class test.hallo.Main
java.lang.NoClassDefFoundError: org/jaxen/JaxenException
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at net.sourceforge.pmd.rules.XPathRule.getRuleChainVisits(XPathRule.java:87)</code></pre></p>
<p>After looking around for a while I found this thread <a href="http://sourceforge.net/forum/forum.php?thread_id=2268818&#038;forum_id=188192">Ant could not find class</a>.</p>
<p>Citation from there:</p>
<blockquote><p>
As far as what this will do to the PMD results&#8230; these errors come from the Type Resolution code. Only Rules which use the Type resolution capabilities even have a chance to give less than accurate results, and then only in circumstances requiring type information not apparent from the .java file directly. Finally, there only a few Rules in PMD that actively use Type Resolution right now, although I know several folks have written custom Rules using this capability.
 </p></blockquote>
<h2>Solution?</h2>
<p>PMD 5 is not out yet. But I was successful by using the latest snapshot (at time of writing)<br />
<a href="http://pmd.sourceforge.net/snapshot/maven2/pmd/pmd/5.0-SNAPSHOT/pmd-5.0-20081231.082852-77.jar">pmd-5.0-20081231.082852-77.jar</a>. Also, I had to change the target definition a little:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pmd&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pmd&quot;</span> <span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;net.sourceforge.pmd.ant.PMDTask&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.test.results.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><span style="color: #808080; font-style: italic;">&lt;!-- wird auch in -pre-test-run aufgerufen --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pmd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;auxClasspath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
               <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;dist/test.jar&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span> 
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/auxClasspath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #808080; font-style: italic;">&lt;!-- new path for rulesets!! --&gt;</span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ruleset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>rulesets/java/basic.xml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ruleset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;formatter</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xml&quot;</span> <span style="color: #000066;">toFile</span>=<span style="color: #ff0000;">&quot;${build.test.results.dir}/pmd_report.xml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${src.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.java&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pmd<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Now it&#8217;s working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/pmd-in-ant-problem-could-not-find-class/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adaptation of Netbeans Ant Build for Integration II &#8211; Auto Increment Build/Version Number</title>
		<link>http://www.rekk.de/bloggy/2008/adaptation-of-netbeans-ant-build-for-integration-ii-auto-increment-buildversion-number/</link>
		<comments>http://www.rekk.de/bloggy/2008/adaptation-of-netbeans-ant-build-for-integration-ii-auto-increment-buildversion-number/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 00:05:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[build management]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=91</guid>
		<description><![CDATA[(netbeans 6.1, external ant 1.7) Here is a code snippet from build.xml which shows a possible way to customize your build in Netbeans by providing a version number and including it into the MANIFEST.MF of the created distribution jar. The current property version will be stored in a version.properties file. This version number will be [...]]]></description>
			<content:encoded><![CDATA[<p>(netbeans 6.1, external ant 1.7)</p>
<p>Here is a code snippet from build.xml which shows a possible way to customize your build in Netbeans by providing a version number and including it into the MANIFEST.MF of the created distribution jar. The current property version will be stored in a version.properties file. This version number will be retrieved and written back to the file. The script knows then the new version number (custom.version.property) and uses it in the jar creation task (see also<a href="http://www.rekk.de/bloggy/2008/adaptation-of-netbeans-ant-build-for-integration-copylibs-issue/"> Adaptation of Netbeans Ant Build for Integration &#8211; CopyLibs Issue</a>).</p>
<p>Dealing with version number:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">  <span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">                =================</span>
<span style="color: #808080; font-style: italic;">                Set Version Related</span>
<span style="color: #808080; font-style: italic;">                =================</span>
<span style="color: #808080; font-style: italic;">     --&gt;</span>
     <span style="color: #808080; font-style: italic;">&lt;!-- watch out! if you put version.properties file to src dirs,</span>
<span style="color: #808080; font-style: italic;">     cause the file ist copied </span>
<span style="color: #808080; font-style: italic;">     to build before it is touched by this tasks, </span>
<span style="color: #808080; font-style: italic;">     you will probably need to do some further customization --&gt;</span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;custom.version.file&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${basedir}/version.properties&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;-post-init&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #808080; font-style: italic;">&lt;!-- check if there is a version --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;available</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${custom.version.file}&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;custom.version.available&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pre-inc-version&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init&quot;</span>  <span style="color: #000066;">unless</span>=<span style="color: #ff0000;">&quot;custom.version.available&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;No version file found. Creating ${custom.version.file} with Initial Version 0.&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${custom.version.file}&quot;</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;version=0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;inc-version&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;pre-inc-version&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
         <span style="color: #808080; font-style: italic;">&lt;!-- increment version number --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;propertyfile</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${custom.version.file}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;entry</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;version&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;int&quot;</span> <span style="color: #000066;">operation</span>=<span style="color: #ff0000;">&quot;+&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/propertyfile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #808080; font-style: italic;">&lt;!-- read version --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${custom.version.file}&quot;</span> <span style="color: #000066;">prefix</span>=<span style="color: #ff0000;">&quot;custom&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;project ${ant.project.name} released with version ${custom.version}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;-pre-jar&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;inc-version&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #808080; font-style: italic;">&lt;!-- Empty placeholder for easier customization. --&gt;</span>
        <span style="color: #808080; font-style: italic;">&lt;!-- You can override this target in the ../build.xml file. --&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean-version&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;-do-clean&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Remove version property file&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${custom.version.file}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>(You could also use ant <a href="http://ant.apache.org/manual/CoreTasks/buildnumber.html">BuildNumber task</a>.)</p>
<p>Using the version number in jar file creation:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">                =================</span>
<span style="color: #808080; font-style: italic;">                Jar Overriding Default</span>
<span style="color: #808080; font-style: italic;">                =================</span>
<span style="color: #808080; font-style: italic;">     --&gt;</span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init,compile,-pre-jar,-post-jar&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Custom Build JAR with libs and version. See -do-jar-with-libs.&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${build.classes.dir}&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;build.classes.dir.resolved&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;-------------run.classpath------- ${run.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;--------- build.classes.dir.resolved ------ ${build.classes.dir.resolved}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathconvert</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;run.classpath.without.build.classes.dir&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;map</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;${build.classes.dir.resolved}&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pathconvert<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;-------- run.classpath.without.build.classes.dir ---- ${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathconvert</span> <span style="color: #000066;">pathsep</span>=<span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;jar.classpath&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;chainedmapper<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;flattenmapper</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;globmapper</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;lib/*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/chainedmapper<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pathconvert<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;--- build.classes.dir --- ${build.classes.dir}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${dist.dir}/lib&quot;</span> <span style="color: #000066;">flatten</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:jar</span> <span style="color: #000066;">manifest</span>=<span style="color: #ff0000;">&quot;${manifest.file}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Main-Class&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${main.class}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Class-Path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${jar.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Build-Version&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${custom.version}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/j2seproject1:manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/j2seproject1:jar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>To run this application from the command line without Ant, try:<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${dist.jar}&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;dist.jar.resolved&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>java -jar &quot;${dist.jar.resolved}&quot;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/adaptation-of-netbeans-ant-build-for-integration-ii-auto-increment-buildversion-number/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adaptation of Netbeans Ant Build for Integration &#8211; CopyLibs Issue</title>
		<link>http://www.rekk.de/bloggy/2008/adaptation-of-netbeans-ant-build-for-integration-copylibs-issue/</link>
		<comments>http://www.rekk.de/bloggy/2008/adaptation-of-netbeans-ant-build-for-integration-copylibs-issue/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 17:55:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[build management]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=73</guid>
		<description><![CDATA[(Netbeans 6.1, external ant 1.7 ) If you create a standalone Java application project (i.e. one that comes with all used external jars and libs included, so there are copied to dist/lib) in Netbeans, commit the changes to version control, checkout or update the changes to your test and integration server and try to build [...]]]></description>
			<content:encoded><![CDATA[<p>(Netbeans 6.1, external ant 1.7 )</p>
<p>If you create a standalone Java application project (i.e. one that comes with all used external jars and libs included, so there are copied to dist/lib) in Netbeans, commit the changes to version control, checkout or update the changes to your test and integration server and try to build the same project there,  you might run into problems even if you used an external ant for building the same project in Netbeans on your local machine. (Look <a href="http://one-jar.sourceforge.net/">here</a> for an explanation why jars are not includeable in the distribution jar itself.)</p>
<p>On the integration server the libs will not be copied to the dist/lib folder. The reason is that Netbeans is using an own ant task org.netbeans.modules.java.j2seproject.copylibstask which extends import org.apache.tools.ant.taskdefs.Jar and this jar will just not be found on the integration server except you completly reconstruct your local build environment on the integration server, what will be difficult if you are using a CI system (in my case it&#8217;s hudson). So let&#8217;s have a closer look at this issue and some possible solutions:</p>
<p>There are two principal ant build files Netbeans is using during the build process: build.xml &#8211; user can edit this file, build-impl.xml &#8211; user should not edit this one. Also have a look at this post <a href="http://www.rekk.de/bloggy/2008/visualizing-default-ant-task-dependencies-for-netbeans-build-implxml/">Visualizing Default Ant Task Dependencies for Netbeans build-impl.xml</a>.</p>
<h2>Where and when the Libs are copied to dist/lib by the CopyLibs task?</h2>
<p>For that we have to look into build-impl.xml. The libs are copied when the jar target ist executed:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> </span>
<span style="color: #009900;"><span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Build JAR.&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jar&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>There are several jar related tasks, which are executed when certain conditions are valid, that means certain variables are set. The interesting task here is -do-jar-with-libraries:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init,compile,-pre-pre-jar,-pre-jar&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">if</span>=<span style="color: #ff0000;">&quot;manifest.available+main.class+mkdist.available&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;-do-jar-with-libraries&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div></div>

<p>This task will be executed if property manifest.available+main.class+mkdist.available is set. Especially if the path to CopyLibs is set.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;condition</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;manifest.available+main.class+mkdist.available&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;and<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;istrue</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${manifest.available+main.class}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;isset</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;libs.CopyLibs.classpath&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/and<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/condition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Where does this path comes from. It is read in</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;-pre-init,-init-private,-init-libraries&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;-init-user&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${user.properties.file}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>For example from: .netbeans/6.1/build.properties.<br />
<pre><code>libs.CopyLibs.classpath=/home/user/bin/netbeans/java2/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar
libs.CopyLibs.javadoc=
libs.CopyLibs.maven-pom=
libs.CopyLibs.src=</code></pre><br />
That&#8217;s a problem! The build.properties file will not be found on the integration server, the properties libs.CopyLIbs.classpath and manifest.available+main.class+mkdist.available will not be set, the task -do-jar-with-libraries will not be executed.</p>
<h2>What do you need CopyLibs task for?</h2>
<p>Look at how the task is used (I included some echos for better understanding):</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init,compile,-pre-pre-jar,-pre-jar&quot;</span> <span style="color: #000066;">if</span>=<span style="color: #ff0000;">&quot;manifest.available+main.class+mkdist.available&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;-do-jar-with-libraries&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${build.classes.dir}&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;build.classes.dir.resolved&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;-------------run.classpath------- ${run.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;--------- build.classes.dir.resolved ------ ${build.classes.dir.resolved}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathconvert</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;run.classpath.without.build.classes.dir&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;map</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;${build.classes.dir.resolved}&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pathconvert<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;-------- run.classpath.without.build.classes.dir ---- ${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathconvert</span> <span style="color: #000066;">pathsep</span>=<span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;jar.classpath&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;chainedmapper<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;flattenmapper</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init,compile,-pre-pre-jar,-pre-jar&quot;</span> <span style="color: #000066;">if</span>=<span style="color: #ff0000;">&quot;manifest.available+main.class+mkdist.available&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;-do-jar-with-libraries&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;globmapper</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;lib/*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/chainedmapper<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pathconvert<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span> <span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs&quot;</span> <span style="color: #000066;">classpath</span>=<span style="color: #ff0000;">&quot;${libs.CopyLibs.classpath}&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;copylibs&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copylibs</span> <span style="color: #000066;">compress</span>=<span style="color: #ff0000;">&quot;${jar.compress}&quot;</span> <span style="color: #000066;">jarfile</span>=<span style="color: #ff0000;">&quot;${dist.jar}&quot;</span> <span style="color: #000066;">manifest</span>=<span style="color: #ff0000;">&quot;${manifest.file}&quot;</span> <span style="color: #000066;">runtimeclasspath</span>=<span style="color: #ff0000;">&quot;${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Main-Class&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${main.class}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Class-Path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${jar.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copylibs<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>To run this application from the command line without Ant, try:<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${dist.jar}&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;dist.jar.resolved&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>java -jar &quot;${dist.jar.resolved}&quot;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>and then study the<a href="http://www.java2s.com/Open-Source/Java-Document/IDE-Netbeans/java/org/netbeans/modules/java/j2seproject/copylibstask/CopyLibs.java.htm"> java code</a>. So not much problems here. Mainly copying some files and using standard jar functions, also providing some README file. Below I will show how you can workaround using this task.</p>
<h2>Solutions?</h2>
<p><strong>First</strong>, you could copy the CopyLibs Task jar somewhere and set the property  libs.CopyLibs.classpath in your build.xml to the appropriate location or use project.properties file which comes with the Netbeans build scripts. There are little chances that this task will change and you will have to update the CopyLibs Task jar.</p>
<p><strong>Second</strong>, you could build your standalone application using <a href="http://one-jar.sourceforge.net/">One-JAR</a> overriding the jar target from build-impl.xml.</p>
<p><strong>Third</strong>, don&#8217;t change build structure but avoid using CopyLibs task. Here is an example how to change build.xml:</p>
<p>First make macrodefs and presetdefs from build-impl.xml callable by declaring appropriate namespaces in build.xml:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Test&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;default&quot;</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">&quot;.&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">xmlns:j2seproject1</span>=<span style="color: #ff0000;">&quot;http://www.netbeans.org/ns/j2se-project/1&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">xmlns:j2seproject3</span>=<span style="color: #ff0000;">&quot;http://www.netbeans.org/ns/j2se-project/3&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Builds, tests, and runs the project Test.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Then redefine  the jar target a little and override it in build.xml (echos only for feedback):</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- target depends=&quot;init,compile,-pre-pre-jar,-pre-jar&quot; if=&quot;manifest.available+main.class+mkdist.available&quot; name=&quot;-do-jar-with-libraries&quot; --&gt;</span>
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init,compile,-pre-jar,-post-jar&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Build JAR.&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${build.classes.dir}&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;build.classes.dir.resolved&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;-------------run.classpath------- ${run.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;--------- build.classes.dir.resolved ------ ${build.classes.dir.resolved}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathconvert</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;run.classpath.without.build.classes.dir&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;map</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;${build.classes.dir.resolved}&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pathconvert<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;-------- run.classpath.without.build.classes.dir ---- ${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathconvert</span> <span style="color: #000066;">pathsep</span>=<span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;jar.classpath&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;chainedmapper<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;flattenmapper</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;globmapper</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;lib/*&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/chainedmapper<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pathconvert<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;--- build.classes.dir --- ${build.classes.dir}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${dist.dir}/lib&quot;</span> <span style="color: #000066;">flatten</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${run.classpath.without.build.classes.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:jar</span> <span style="color: #000066;">manifest</span>=<span style="color: #ff0000;">&quot;${manifest.file}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Main-Class&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${main.class}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;j2seproject1:attribute</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Class-Path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${jar.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #808080; font-style: italic;">&lt;!-- if you deal with versions --&gt;</span>
                <span style="color: #808080; font-style: italic;">&lt;!-- j2seproject1:attribute name=&quot;Build-Version&quot; value=&quot;${version}&quot; / --&gt;</span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/j2seproject1:manifest<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/j2seproject1:jar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>To run this application from the command line without Ant, try:<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${dist.jar}&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;dist.jar.resolved&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>java -jar &quot;${dist.jar.resolved}&quot;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/echo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>&#8230; and you&#8217;ve got rid of the annoying CopyLibs task thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/adaptation-of-netbeans-ant-build-for-integration-copylibs-issue/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Great Articles on Automation in Software Development</title>
		<link>http://www.rekk.de/bloggy/2008/great-articles-on-automation-in-software-development/</link>
		<comments>http://www.rekk.de/bloggy/2008/great-articles-on-automation-in-software-development/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 22:05:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=70</guid>
		<description><![CDATA[Automation for the people]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=automation+people:">Automation for the people</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/great-articles-on-automation-in-software-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JAXB and XML Schema in Netbeans 6.0 &#8211; Customizing</title>
		<link>http://www.rekk.de/bloggy/2008/jaxb-and-xml-schema-in-netbeans-customizing/</link>
		<comments>http://www.rekk.de/bloggy/2008/jaxb-and-xml-schema-in-netbeans-customizing/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 17:28:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JAXB]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[xml schema]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=44</guid>
		<description><![CDATA[Problem:Create an XML Schema which will be binded by JAXB to a class structure following certain constrains. You have certain degrees of freedom for your schema design and later you might also use schema annotations provided by JAXB. Modularize your XML schemas, simplest example is: A.xsd uses &#38;lt;include&#38;gt; to include declarations from schema B.xsd. I [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong>Create an XML Schema which will be binded by JAXB to a class structure following certain constrains. You have certain degrees of freedom for your schema design and later you  might also use schema annotations provided by JAXB. Modularize your XML schemas, simplest example is: A.xsd uses <code>&amp;lt;include&amp;gt;</code> to include declarations from schema B.xsd. </p>
<p>I want to try Netbeans&#8217; excellent schema design features. Eventually I want to publish the schemas in a WAR  deployed in a web container. That&#8217;s why I decided to put the files directly into the /web directory of the web-project.</p>
<p><strong>Proposed Solution:</strong><br />
Trying to <a href="http://www.netbeans.org/kb/60/websvc/jaxb.html">use Netbeans&#8217; JAXB Wizard</a> (or see <a href="http://wiki.netbeans.org/JAXBWizard">http://wiki.netbeans.org/JAXBWizard</a>) to create a JAXB Binding for A.xsd you will meet certain limitations: schema file changes won&#8217;t be visible to the &#8220;Regenerate&#8221; operation. You could edit the copy of A.xsd created by the JAXB Wizard in src/conf/xml-resources/jaxb/name_of_the_binding to make changes visible to the task but that will not see changes in B.xsd. The reason is that the ant tasks created by the JAXB Wizard do not provide this kind of granularity.</p>
<p>So the solution for me was to create the binding  using JAXB Wizard, then overriding the created tasks. I copied <code>&amp;lt;target name=&quot;jaxb-code-generation&quot; ... </code> from nbproject/xml_binding_build.xml to <strong>build.xml </strong>and customized the parameters of the  <a href="https://jaxb.dev.java.net/nonav/2.0.2/docs/xjcTask.html">XJC task</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;import</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;nbproject/build-impl.xml&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ask-something&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Do you like to customize the best IDE of all times?&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">validargs</span>=<span style="color: #ff0000;">&quot;Yes, Yes&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">addproperty</span>=<span style="color: #ff0000;">&quot;answer&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Answer Yes! ${answer}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
     <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jaxb-code-generation&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;xjc-typedef-target&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;build/generated/addons/jaxb&quot;</span> <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">&quot;http://xml.netbeans.org/schema/JAXBWizConfig&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;build/generated/jaxbCache&quot;</span> <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">&quot;http://xml.netbeans.org/schema/JAXBWizConfig&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.classes.dir}&quot;</span> <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">&quot;http://xml.netbeans.org/schema/JAXBWizConfig&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mkdir</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;build/generated/jaxbCache/HandleSystemBinding&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- remove catalog attribut here or change refs in catalog.xml : catalog=&quot;catalog.xml&quot; --&gt;</span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xjc</span> <span style="color: #000066;">package</span>=<span style="color: #ff0000;">&quot;de.gbv.examples.handesystembinding&quot;</span> <span style="color: #000066;">destdir</span>=<span style="color: #ff0000;">&quot;build/generated/jaxbCache/HandleSystemBinding&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;classpath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${src.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${jaxbwiz.xjcrun.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/classpath<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;-xmlschema&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;arg</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;-verbose&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
            <span style="color: #808080; font-style: italic;">&lt;!-- customize this --&gt;</span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;schema</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;web/A.xsd&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;depends</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;web/B.xsd&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #808080; font-style: italic;">&lt;!-- end customization --&gt;</span>
&nbsp;
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;produces</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;build/generated/jaxbCache/HandleSystemBinding&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xjc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;build/generated/addons/jaxb&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;build/generated/jaxbCache/HandleSystemBinding&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/copy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;javac</span> <span style="color: #000066;">destdir</span>=<span style="color: #ff0000;">&quot;${build.classes.dir}&quot;</span> <span style="color: #000066;">srcdir</span>=<span style="color: #ff0000;">&quot;build/generated/addons/jaxb&quot;</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;${javac.source}&quot;</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;${javac.target}&quot;</span> <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">&quot;http://xml.netbeans.org/schema/JAXBWizConfig&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sourcepath</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${src.dir}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;classpath</span> <span style="color: #000066;">path</span>=<span style="color: #ff0000;">&quot;${jaxbwiz.gensrc.classpath}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/javac<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><b>Note:</b> Later discussions on netbeans issue tracking showed that there is a simpler way by first  running  &#8220;refresh&#8221; on the bindings schema and then doing &#8220;clean and build&#8221;. For that you don&#8217;t need to modify the ant target, nevertheless the discussed modification gives you this with just the &#8220;Regenerate&#8221; action click.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/jaxb-and-xml-schema-in-netbeans-customizing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jersey REST Web Service in Glassfish</title>
		<link>http://www.rekk.de/bloggy/2008/jersey-rest-web-service-in-glassfish/</link>
		<comments>http://www.rekk.de/bloggy/2008/jersey-rest-web-service-in-glassfish/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 19:13:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[jersey]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=40</guid>
		<description><![CDATA[It seems to me that there are basically two ways to get started with the examples of the Jersey distribution (see also Java Webservices &#8211; Relationship between JAX-WS, JAX-RS, Metro and Jersey) in Glassfish. First you can use the Glassfish&#8217;s update center executing: $path/updatecenter/bin$ ./updatetool like described for example in Japod&#8217;s blog. But currently only [...]]]></description>
			<content:encoded><![CDATA[<p>It seems to me that there are basically two ways to get started with the examples of the <a href="https://jersey.dev.java.net/">Jersey</a> distribution (see also <a href="http://www.rekk.de/bloggy/?p=37">Java Webservices &#8211; Relationship between JAX-WS, JAX-RS, Metro and Jersey</a>) in <a href="https://glassfish.dev.java.net">Glassfish</a>.</p>
<p>First you can use the Glassfish&#8217;s update center executing:<br />
<code>$path/updatecenter/bin$ ./updatetool</code><br />
like described for example in <a href="http://blogs.sun.com/japod/entry/jersey_0_2_1_available">Japod&#8217;s blog</a>.<br />
But currently only version 0.4 is available here.</p>
<p>The other way is : <a href="https://jersey.dev.java.net/servlets/ProjectDocumentList">download</a> and unzip the newest version of Jersey. In the root directory of the unzipped archive you will find an<br />
ant script, execute it like this:<br />
<code>$path/jersey-0.5-ea$ ant&nbsp;&nbsp;-f jersey-on-glassfish.xml -Dgf.home=$HOME/bin/glassfish install</code><br />
with appropriate gf.home property supplied.</p>
<p>If you get an error message similiar to this one:<br />
<pre><code>BUILD FAILED
/home/kostja/Development/jersey/jersey-0.5-ea/jersey-on-glassfish.xml:103: The following error occurred while executing this line:
/home/kostja/Development/jersey/jersey-0.5-ea/jersey-on-glassfish.xml:43: /home/kostja/Development/jersey/jersey-0.5-ea/examples/GlassfishDB not found.</code></pre><br />
which means some example is missing in the distribution, edit the jersey-on-glassfish.xml file, comment out the matching lines:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">     <span style="color: #808080; font-style: italic;">&lt;!-- copy-example example.name=&quot;GlassfishDB&quot;/&gt;</span>
<span style="color: #808080; font-style: italic;">     &lt;update-nb-prop nb.prop.file=&quot;${gf.home}/jersey/examples/GlassfishDB/nbproject/project.properties&quot;/ --&gt;</span></pre></div></div>

<p>Be aware! This procedures will only install the examples and won&#8217;t add auto-magically the jersey jars to Glassfish&#8217;s runtime classpath. So<br />
you have to take care by yourself to include the jars to the build target, see the provided examples for the jars needed:</p>
<p>glassfish/jersey/examples/SimpleServlet/nbproject/build-impl.xml:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;init&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;library-inclusion-in-archive&quot;</span> <span style="color: #000066;">unless</span>=<span style="color: #ff0000;">&quot;dist.ear.dir&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${file.reference.activation.jar}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build.web.dir}/WEB-INF/lib&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${file.reference.jsr250-api.jar}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build.web.dir}/WEB-INF/lib&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${file.reference.persistence-api-1.0.jar}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build.web.dir}/WEB-INF/lib&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${file.reference.asm-3.1.jar}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build.web.dir}/WEB-INF/lib&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${file.reference.jsr311-api.jar}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build.web.dir}/WEB-INF/lib&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${file.reference.jersey.jar}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build.web.dir}/WEB-INF/lib&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>glassfish/jersey/examples/SimpleServlet/nbproject/project.properties:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># some of this properties are set by jersey-on-glassfish.xml</span>
<span style="color: #666666; font-style: italic;"># during installation</span>
ashome.jersey.lib.dir=..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>lib
ashome.lib.dir=..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>lib
...
file.reference.jsr250-api.jar=<span style="color: #800000;">${ashome.jersey.lib.dir}</span><span style="color: #000000; font-weight: bold;">/</span>jsr250-api.jar
...
file.reference.jersey.jar=<span style="color: #800000;">${ashome.jersey.lib.dir}</span><span style="color: #000000; font-weight: bold;">/</span>jersey.jar
...
javac.classpath=<span style="color: #800000;">${file.reference.servlet.jar}</span>\:<span style="color: #800000;">${file.reference.activation.jar}</span>\:<span style="color: #800000;">${file.reference.jsr250-api.jar}</span>\:
<span style="color: #800000;">${file.reference.persistence-api-1.0.jar}</span>\:<span style="color: #800000;">${file.reference.asm-3.1.jar}</span>\:<span style="color: #800000;">${file.reference.jsr311-api.jar}</span>\:
<span style="color: #800000;">${file.reference.jersey.jar}</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/jersey-rest-web-service-in-glassfish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Webservices &#8211; Relationship between JAX-WS, JAX-RS, Metro and Jersey</title>
		<link>http://www.rekk.de/bloggy/2008/java-webservices-relationship-of-jax-ws-jax-rs-metro-and-jersey/</link>
		<comments>http://www.rekk.de/bloggy/2008/java-webservices-relationship-of-jax-ws-jax-rs-metro-and-jersey/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 21:20:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jersey]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=37</guid>
		<description><![CDATA[Have you ever wondered about the relationship of different actors within Java&#8217;s Webservice Stack? I did. The key to the right answers you may find watching this list of Glassfish projects. So there seems to be a simple formula (RI = reference implementation): JAX-WS = JAVA-API( XML-based Webservices, means mainly WSDL/SOAP though REST is possible [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wondered about the relationship of different actors within Java&#8217;s Webservice Stack? I did.  The key to the right answers you may find watching this <a href="http://wiki.glassfish.org/Wiki.jsp?page=ProjectsInGlassFishCommunity">list of Glassfish projects</a>.</p>
<p>So there seems to be a simple formula  (RI = reference implementation):</p>
<p><a href="http://jcp.org/en/jsr/detail?id=224">JAX-WS</a> = JAVA-API( XML-based Webservices, means mainly WSDL/SOAP though REST is possible too )<br />
RI(JAX-WS) = {  <a href="https://jax-ws.dev.java.net/nonav/2.1.1/docs/api/index.html">javax.xml.ws.**.* </a>, core Web services support } = JAX-WS &#8220;RI&#8221; [is subset of]  <a href="https://metro.dev.java.net/discover/">Metro</a><br />
Metro = JAX-WS &#8220;RI&#8221; + WSIT/Tango  ( WSIT/Tango provides support for Security, Reliability, Transactions and Interoperability with .NET 3.0 )</p>
<p><a href="https://jsr311.dev.java.net/">JAX-RS</a> = JAVA-API( RESTful Web Services )<br />
RI(JAX-RS) = {  javax.ws.rs.**.*  } = <a href="https://jersey.dev.java.net/">Jersey</a></p>
<p>JAX-WS 2.1 along with JAXB 2.1 is integrated in JDK 6 Update 4 release as is JAX-WS in JDK 6. It is part of Java EE 5 as well. To use Metro 1.1 on JDK6 U4, you just have to put the Metro jars in the classpath. Metro is integrated with <a href="http://www.rekk.de/bloggy/wp-admin/Glassfish%20Application%20Server">Glassfish Application Server</a>.<br />
It is possible to run REST Services with JAX-WS using the appropriate Binding like described in <a href="http://java.sun.com/developer/technicalArticles/WebServices/restful/">RESTful Web Services</a>.</p>
<p>JAX-RS is yet not finally released (see <a href="http://wikis.sun.com/display/Jersey/Schedule">Schedule</a>).  If you are using NetBeans IDE 6.0, you do not need to download the Jersey distribution. Instead, install the RESTful Web Services plugin from the Plugin Manager under the Tools menu. Developing RESTful Webservices is much easier here. <a href="http://java.sun.com/mailers/techtips/enterprise/2007/TechTips_Nov07.html">Implementing RESTful Web Services in Java</a> provides a good start.</p>
<p>If you are looking for the Metro libraries, either get them from GlassFish (webservices*.jar) , or download them from Metro distribution.</p>
<p>Some nice slides for an Metro/Jersey overview : <a href="http://developers.sun.com/events/techdays/presentations/locations-2007/tokyo/java_track2/td_tko_metro_caicedo.pdf">Metro and Jersey</a>.</p>
<p>To use Metro in your application you will need this jars (see also <a href="https://metro.dev.java.net/discover/faq.html">Metro FAQ</a>):<br />
<pre><code>$METRO_HOME/lib/webservices-rt.jar 
$METRO_HOME/lib/webservices-api.jar 
$METRO_HOME/lib/webservices-extra-api.jar 
$METRO_HOME/lib/webservices-extra.jar</code></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/java-webservices-relationship-of-jax-ws-jax-rs-metro-and-jersey/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Add all Jars in a Directory to CLASSPATH with Java SE 6 using Wildcards</title>
		<link>http://www.rekk.de/bloggy/2008/add-all-jars-in-a-directory-to-classpath-with-java-se-6-using-wildcards/</link>
		<comments>http://www.rekk.de/bloggy/2008/add-all-jars-in-a-directory-to-classpath-with-java-se-6-using-wildcards/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 10:27:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[classpath]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=36</guid>
		<description><![CDATA[It seems that we finally have got this simple feature for classpath (see Bug ID: 4339262). Now it is possible to use wildcards in classpath definition: javac -cp libs/* -verbose -encoding UTF-8 src/mypackage/*.java&#160;&#160;-d build/classes This is a citation from man:java (java-6-sun, linux): -cp classpath Specify a list of directories, JAR archives, and ZIP archives to [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that we finally have got this simple feature for classpath (see <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4339262">Bug ID: 4339262</a>).</p>
<p>Now it is possible to use wildcards in classpath definition:<br />
<code>javac -cp libs/* -verbose -encoding UTF-8 src/mypackage/*.java&nbsp;&nbsp;-d build/classes</code></p>
<p>This is a citation from man:java (java-6-sun, linux):</p>
<blockquote><p> -cp classpath<br />
Specify a list of directories, JAR archives, and ZIP archives to search for class files. Class path entries are separated by colons (:). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable.</p>
<p>If -classpath and -cp are not used and CLASSPATH is not set, the user class path consists of the current directory (.).</p>
<p>As a special convenience, a class path element containing a basename of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR (a java program cannot tell the difference between the two invocations).</p>
<p>For example, if directory foo contains a.jar and b.JAR, then the class path element foo/* is expanded to a A.jar:b.JAR, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of * expands to a list of all the jar files in the current directory. The CLASSPATH environment variable, where defined, will be similarly expanded. Any classpath wildcard expansion occurs before the Java virtual machine is started &#8212; no Java program will ever see unexpanded wildcards except by querying the environment. For example; by invoking System.getenv(&#8220;CLASSPATH&#8221;).</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2008/add-all-jars-in-a-directory-to-classpath-with-java-se-6-using-wildcards/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>NetBeans User Configuration Settings Location on Linux</title>
		<link>http://www.rekk.de/bloggy/2007/netbeans-user-configuration-settings-location-on-linux/</link>
		<comments>http://www.rekk.de/bloggy/2007/netbeans-user-configuration-settings-location-on-linux/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 02:28:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.rekk.de/bloggy/?p=32</guid>
		<description><![CDATA[To see your currently used user directory go to Help &#8211; About &#8211; Details. To override the default settings in the file netbeans-install-dir/etc/netbeans.conf you can create a directory etc/ in /home/myhome/.netbeans/6.0 ( with 6.0 being the version number of your NetBeans installation). Then use the default netbeans.conf file from netbeans-install-dir/etc/netbeans.conf as a template to create [...]]]></description>
			<content:encoded><![CDATA[<p>To see your currently used user directory go to Help &#8211; About &#8211; Details.</p>
<p>To override the default settings in the file netbeans-install-dir/etc/netbeans.conf you can create a directory etc/ in /home/myhome/.netbeans/6.0 ( with 6.0 being the version number of your NetBeans installation). Then use the default netbeans.conf file from netbeans-install-dir/etc/netbeans.conf as a template to create a user specific settings in  /home/myhome/.netbeans/6.0/etc/netbeans.conf (see <a href="http://wiki.netbeans.info/wiki/view/FaqNetbeansConf">How do I make my custom startup parameters permanent?</a> ).</p>
<p>For instance you could change you user name (used in templates):<br />
<pre><code># Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options=&quot;-J-client -J-Xss2m -J-Xms256m -J-XX:PermSize=64m -J-XX:MaxPermSize=200m -J-Xverify:none -J-Duser.name=&#039;My Name&#039; -J-Dapple.laf.useScreenMenuBar=true -J-Dswing.aatext=true --fontsize 14&quot;</code></pre></p>
<p>(&#8230; or use Tools -&gt; Template Manager -&gt; User configuration properties .)</p>
<p>Read more about startup parameter for Netbeans IDE in <a href="http://wiki.netbeans.org/FaqStartupParameters">FaqStartupParameters</a> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rekk.de/bloggy/2007/netbeans-user-configuration-settings-location-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

