Re: Feature Request (putting zips in classpath.txt)

From: Gavin Eadie (gavi..mich.edu)
Date: Tue Jan 27 2004 - 15:04:10 EST

  • Next message: Ian McDougall: "Can't install 1.0.7.50 on new 3.0M6"

    Here I go, talking to myself again!

    >I use WOProject as part of manually constructed ant builds (ie I
    >don't use Eclipse (yet)), and I have a need to include a .zip file
    >in my application classpath (the Oracle clases12.zip file, in fact).
    >
    >PS: If my sending diff's is the way to do this, that'd be OK with me.

    In AppFormat.java:

        protected String buildAppPaths() {
           FileSet fs = null;
           PatternSet.NameEntry includeJar = null, includeZip = null; //###
           DirectoryScanner ds = null;
           String[] files = null;
           StringBuffer buf = null;
           try {
              fs = new FileSet();
              fs.setDir(getApplicatonTask().contentsDir());
              includeJar = fs.createInclude();
              includeJar.setName("**/Resources/Java/**/*.jar");
              includeZip = fs.createInclude(); //###
              includeZip.setName("**/Resources/Java/**/*.zip"); //###

              ds = fs.getDirectoryScanner(task.getProject());
              files = ds.getIncludedFiles();
              buf = new StringBuffer();

              // prepend the path with Resources/Java (for CompilerProxy support)
              buf
                 .append("APPROOT")
                 .append(File.separatorChar)
                 .append("Resources")
                 .append(File.separatorChar)
                 .append("Java")
                 .append(File.separatorChar)
                 .append("\r\n");
              for (int i = 0; i < files.length; i++) {
                 buf.append("APPROOT").append(File.separatorChar).append(
                    files[i]).append(
                    "\r\n");
              }
              return buf.toString();
           } catch (Exception anException) {
              log(anException.getMessage(), Project.MSG_WARN);
           } finally {
              fs = null;
              includeJar = null; //###
              includeZip = null; //###
              ds = null;
              files = null;
              buf = null;
           }
           return "";
        }



    This archive was generated by hypermail 2.0.0 : Tue Jan 27 2004 - 15:04:19 EST