Examples of FilePath


Examples of hudson.FilePath

        public FilePath getProjectRootDir() {
            return new FilePath(MavenBuild.this.getParent().getRootDir());
        }

        public FilePath getModuleSetRootDir() {
            return new FilePath(MavenBuild.this.getParent().getParent().getRootDir());
        }
View Full Code Here

Examples of hudson.FilePath

        public FilePath getModuleSetRootDir() {
            return new FilePath(MavenBuild.this.getParent().getParent().getRootDir());
        }

        public FilePath getArtifactsDir() {
            return new FilePath(MavenBuild.this.getArtifactsDir());
        }
View Full Code Here

Examples of hudson.FilePath

                        getParent().getParent(), launcher, envVars, getMavenOpts(listener, envVars), null )
                : new MavenProcessFactory(
                        getParent().getParent(), launcher, envVars, getMavenOpts(listener, envVars), null ));

            ArgumentListBuilder margs = new ArgumentListBuilder("-N","-B");
            FilePath localRepo = mms.getLocalRepository().locate(MavenBuild.this);
            if(localRepo!=null)
                // the workspace must be on this node, so getRemote() is safe.
                margs.add("-Dmaven.repo.local="+localRepo.getRemote());

            if (mms.getAlternateSettings() != null) {
                if (IOUtils.isAbsolute(mms.getAlternateSettings())) {
                    margs.add("-s").add(mms.getAlternateSettings());
                } else {
                    FilePath mrSettings = getModuleRoot().child(mms.getAlternateSettings());
                    FilePath wsSettings = getWorkspace().child(mms.getAlternateSettings());
                    if (!wsSettings.exists() && mrSettings.exists())
                        wsSettings = mrSettings;

                    margs.add("-s").add(wsSettings.getRemote());
                }
            }


            margs.add("-f",getModuleRoot().child("pom.xml").getRemote());
View Full Code Here

Examples of hudson.FilePath

        public File allocate() throws Exception {
            File target = NEW.allocate();
            if(source.getProtocol().equals("file")) {
                File src = new File(source.toURI());
                if(src.isDirectory())
                    new FilePath(src).copyRecursiveTo("**/*",new FilePath(target));
                else
                if(src.getName().endsWith(".zip"))
                    new FilePath(src).unzip(new FilePath(target));
            } else {
                File tmp = File.createTempFile("hudson","zip");
                try {
                    FileUtils.copyURLToFile(source,tmp);
                    new FilePath(tmp).unzip(new FilePath(target));
                } finally {
                    tmp.delete();
                }
            }
            return target;
View Full Code Here

Examples of hudson.FilePath

     *            The slave/master root.
     */
    public static Channel createSeleniumGridVM(TaskListener listener) throws IOException, InterruptedException {
        JVMBuilder vmb = new JVMBuilder();
        vmb.systemProperties(null);
        return Channels.newJVM("Selenium Grid", listener, vmb, new FilePath(Hudson.getInstance().getRootDir()),
                new ClasspathBuilder().add(findStandAloneServerJar()));
    }
View Full Code Here

Examples of hudson.FilePath

    public abstract SeleniumRunOptions initOptions(Computer c);

    public void start(Computer computer, TaskListener listener, String name) throws IOException, InterruptedException, ExecutionException {
        PluginImpl p = PluginImpl.getPlugin();

        final FilePath seleniumJar = new FilePath(SeleniumProcessUtils.findStandAloneServerJar());
        final String nodeName = computer.getName();
        final String masterName = PluginImpl.getMasterHostName();

        String nodehost = computer.getHostName();
View Full Code Here

Examples of hudson.FilePath

    /*
     * (non-Javadoc)
     * @see hudson.plugins.selenium.configuration.SeleniumRunner#stop(hudson.model.Computer)
     */
    public void stop(Computer computer, String name) {
        FilePath path = computer.getNode().getRootPath();
        if (path != null) {
            try {
                final String url = computer.getNode().getRootPath().act(new StopSeleniumServer(name));
                PluginImpl.getPlugin().getHubChannel().call(new Callable<Void, Exception>() {

View Full Code Here

Examples of hudson.FilePath

                private static final long serialVersionUID = -288688398601004624L;

                public String invoke(File f, VirtualChannel channel) throws IOException {
                    File conf = new File(f, filename);

                    FilePath urlConf = new FilePath(conf);
                    try {
                        urlConf.copyFrom(new ByteArrayInputStream(config.getBytes()));
                    } catch (InterruptedException e) {
                        throw new IOException2("Failed to write configuration to " + filename, e);
                    }

                    return conf.getAbsolutePath();
View Full Code Here

Examples of hudson.FilePath

                private static final long serialVersionUID = -288688398601004624L;

                public String invoke(File f, VirtualChannel channel) throws IOException {
                    File conf = new File(f, filename);

                    FilePath urlConf = new FilePath(conf);
                    try {
                        urlConf.copyFrom(new URL(configURL));
                    } catch (InterruptedException e) {
                        throw new IOException2("Failed to retrieve configuration from " + configURL, e);
                    }

                    return conf.getAbsolutePath();
View Full Code Here

Examples of hudson.FilePath

        // listener.getLogger().println("Copy grid jar");
        File localJar = new File(f, seleniumJar.getName());
        if (localJar.lastModified() != jarTimestamp) {
            try {
                seleniumJar.copyTo(new FilePath(localJar));
                localJar.setLastModified(jarTimestamp);
            } catch (InterruptedException e) {
                throw new IOException2("Failed to copy grid jar", e);
            }
        }
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.