You could also use a CustomSelector to select only interfaces.
Something like :
<copy todir="../backup/dir">
<fileset dir="${src}" casesensitive="yes">
<custom classname="com.acme.ant.selectors.InterfacesSelector"
classpath="${lib}/ant_selector.jar">
<param dir="${src} />
</custom>
</fileset>
</copy>
In the implementation of InterfaceSelector you could either use
java.lang.Class#isInterface() method or simply parse the .java class to
see if its an interface.
Hope this helps
-Prashant
RADEMAKERS Tanguy wrote:
if your interfaces follow some kind of a naming pattern
("IInterfaceName.java"), you can select them all using a fileset with a
nested include
<copy todir="../backup/dir">
<fileset dir="${src}" casesensitive="yes">
<filename name="**/I*.java"/>
</fileset>
</copy>
/t
-----Original Message-----
From: Bret Kumler [mailto:[EMAIL PROTECTED]
Sent: Friday, September 08, 2006 4:42 PM
To: Ant Users List
Subject: RE: Question
Sorry, I forgot to mention one thing, when I sync to source sometimes
there's new interfaces.
These interfaces end up missing in the instrumented classes.
I'm trying to avoid adding a new <copy> for each interface.
-----Original Message-----
From: Chun Ji [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 07, 2006 11:58 AM
To: Ant Users List; Bret Kumler
Subject: RE: Question
If you just want to copy your interface classes to your "instrumented"
directory, it should be very easy for ant to handle. I think a <copy>
should be enough.
If you want Ant to analysis the test coverage of your
interface files, I
have no idea.
-cji
-----Original Message-----
From: Bret Kumler [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 07, 2006 11:46 AM
To: Ant Users List
Subject: Question
Importance: Low
Is there a way in Ant to have it look at the contents of a file?
I'm using Cobertura for code coverage and they ignore interfaces.
I need to copy the interfaces to the classes directory for deployment.
Thanks.
This e-mail message and any attachments may contain private,
confidential, proprietary or privileged material of GoldenGate
Software,
Inc. that is for the sole use of the intended recipient(s) of this
e-mail message. Any review, copying or distribution or other use of
this e-mail message or any attachments hereto by anyone other than the
intended recipient(s) is strictly prohibited. If you are not the
intended recipient(s) of this e-mail message, please contact GoldenGate
Software, Inc. (415-777-0200) immediately and permanently delete the
original e-mail message and any copies of this e-mail message and all
attachments, if any.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail message and any attachments may contain private,
confidential, proprietary or privileged material of GoldenGate
Software, Inc. that is for the sole use of the intended
recipient(s) of this e-mail message. Any review, copying or
distribution or other use of this e-mail message or any
attachments hereto by anyone other than the intended
recipient(s) is strictly prohibited. If you are not the
intended recipient(s) of this e-mail message, please contact
GoldenGate Software, Inc. (415-777-0200) immediately and
permanently delete the original e-mail message and any copies
of this e-mail message and all attachments, if any.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]