Package org.apache.tools.ant.types

Examples of org.apache.tools.ant.types.FileSet.createInclude()


            }
            if (rc instanceof FileSet) {
                FileSet fs = (FileSet) rc;
                if (!fs.hasPatterns() && !fs.hasSelectors()) {
                    FileSet fs2 = (FileSet) fs.clone();
                    fs2.createInclude().setName("**/*.java");
                    if (includeNoSourcePackages) {
                        fs2.createInclude().setName("**/package.html");
                    }
                    rc = fs2;
                }
View Full Code Here


                FileSet fs = (FileSet) rc;
                if (!fs.hasPatterns() && !fs.hasSelectors()) {
                    FileSet fs2 = (FileSet) fs.clone();
                    fs2.createInclude().setName("**/*.java");
                    if (includeNoSourcePackages) {
                        fs2.createInclude().setName("**/package.html");
                    }
                    rc = fs2;
                }
            }
            for (Resource r : rc) {
View Full Code Here

                delete.setIncludeEmptyDirs(true);
                delete.setFailOnError(true);

                FileSet set = new FileSet();
                set.setDir(new File(path + "/eclim"));
                set.createInclude().setName("**/*");
                set.createExclude().setName("after/**/*");
                set.createExclude().setName("resources/**/*");
                delete.addFileset(set);

                try{
View Full Code Here

                throw new BuildException(
                    sources[i] + " is not relative to " + dir.getAbsolutePath());
            }
            if (relativeName == null)
                continue;
            fileSet.createInclude().setName(relativeName);
            atLeastOne = true;
        }

        if (! atLeastOne) {
            // need to make an empty fileset
View Full Code Here

            atLeastOne = true;
        }

        if (! atLeastOne) {
            // need to make an empty fileset
            fileSet.createInclude().setName("a:b:c:d//THis si &&& not a file  !!! ");
        }
        getProject().addReference(name, fileSet);
    }

    private String getRelativeName(String dirNormal, File file) {
View Full Code Here

                    }
                    //
                    //   add all the patterns for this libname
                    //
                    for (int j = 0; j < patterns.length; j++) {
                        PatternSet.NameEntry entry = localSet.createInclude();
                        entry.setName(patterns[j]);
                    }
                   int matches = 0;
               //
               //  if there was no specified directory then
View Full Code Here

     * @param src
     */
    public void setFile(File src) {
        FileSet fs = new FileSet();
        fs.setDir(new File(src.getParent()));
        fs.createInclude().setName(src.getName());
        addFileset(fs);
    }

    /**
     * The directory which holds the files whose permissions must be changed.
View Full Code Here

        dependenciesFileSet.setDir( new File( localRepository.getBasedir() ) );

        for ( Artifact artifact : depArtifacts )
        {
            String relativeArtifactPath = localRepository.pathOf( artifact );
            dependenciesFileSet.createInclude().setName( relativeArtifactPath );

            String fileSetName = getPrefix() + artifact.getDependencyConflictId();

            FileSet singleArtifactFileSet = new FileSet();
            singleArtifactFileSet.setProject( getProject() );
View Full Code Here

        Enumeration e = fileSets.elements();
        while (e.hasMoreElements()) {
            FileSet fs = (FileSet) e.nextElement();
            if (!fs.hasPatterns() && !fs.hasSelectors()) {
                fs = (FileSet) fs.clone();
                fs.createInclude().setName("**/*.java");
            }
            File baseDir = fs.getDir(getProject());
            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
            String[] files = ds.getIncludedFiles();
            for (int i = 0; i < files.length; i++) {
View Full Code Here

                fileset = new FileSet();
                fileset.setDir(base);
                for (Iterator iter = paths.iterator(); iter.hasNext();) {
                    ArtifactDownloadReport a = (ArtifactDownloadReport) iter.next();
                    if (a.getLocalFile() != null) {
                        NameEntry ne = fileset.createInclude();
                        ne.setName(getPath(base, a.getLocalFile()));
                    }
                }
            }
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.