Examples of ZipScanner


Examples of org.apache.tools.ant.types.ZipScanner

    // if no other "source", use default "client"
    if (includes.isEmpty()) {
      includes.add("client/**");
    }
    // final result
    final ZipScanner scanner = new ZipScanner();
    scanner.setIncludes(includes.toArray(new String[includes.size()]));
    scanner.setExcludes(excludes.toArray(new String[excludes.size()]));
    scanner.init();
    m_sourceFolderPredicate = new Predicate<String>() {
      public boolean apply(String t) {
        return scanner.match(t);
      }
    };
    //return folders;
  }
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

    /*
     * Hijack Ant's ZipScanner to handle inclusions/exclusions exactly as Ant
     * does. We're only using its pattern-matching capabilities; the code path
     * I'm using never tries to hit the filesystem in Ant 1.6.5.
     */
    ZipScanner scanner = new ZipScanner();
    if (includeList.length > 0) {
      scanner.setIncludes(includeList);
    }
    if (excludeList.length > 0) {
      scanner.setExcludes(excludeList);
    }
    if (defaultExcludes) {
      scanner.addDefaultExcludes();
    }
    scanner.setCaseSensitive(caseSensitive);
    scanner.init();

    return scanner;
  }
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

    /**
     * @since Ant 1.5.2
     */
    private synchronized ZipScanner getZipScanner() {
        if (zs == null) {
            zs = new ZipScanner();
            zs.setEncoding(encoding);
            zs.setSrc(zipFile);
        }
        return zs;
    }
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

    /**
     * @since Ant 1.5.2
     */
    private synchronized ZipScanner getZipScanner() {
        if (zs == null) {
            zs = new ZipScanner();
            zs.setEncoding(encoding);
            zs.setSrc(zipFile);
        }
        return zs;
    }
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

      super(logger);
      this.jarFiles = jarFiles;
      this.includedPaths = includedPaths;

      // initialize the ant scanner
      excludeScanner = new ZipScanner();
      List<String> list = new ArrayList<String>(excludedPaths);
      excludeScanner.setIncludes(list.toArray(new String[list.size()]));
      excludeScanner.addDefaultExcludes();
      excludeScanner.setCaseSensitive(true);
      excludeScanner.init();
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

      for (String excludedPath : excludedPathsAsString) {
        fullExcludedPaths[count++] = dirRootAbsolutePath + "/" + excludedPath;
      }

      // initialize the ant scanner
      excludeScanner = new ZipScanner();
      if (fullExcludedPaths.length > 0) {
        excludeScanner.setIncludes(fullExcludedPaths);
      }
      excludeScanner.addDefaultExcludes();
      excludeScanner.setCaseSensitive(true);
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

  }

  private ResourceFilterString getAntFilter(String includes[],
      String excludes[], String skips[], boolean defaultExcludes,
      final FilterFileType filterFileType, String tag) {
    final ZipScanner scanner = DefaultFilters.getScanner(includes, excludes,
        skips, defaultExcludes, true);
    return new ResourceFilterString(new ResourceFilter() {
      @Override
      public boolean allows(String path) {
        return fileTypeMatches(filterFileType, path) && scanner.match(path);
      }
    }, tag != null ? tag : "includes: " + Arrays.toString(includes)
        + ", excludes: " + Arrays.toString(excludes));
  }
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

    if (lazyPublicOracle != null) {
      throw new IllegalStateException("Already normalized");
    }

    final ZipScanner scanner = getScanner(includeList, excludeList,
        defaultExcludes, caseSensitive);

    publicPrefixSet.add(new PathPrefix(publicPackage, new ResourceFilter() {
      public boolean allows(String path) {
        return scanner.match(path);
      }
    }, true));
  }
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

       * If no includes list was provided then, use the default.
       */
      includeList = DEFAULT_SOURCE_FILE_INCLUDES_LIST;
    }

    final ZipScanner scanner = getScanner(includeList, excludeList,
        defaultExcludes, caseSensitive);

    ResourceFilter sourceFileFilter = new ResourceFilter() {
      public boolean allows(String path) {
        return path.endsWith(".java") && scanner.match(path);
      }
    };

    PathPrefix pathPrefix = new PathPrefix(sourcePackage, sourceFileFilter,
        isSuperSource);
View Full Code Here

Examples of org.apache.tools.ant.types.ZipScanner

    /*
     * Hijack Ant's ZipScanner to handle inclusions/exclusions exactly as Ant
     * does. We're only using its pattern-matching capabilities; the code path
     * I'm using never tries to hit the filesystem in Ant 1.6.5.
     */
    ZipScanner scanner = new ZipScanner();
    if (includeList.length > 0) {
      scanner.setIncludes(includeList);
    }
    if (excludeList.length > 0) {
      scanner.setExcludes(excludeList);
    }
    if (defaultExcludes) {
      scanner.addDefaultExcludes();
    }
    scanner.setCaseSensitive(caseSensitive);
    scanner.init();

    return scanner;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.