Can Ant be made to compile only read only java files?

S

Steve W. Jackson

:Can Ant be made to compile only read only java files?

Why would it NOT compile read-only files? After all, it's only going to
read them, and write class files as a result.
 
V

vnssoftware

Steve W. Jackson said:
Why would it NOT compile read-only files? After all, it's only going to
read them, and write class files as a result.

Well...I am saying that Ant should not compile files that have write
access.
It should only compile files that has read only access. Sorry if I was
not clear the first time.
 
D

Dave Glasser

(e-mail address removed) (vnssoftware) wrote on 30 Dec 2003 18:48:52
-0800 in comp.lang.java.programmer:
Well...I am saying that Ant should not compile files that have write
access.
It should only compile files that has read only access. Sorry if I was
not clear the first time.

As of version 1.4.1 of ant (which is what I use), you can't do that. I
doubt if later versions can either. But if you study and understand
the source code for org.apache.tools.ant.taskdefs.Javac, and create
your own custom task by subclassing it and overriding the scanDir()
method, it shouldn't be too hard to accomplish what you're trying to.
 
D

Dmitry R

Steve W. Jackson said:
Why would it NOT compile read-only files? After all, it's only going to
read them, and write class files as a result.

Ant is available in sources, so it's very easy to add this functionality.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top