Package org.apache.tools.ant.types

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


     * @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


        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

            tmpPluginDir.mkdirs();
            tmpPluginXmlFile = new File(tmpPluginDir, "plugin.xml");
            FileUtils.newFileUtils().copyFile(descriptor, tmpPluginXmlFile);
            FileSet fs = new FileSet();
            fs.setDir(tmpPluginDir);
            fs.createInclude().setName("plugin.xml");
            jarTask.addFileset(fs);
        } catch (IOException ex) {
            throw new BuildException(ex);
        }
View Full Code Here

            } else {
                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()));
                    }
                }
            }
        } catch (Exception ex) {
View Full Code Here

    {
        // Clean up stuff previously put in the temporary directory
        Delete delete = (Delete) createAntTask("delete");
        FileSet fileSet = new FileSet();
        fileSet.setDir(theTmpDir);
        fileSet.createInclude().setName("**/*");
        delete.addFileset(fileSet);
        delete.setIncludeEmptyDirs(true);
        delete.setFailOnError(false);
        delete.execute();
    }
View Full Code Here

        // invoke the main class
        Java java = createJavaForShutDown();
        Path classpath = java.createClasspath();
        FileSet fileSet = new FileSet();
        fileSet.setDir(this.dir);
        fileSet.createInclude().setName("*.jar");
        classpath.addFileset(fileSet);
        java.setClassname("com.evermind.client.orion.OrionConsoleAdmin");
        java.createArg().setValue("ormi://" + this.getServer() + ":23791/");
        java.createArg().setValue("admin");
        java.createArg().setValue("password");
View Full Code Here

        // invoke the main class
        Java java = createJavaForStartUp();
        Path classpath = java.createClasspath();
        FileSet fileSet = new FileSet();
        fileSet.setDir(this.dir);
        fileSet.createInclude().setName("*.jar");
        classpath.addFileset(fileSet);
        addToolsJarToClasspath(classpath);
        java.setClassname("com.evermind.server.ApplicationServer");
        java.createArg().setValue("-config");
        java.createArg().setFile(new File(tmpDir, "conf/server.xml"));
View Full Code Here

            }
            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

                ne.setName("**/*");
            } else {
                CacheManager cache = getCacheManager();
                for (Iterator iter = paths.iterator(); iter.hasNext();) {
                    Artifact a = (Artifact) iter.next();
                    NameEntry ne = fileset.createInclude();
                    ne.setName(cache.getArchivePathInCache(a, cache.getSavedArtifactOrigin(a)));
                }
            }
        } catch (Exception ex) {
            throw new BuildException("impossible to build ivy cache fileset: " + ex, ex);
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.