ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Uther <>
Subject ant on Mac
Date Wed, 16 Feb 2000 06:09:27 GMT
  I just downloaded ant and started playing with it on my Mac today.  I
have a number of small bug fixes.  I'll include the small ones in this
email, but I also wrote a VERY simple graphical front end (no command line
on the mac:), that is a few files.  How do I go about submitting them?

In other news, it would be really cool if the CVS task used jCVS instead of
Runtime.exec.  I don't have the time to do that one myself.


\x/ill        :-}

Here are the changes.  This is not normal diff format, it's just me cutting
and pasting.  If you like I can resubmit these another way... : line 353  (this one isn't a bugfix, it's needed for my GUI.)

	public Enumeration getTargetNames() {
		return targets.keys();
	} : line 84  (The mac runtime uses unix style paths)

	    if (System.getProperty("path.separator").equals(":") && 
	    	!System.getProperty("").startsWith("Mac")) : line 74  (just some extra error checking)

    public void execute() throws BuildException {
        project.log("Deleting: " + f.getAbsolutePath());

        if (f.exists()) {
            if (f.isDirectory()) {
            	project.log("Directory: " + f.getAbsolutePath() + " cannot be
removed with delete.  Use Deltree instead.");
            } else {
        } else {
        	project.log("File: " + f.getAbsolutePath() + " does not exist.");
    } : line 94  (this was relying on undocumented behaviour - it
still is, but it is a little more robust now)

    private void removeDir(File dir) throws IOException {

        // check to make sure that the given dir isn't a symlink
        // the comparison of absolute path and canonical path
        // catches this
        // XXX - this is relying on undocumented behaviour in the JVM!
        // JavaSoft needs to introduce an isSymLink() method in to do this right.
        String canonical = dir.getCanonicalPath();
        String absolute = dir.getAbsolutePath();
        if (canonical.endsWith(dir.separator) &&
        	absolute = absolute + dir.separator;
        else if (!canonical.endsWith(dir.separator) &&
        	canonical = canonical + dir.separator;
        if (canonical.equals(absolute)) {
            String[] list = dir.list(); : line 249  (this allows multiple builds in the same execution)

     * Scans the directory looking for source files to be compiled and
     * support files to be copied.  The results are returned in the
     * class variables compileList and filecopyList.

    private void scanDir(File srcDir, File destDir, String files[]) {
        for (int i = 0; i < files.length; i++) {

View raw message