<?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>cakebaker &#187; ant</title>
	<atom:link href="http://cakebaker.42dh.com/tags/ant/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 20 Dec 2011 15:29:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Time-stamped packages, the bakery &amp; the wiki</title>
		<link>http://cakebaker.42dh.com/2006/12/30/time-stamped-packages-the-bakery-the-wiki/</link>
		<comments>http://cakebaker.42dh.com/2006/12/30/time-stamped-packages-the-bakery-the-wiki/#comments</comments>
		<pubDate>Sat, 30 Dec 2006 13:25:51 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[bakery]]></category>
		<category><![CDATA[cakephp]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/2006/12/30/time-stamped-packages-the-bakery-the-wiki/</guid>
		<description><![CDATA[Ok, as the title indicates this post is a bit of a mishmash&#8230; Let me start with the time-stamped packages. You may have noticed on the downloads page that all files are named like file_2006-12-29.zip. To create those packages I wrote a simple Ant script, primarily because I couldn&#8217;t figure out how to include empty [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, as the title indicates this post is a bit of a mishmash&#8230;</p>
<p>Let me start with the time-stamped packages. You may have noticed on the <a href="http://cakebaker.42dh.com/downloads">downloads page</a> that all files are named like file_2006-12-29.zip. To create those packages I wrote a simple <a href="http://ant.apache.org">Ant</a> script, primarily because I couldn&#8217;t figure out how to include empty folders in the export from Eclipse ;-)  Maybe it is useful for you:</p>
<pre>
&lt;?xml version="1.0"?&gt;
&lt;project name="testsuite" default="default"&gt;
    &lt;target name="default"&gt;
        &lt;tstamp&gt;
            &lt;format property="TODAY" pattern="yyyy-MM-dd" /&gt;
        &lt;/tstamp&gt;
        &lt;property name="FILE_NAME" value="/home/dho/cakephp_testsuite_${TODAY}.zip"&gt;&lt;/property&gt;
        &lt;delete file="${FILE_NAME}"&gt;&lt;/delete&gt;
        &lt;zip destfile="${FILE_NAME}"
               basedir="/home/dho/projects/cakeprojects/cakephp-testsuite"
               includes="app/**, vendors/**"
               excludesfile="build.xml"&gt;
        &lt;/zip&gt;
    &lt;/target&gt;
&lt;/project&gt;
</pre>
<p>The probably most missed feature in the <a href="http://bakery.cakephp.org">bakery</a> was added yesterday: the search functionality. Yesterday was also the final day for the wiki, its url redirects now to the bakery.</p>
<p>As this the last post in this year: A happy New Year to you! And see you again in 2007!</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/12/30/time-stamped-packages-the-bakery-the-wiki/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>DB migrations</title>
		<link>http://cakebaker.42dh.com/2006/11/25/db-migrations/</link>
		<comments>http://cakebaker.42dh.com/2006/11/25/db-migrations/#comments</comments>
		<pubDate>Sat, 25 Nov 2006 10:05:15 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/2006/11/25/db-migrations/</guid>
		<description><![CDATA[Some days ago Joel Moss released a new version of Cake DB Migrations. As this version also supports advanced installations, I tested it a bit. After fixing some small glitches it worked fine. But, well, it seems that it doesn&#8217;t fit to my working style. As I do a lot of tiny steps to build [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago Joel Moss released a new version of <a href="http://joelmoss.info/switchboard/blog/1992:Cake_DB_Migrations_strikes_back">Cake DB Migrations</a>. As this version also supports advanced installations, I tested it a bit. After fixing some small glitches it worked fine. But, well, it seems that it doesn&#8217;t fit to my working style. As I do a lot of tiny steps to build a database, the overhead when using Migrations is rather high: for each change there is a migration file. The format of those migration files is rather &#8220;talkative&#8221;, and I miss a bit of magic, i.e. if I use create_table in the UP section, I would expect that automagically a drop_table is done in the DOWN section. Last, but not least, the migration tool works similar to the bake script, which means you have to select several options each time you want to apply a migration. And that is a pain! But test it yourself to see whether it fits to your working style.</p>
<p>And so I am back to <a href="http://ant.apache.org/">Apache Ant</a> and the good old SQL scripts ;-)  My approach follows a simple pattern after a modification of the SQL scripts: drop, create and insert. Here is the Ant script I use:</p>
<pre>
&lt;?xml version="1.0"?&gt;
&lt;project name="myproject" default="default"&gt;
  &lt;property name="driver" value="com.mysql.jdbc.Driver"&gt;&lt;/property&gt;
  &lt;property name="url" value="jdbc:mysql://localhost/myproject?characterEncoding=UTF-8"&gt;&lt;/property&gt;
  &lt;property name="user" value="root"&gt;&lt;/property&gt;
  &lt;property name="password" value=""&gt;&lt;/property&gt;

  &lt;target name="default" &gt;
    &lt;sql driver="${driver}" password="${password}" url="${url}" userid="${user}" src="drop.sql" encoding="UTF-8"&gt;&lt;/sql&gt;
    &lt;sql driver="${driver}" password="${password}" url="${url}" userid="${user}" src="create.sql" encoding="UTF-8"&gt;&lt;/sql&gt;
    &lt;sql driver="${driver}" password="${password}" url="${url}" userid="${user}" src="insert.sql" encoding="UTF-8"&gt;&lt;/sql&gt;
  &lt;/target&gt;
&lt;/project&gt;
</pre>
<p>This script I can then execute with one mouse click directly from my IDE. Simple and fast.</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/11/25/db-migrations/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The thing with the euro sign</title>
		<link>http://cakebaker.42dh.com/2006/01/31/the-thing-with-the-euro-sign/</link>
		<comments>http://cakebaker.42dh.com/2006/01/31/the-thing-with-the-euro-sign/#comments</comments>
		<pubDate>Tue, 31 Jan 2006 09:13:11 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[ant]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=87</guid>
		<description><![CDATA[Yesterday, Kabuto asked in the IRC whether someone is using UTF-8 for the MySQL databases and if they experienced some problems with the euro sign. Yes, I use UTF-8 and I also store the euro sign in my database, and I assumed it works for me. But that was an illusion, the euro sign was [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, Kabuto asked in the IRC whether someone is using UTF-8 for the MySQL databases and if they experienced some problems with the euro sign. Yes, I use UTF-8 and I also store the euro sign in my database, and I assumed it works for me. But that was an illusion, the euro sign was shown as a question mark as I did a query. A sign of an encoding problem&#8230; </p>
<p>Since it worked when I entered the euro sign in my application, the problem had to be in my sql scripts or in my <a href="http://ant.apache.org">ant</a> script I use to execute the sql scripts. The sql scripts were ok, as they worked when executed via <a href="http://dev.mysql.com/downloads/query-browser/1.1.html">MySQL Query Browser</a>. So the problem had to be in my ant script. But what was the cause of the problem? After searching for a long time I found the problem: I have to specify the encoding in the URL used by <a href="http://java.sun.com/products/jdbc/">JDBC</a>. Instead of</p>
<pre>
jdbc:mysql://localhost/mydb
</pre>
<p>I have to use </p>
<pre>
jdbc:mysql://localhost/mydb?characterEncoding=UTF-8
</pre>
<p>Oh, I really love this entire encoding stuff ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2006/01/31/the-thing-with-the-euro-sign/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

