Examples of execute()


Examples of org.apache.tomee.webapp.command.impl.RunScript.execute()

                readJsFile("/Test.js")
        });
        this.myParameterMap.put("engineName", new String[]{"js"});

        final RunScript shell = new RunScript();
        final Object result = shell.execute(new Params(myReq, myResp));

        assertEquals("myValue", result);
    }

    private String readJsFile(String fileName) throws IOException {
View Full Code Here

Examples of org.apache.tomee.webapp.installer.Runner.execute()

            EasyMock.expectLastCall().andReturn(new Alerts()).anyTimes();


            final Runner runner = new Runner(installer);
            EasyMock.replay(paths, installer);
            Assert.assertEquals("NONE", getValue("status", runner.execute(false)));
            Assert.assertEquals("NONE", getValue("status", runner.execute(false)));
            Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(true)));
            Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(false)));
            Assert.assertEquals("REBOOT_REQUIRED", getValue("status", runner.execute(true)));
            EasyMock.verify(paths, installer);
View Full Code Here

Examples of org.apache.tools.ant.Target.execute()

                newCurrent.setName("");
                context.setCurrentTarget(newCurrent);
                context.setCurrentTargets(new HashMap<String, Target>());
                context.setImplicitTarget(newCurrent);
                parse(project, source, new RootHandler(context, mainHandler));
                newCurrent.execute();
            } finally {
                context.setCurrentTarget(currentTarget);
                context.setImplicitTarget(currentImplicit);
                context.setCurrentTargets(currentTargets);
            }
View Full Code Here

Examples of org.apache.tools.ant.Task.execute()

       
        Task mockTask = (Task)taskCtrl.getMock();
        mockTask.getProject();
        taskCtrl.setReturnValue(project, 2);
        mockTask.maybeConfigure();
        mockTask.execute();
       
        taskCtrl.replay();
        xhTask.addTask(mockTask);
        xhTask.execute();
        taskCtrl.verify();
View Full Code Here

Examples of org.apache.tools.ant.UnknownElement.execute()

        mockUke.maybeConfigure();
        mockUke.getLocation();
        ukeCtrl.setReturnValue(new Location(""));
        mockUke.getTask();
        ukeCtrl.setReturnValue(null);
        mockUke.execute();
        ukeCtrl.setThrowable(new BuildException());

        ukeCtrl.replay();
        group.addTask(mockUke);
        try {
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Ant.execute()

                    }
                }

                Message.verbose("triggering build: " + f + " target=" + target + " for " + event);
                try {
                    ant.execute();
                } catch (BuildException e) {
                    Message.verbose("Exception occurred while executing target " + target);
                    throw e;
                }
                markBuilt(f);
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.BZip2.execute()

            BZip2 bzip2Task = new BZip2();
            bzip2Task.setProject( project );
            bzip2Task.setDestfile( finalFile );
            bzip2Task.setSrc( tarFile );
            bzip2Task.execute();

            if ( !tarFile.delete() )
            {
                Exception e = new IOException( I18n.err( I18n.ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY, tarFile ) );
                log.error( e.getLocalizedMessage() );
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.CallTarget.execute()

                p.setName(prefix == null ? key : prefix + key);
                p.setValue(value == null ? "" : value);
            }

            Message.verbose("triggering ant call: target=" + target + " for " + event);
            call.execute();
            markTriggered(event);

            Message.debug("triggered ant call finished: target=" + target + " for " + event);
        }
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Checksum.execute()

        checksum.setProject(getProject());
        checksum.setAlgorithm("SHA1");
        checksum.setFile(srcFile);
        String property = MavenPublishTask.class.getName()+".checksum.property."+srcFile.getAbsolutePath();
        checksum.setProperty(property);
        checksum.execute();
       
        Echo echo = new Echo();
        echo.setProject(getProject());
       
        File checksumFile = new File(targetFile.getParentFile(), targetFile.getName()+".sha1");
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Chmod.execute()

    private void createExecutablePermission(File unixScriptFile) {
        Chmod chmod = new Chmod();
        chmod.setProject(AntUtil.createProject());
        chmod.setFile(unixScriptFile);
        chmod.setPerm("ugo+rx");
        chmod.execute();
    }

    private void createWindowsScript(String jarPath, File scriptDestinationDir, String wrapperPropertiesPath) throws IOException {
        String windowsWrapperScriptHead = IOUtils.toString(getClass().getResourceAsStream("windowsWrapperScriptHead.txt"));
        String windowsWrapperScriptTail = IOUtils.toString(getClass().getResourceAsStream("windowsWrapperScriptTail.txt"));
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.