<?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>ANt copy Task Guide Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/ant-copy-task-guide/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/ant-copy-task-guide/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:53:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Samples/Examples of the Ant copy task &#8211; Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/samples-of-the-ant-copy-task/</link>
					<comments>https://www.scmgalaxy.com/tutorials/samples-of-the-ant-copy-task/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 22 Jul 2010 11:04:10 +0000</pubDate>
				<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[ANT]]></category>
		<category><![CDATA[Ant Copy task examples]]></category>
		<category><![CDATA[ANt copy Task Guide]]></category>
		<category><![CDATA[Ant Copy Task Samples]]></category>
		<category><![CDATA[Ant Task Copy/Delete examples]]></category>
		<category><![CDATA[Apache Ant copy]]></category>
		<category><![CDATA[Copy task]]></category>
		<category><![CDATA[How to use Ant copy task]]></category>
		<category><![CDATA[Samples]]></category>
		<category><![CDATA[Samples Ant copy task]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2010/07/22/samples-of-the-ant-copy-task/</guid>

					<description><![CDATA[<p>Samples of the Ant copy task &#60;copy file=&#8221;${resources.dir}/MANIFEST.MF&#8221; tofile=&#8221;${temp.dir.meta-inf}/MANIFEST.MF&#8221; overwrite=&#8221;true&#8221; /&#62; &#60;copy file=&#8221;${resources.dir}/managed-beans.xml&#8221; tofile=&#8221;${temp.dir.web-inf}/managed-beans.xml&#8221; overwrite=&#8221;true&#8221; /&#62; &#60;copy file=&#8221;${resources.dir}/navigation-rules.xml&#8221; tofile=&#8221;${temp.dir.web-inf}/navigation-rules.xml&#8221; overwrite=&#8221;true&#8221; [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/samples-of-the-ant-copy-task/">Samples/Examples of the Ant copy task &#8211; Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4396 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/07/ant-copy-task.png" alt="ant-copy-task" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/07/ant-copy-task.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/07/ant-copy-task-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><strong>Samples of the Ant copy task<br />
</strong><br />
&lt;copy file=&#8221;${resources.dir}/MANIFEST.MF&#8221; tofile=&#8221;${temp.dir.meta-inf}/MANIFEST.MF&#8221; overwrite=&#8221;true&#8221; /&gt;<br />
&lt;copy file=&#8221;${resources.dir}/managed-beans.xml&#8221; tofile=&#8221;${temp.dir.web-inf}/managed-beans.xml&#8221; overwrite=&#8221;true&#8221; /&gt;<br />
&lt;copy file=&#8221;${resources.dir}/navigation-rules.xml&#8221; tofile=&#8221;${temp.dir.web-inf}/navigation-rules.xml&#8221; overwrite=&#8221;true&#8221; /&gt;<br />
&lt;copy file=&#8221;${resources.dir}/monitoring-managed-beans.xml&#8221; tofile=&#8221;${temp.dir.web-inf}/monitoring-managed-beans.xml&#8221; overwrite=&#8221;true&#8221; /&gt;<br />
&lt;copy file=&#8221;${resources.dir}/monitoring-navigation-rules.xml&#8221; tofile=&#8221;${temp.dir.web-inf}/monitoring-navigation-rules.xml&#8221; overwrite=&#8221;true&#8221; /&gt;<br />
&lt;copy file=&#8221;${resources.dir}/faces-config.xml&#8221; tofile=&#8221;${temp.dir.web-inf}/faces-config.xml&#8221; overwrite=&#8221;true&#8221; /&gt;<br />
&lt;copy file=&#8221;${resources.dir}/log4j.properties&#8221; tofile=&#8221;${temp.dir.classes}/log4j.properties&#8221; overwrite=&#8221;true&#8221; /&gt;<br />
&lt;copy file=&#8221;${resources.dir}/commons-logging.properties&#8221; tofile=&#8221;${temp.dir.classes}/commons-logging.properties&#8221; overwrite=&#8221;true&#8221; /&gt;</p>
<p>&lt;copy todir=&#8221;${temp.dir.classes}&#8221;&gt;<br />
&lt;fileset dir=&#8221;${src.dir}&#8221;&gt;<br />
&lt;include name=&#8221;**/*.xml&#8221;/&gt;<br />
&lt;include name=&#8221;**/*.xsl&#8221;/&gt;<br />
&lt;include name=&#8221;**/*.properties&#8221;/&gt;<br />
&lt;/fileset&gt;<br />
&lt;/copy&gt;</p>
<p>&lt;copy todir=&#8221;${dist}&#8221;&gt;<br />
&lt;fileset dir=&#8221;${src}&#8221;<br />
includes=&#8221;**/images/*&#8221;<br />
excludes=&#8221;**/*.gif&#8221;<br />
/&gt;<br />
&lt;/copy&gt;</p>
<p><strong>This copies all files in directories called images that are located in the directory tree defined by ${src} to the destination directory defined by ${dist}, but excludes all *.gif files from the copy.</strong></p>
<p>&lt;copy todir=&#8221;${dist}&#8221;&gt;<br />
&lt;fileset dir=&#8221;${src}&#8221;&gt;<br />
&lt;include name=&#8221;**/images/*&#8221;/&gt;<br />
&lt;exclude name=&#8221;**/*.gif&#8221;/&gt;<br />
&lt;/fileset&gt;<br />
&lt;/copy&gt;</p>
<p><strong>The same as the example above, but expressed using nested elements.</strong></p>
<p>&lt;delete dir=&#8221;${dist}&#8221;&gt;<br />
&lt;include name=&#8221;**/images/*&#8221;/&gt;<br />
&lt;exclude name=&#8221;**/*.gif&#8221;/&gt;<br />
&lt;/delete&gt;</p>
<p><strong>Deleting the original set of files, the delete task can act as an implicit fileset.</strong></p>
<p><strong>Flatten directories when performing an Ant copy</strong><br />
Here&#8217;s a code snippet from an Ant build script where I begin with a hierarchical structure of jar files in my development environment, then flatten out all my lib subdirectories into one directory in my production environment when I copy all the jar files to my production library directory:</p>
<p>&lt;!&#8211; build a temporary lib dir, and flatten out the jars into one folder &#8211;&gt;</p>
<p>&lt;copy todir=&#8221;${temp.dir.lib}&#8221; flatten=&#8221;true&#8221;&gt;<br />
&lt;fileset dir=&#8221;${lib.dir}&#8221;&gt;<br />
&lt;exclude name=&#8221;${cob.lib.dir}&#8221; /&gt;<br />
&lt;exclude name=&#8221;junit*&#8221; /&gt;<br />
&lt;include name=&#8221;**/*.jar&#8221;/&gt;<br />
&lt;include name=&#8221;**/*.zip&#8221;/&gt;<br />
&lt;/fileset&gt;<br />
&lt;/copy&gt;</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/samples-of-the-ant-copy-task/">Samples/Examples of the Ant copy task &#8211; Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/samples-of-the-ant-copy-task/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
