<?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>OXT blog &#187; phing</title>
	<atom:link href="http://blog.o-x-t.com/tag/phing/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.o-x-t.com</link>
	<description>"People say nothing is impossible, but I do nothing every day." - Whinnie The Pooh</description>
	<lastBuildDate>Wed, 25 Aug 2010 19:18:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Calling phing tasks from Eclipse</title>
		<link>http://blog.o-x-t.com/2009/06/11/calling-phing-tasks-from-eclipse/</link>
		<comments>http://blog.o-x-t.com/2009/06/11/calling-phing-tasks-from-eclipse/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 12:16:27 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[phing]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.o-x-t.com/?p=211</guid>
		<description><![CDATA[Here you can read how to run phing tasks using built-in Ant tool in Eclipse. In this post I&#8217;ll describe what to do if your phing task requires user input. The solution is simple &#8211; ask for user property in ant and pass it back to phing: &#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62; &#60;project name=&#34;project_name&#34;&#62; &#60;property name=&#34;phing.command&#34; value=&#34;phing&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Here you can read <a href="http://www.insidewebdev.com/2008/08/16/using-eclipse-ant-with-phing/">how to run phing tasks using built-in Ant tool in Eclipse</a>.</p>
<p>In this post I&#8217;ll describe what to do if your phing task requires user input. The solution is simple &#8211; ask for user property in ant and pass it back to phing:<br />
<span id="more-211"></span></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;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<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;project_name&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;">name</span>=<span style="color: #ff0000;">&quot;phing.command&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;phing&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;task_name&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Task description&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;Input property&quot;</span></span>
<span style="color: #009900;">			<span style="color: #000066;">addproperty</span>=<span style="color: #ff0000;">&quot;property_name&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exec</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">executable</span>=<span style="color: #ff0000;">&quot;${phing.command}&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;">line</span>=<span style="color: #ff0000;">&quot;-Dphing_task_property=${property_name}&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;">line</span>=<span style="color: #ff0000;">&quot;phing_task_name&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/exec<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>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>You also need to tell phing not to wait for user input if we&#8217;ve passed property via command line. For phing task <code>propertyPrompt</code> use attribute <code>useExistingValue="true"</code>.</p>
<p>If your phing property has default value you need to specify this default value in ant input task also.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.o-x-t.com/2009/06/11/calling-phing-tasks-from-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
