You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mikael Petterson <mi...@ericsson.com> on 2009/08/21 09:28:42 UTC

What is the difference in ant syntax

Hi,

I have came across the following ant syntax:

<copy todir="${tmp.src.dir}">
			<fileset dir="${src.dir}">
				<include name="**/src" />
				<include name="**/*.java" />
				<exclude name="**/link/**" />
				<exclude name="**/tb/**" />
			</fileset>
		</copy>

Then in the compile target there is the following:

<path id="source.path">
			<dirset dir="${tmp.src.dir}">
				<include name="**/src" />
				<exclude name="**/Test/**" />
			</dirset>

</path>

<property name="src" refid="source.path" />

Then in the compile target ( not including all attributes):

<javac srcdir="${src}" sourcepathref="source.path">
	<include name="**/*.java" />
	<exclude name="**/link/**" />
</javac>


Do I not get the same files compiled when using this ( I skip the move)?

<javac srcdir="${src.dir}" sourcepathref="">
	<include name="**/src" />
	<include name="**/*.java" />
	<exclude name="**/link/**" />
	<exclude name="**/tb/**" />
	<exclude name="**/Test/**" />
</javac>


Br,

//mike


Mikael Petterson
Software Designer


Ericsson AB, Stockholm, Sweden
Visiting address: Torshamnsgatan 42, Kista
Phone: +46 70 2673044 
E-mail: mikael.petterson@ericsson.com