<?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>imwill.com &#187; java</title>
	<atom:link href="http://imwill.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://imwill.com</link>
	<description>Mostly web dev, sometimes food.</description>
	<lastBuildDate>Thu, 29 Jul 2010 20:17:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>svntask examples for Apache Ant</title>
		<link>http://imwill.com/svntask-examples-for-apache-ant/</link>
		<comments>http://imwill.com/svntask-examples-for-apache-ant/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 00:36:02 +0000</pubDate>
		<dc:creator>Hendrik Will</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://imwill.com/?p=7</guid>
		<description><![CDATA[



A couple days ago I had my first experience with Apache Ant. If you have never heard of it before you should definitely check it out. Apache Ant is a very simple JAVA-based build tool with xml-based configuration files for automation.
I wanted to automate the process of importing/exporting specific MySQL database tables.In the next step [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-0095949993453656";
/* 468x60, Erstellt 21.07.10 */
google_ad_slot = "5573787661";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>A couple days ago I had my first experience with Apache Ant. If you have never heard of it before you should definitely check it out. Apache Ant is a very simple JAVA-based build tool with xml-based configuration files for automation.</p>
<p>I wanted to automate the process of importing/exporting specific MySQL database tables.In the next step I wanted to update and commit the data to SVN. After a quick research I found the JAVA lib svntask which is based on SVNKit very useful.<br />
<span id="more-7"></span><br />
The only disadvantage in my opinion is that there is almost no documentation yet. To help other developers to get off on the right foot and save some time I&#8217;ll give some examples in the following section.</p>
<h3>SVN update example:</h3>
<pre class="brush: xml;">
&lt;!-- SVN update --&gt;
&lt;target name=&quot;svn-update&quot;&gt;
	&lt;svn&gt;
		&lt;update
			path=&quot;/workspace/path&quot;
			force=&quot;false&quot; recursive=&quot;false&quot;
		/&gt;
	&lt;/svn&gt;
&lt;/target&gt;
</pre>
<p>Optional arguments you can use are <strong>recursive</strong>(default: <em>true</em>) and <strong>force</strong>(default: <em>true</em>).</p>
<h3>SVN add example:</h3>
<pre class="brush: xml;">
&lt;!-- SVN add --&gt;
&lt;target name=&quot;svn-add&quot;&gt;
	&lt;svn&gt;
		&lt;add
			path=&quot;/workspace/project&quot;
			force=&quot;false&quot;
		/&gt;
	&lt;/svn&gt;
&lt;/target&gt;
</pre>
<p>Optional <em>boolean </em>arguments are <strong>force</strong>, <strong>mkdir</strong>, <strong>climbUnversionedParents</strong>, <strong>includeIgnored </strong>and <strong>makeParents</strong>(default for all except mkrdir is <em>true</em>).</p>
<h3>SVN commit example:</h3>
<p>With version 1.0.7 authentication failed for me. So I added the username/password authentication to the commit class. You can get the temporary version <a href="http://svntask.googlecode.com/issues/attachment?aid=-5162993630516291954&#038;name=svntask.jar">here</a> until the next update of svntask.</p>
<pre class="brush: xml;">
&lt;!-- SVN Commit --&gt;
&lt;target name=&quot;svn-commit&quot;&gt;
	&lt;!-- don't store password in property files, use input  --&gt;
	&lt;input
		message=&quot;Enter SVN password:&quot;
		addproperty=&quot;svn.password&quot;
	 /&gt;
	&lt;svn&gt;
		&lt;commit
			path=&quot;/workspace/project/trunk&quot;
			commitMessage=&quot;Test commit&quot;
			force=&quot;true&quot;
			username=&quot;user&quot; password=&quot;${svn.password}&quot;
		/&gt;
	&lt;/svn&gt;
&lt;/target&gt;
</pre>
<p>Optional <em>boolean </em>arguments are <strong>keepLocks </strong>and <strong>force</strong>.</p>
<h3>SVN ls update example:</h3>
<pre class="brush: xml;">
&lt;!-- SVN ls --&gt;
&lt;target name=&quot;svn-ls&quot;&gt;
	&lt;svn&gt;
		&lt;ls
			repository=&quot;http://domain.tld&quot;
			path=&quot;/svn/repos/project/trunk&quot;
		/&gt;
	&lt;/svn&gt;
&lt;/target&gt;
</pre>
<p>Optional argument is <strong>delimeter</strong>(default: , ).</p>
<h3>SVN info example:</h3>
<pre class="brush: xml;">
&lt;!-- SVN info --&gt;
&lt;target name=&quot;svn-info&quot;&gt;
	&lt;svn&gt;
		&lt;info
			path=&quot;/workspace/project/trunk&quot;
			committedRevisionProperty=&quot;revisionVersion&quot;
			authorProperty=&quot;revisionAuthor&quot;
			committedDateProperty=&quot;revisionDate&quot;
		/&gt;
	&lt;/svn&gt;
	&lt;!-- show revision, author and date --&gt;
	&lt;property
		name=&quot;version&quot;
		value=&quot;At revision ${revisionVersion} by ${revisionAuthor} on ${revisionDate}&quot;
	/&gt;
	&lt;echo message=&quot;${version}&quot;/&gt;
&lt;/target&gt;
</pre>
<p>I didn&#8217;t use <strong>log</strong>, <strong>status </strong>and <strong>switch </strong>so far. I will post examples if I will use it in the future.</p>
<p><strong>Some useful links:</strong><br />
svntask: <a href="http://code.google.com/p/svntask/">http://code.google.com/p/svntask/</a><br />
Apache Ant project: <a href="http://ant.apache.org/">http://ant.apache.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://imwill.com/svntask-examples-for-apache-ant/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
