ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trevor Harmon <tre...@vocaro.com>
Subject javac task + sourcepathref + excluded files = impossible?
Date Tue, 10 Apr 2007 00:21:28 GMT
I have a list of source files that must be supplied to javac as well  
as several other tasks. It's a complex list with excludes, so I want  
to factor it out as a path reference to avoid future copy-and-paste  
bugs. But this doesn't seem to be possible!

My path reference is defined like this:

<path id="src.files">
   <fileset dir="src">
     <include name="**/*.java"/>
     <exclude name="some/directory/FileName1.java"/>
     <exclude name="some/directory/FileName2.java"/>
     ...
   </fileset>
</path>

But when I call javac:

<javac
   sourcepathref="src.files"
   ...

I get an error saying I didn't specify the srcdir attribute.

Okay, so I set srcdir to the same directory as my path reference, but  
then my excluded files don't get excluded! It seems the srcdir  
attribute overrides whatever is in the sourcepathref attribute.

Is that a bug? Or am I doing something wrong? Thanks,

Trevor

P.S. I'm using Ant 1.7.0.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message