Package org.apache.tools.ant

Examples of org.apache.tools.ant.Project.addBuildListener()


        return hudsuckr;
    }
   
    private String runHudsuckr(String... args) {
      Project p = new Project();
        p.addBuildListener(new AntJettyLoggerBuildListener(log));
        ExecTask exec = new ExecTask();
        exec.setProject(p);
        exec.setTaskType("hudsuckr");
        exec.setExecutable(extractHudsuckr().getAbsolutePath());
        exec.setFailonerror(false);
View Full Code Here


        return values;
    }
   
    protected void downloadWithAnt(final URL url, final File outputFile) {
        Project p = new Project();
        p.addBuildListener(new AntJettyLoggerBuildListener(LOGGER));
        Get g = new Get();
        g.setProject(p);
        g.setSrc(url);
        g.setDest(outputFile);
        g.execute();
View Full Code Here

            }

            project.setUserProperty("XmlLogger.file", logFile.getAbsolutePath());

            XmlLogger logger = new XmlLogger();
            project.addBuildListener(logger);
            project.fireBuildStarted();

            project.init();
            project.setBaseDir(publicationDirectory);
View Full Code Here

        }
    }

    public void testUseLauncher() throws Exception {
        Project project = new Project();
        project.addBuildListener(new BuildListener() {
            public final void buildStarted(BuildEvent event) {
            }
            public final void buildFinished(BuildEvent event) {
            }
            public final void targetStarted(BuildEvent event) {
View Full Code Here

                project.setProperty(property.getKey().toString(), property.getValue().toString());
            }

            // notice we add our listener after we set the properties - we do not want the password to be in the log file
            // our dbupgrade script will echo the property settings, so we can still get the other values
            project.addBuildListener(new LoggerAntBuildListener(logFileOutput));

            for (Map.Entry<Object, Object> taskDef : taskDefs.entrySet()) {
                project.addTaskDefinition(taskDef.getKey().toString(),
                    Class.forName(taskDef.getValue().toString(), true, classLoader));
            }
View Full Code Here

            project.init();

            // notice we are adding the listener before we set the properties - if we do not want the
            // the properties echoed out in the log (e.g. if they contain sensitive passwords)
            // we should do this after we set the properties.
            project.addBuildListener(new LoggerAntBuildListener(target, logFileOutput, Project.MSG_DEBUG));
            if (logStdOut) {
                PrintWriter stdout = new PrintWriter(System.out);
                project.addBuildListener(new LoggerAntBuildListener(target, stdout, Project.MSG_INFO));
            }
View Full Code Here

            // the properties echoed out in the log (e.g. if they contain sensitive passwords)
            // we should do this after we set the properties.
            project.addBuildListener(new LoggerAntBuildListener(target, logFileOutput, Project.MSG_DEBUG));
            if (logStdOut) {
                PrintWriter stdout = new PrintWriter(System.out);
                project.addBuildListener(new LoggerAntBuildListener(target, stdout, Project.MSG_INFO));
            }

            if (properties != null) {
                for (Map.Entry<Object, Object> property : properties.entrySet()) {
                    project.setProperty(property.getKey().toString(), property.getValue().toString());
View Full Code Here

                project.setProperty(property.getKey().toString(), property.getValue().toString());
            }

            // notice we add our listener after we set the properties - we do not want the password to be in the log file
            // our dbupgrade script will echo the property settings, so we can still get the other values
            project.addBuildListener(new LoggerAntBuildListener(logFileOutput));

            for (Map.Entry<Object, Object> taskDef : taskDefs.entrySet()) {
                project.addTaskDefinition(taskDef.getKey().toString(), Class.forName(taskDef.getValue().toString(),
                    true, classLoader));
            }
View Full Code Here

        MockControl prCtrl = MockClassControl.createControl(Project.class);
        prCtrl.setDefaultMatcher(MockControl.ALWAYS_MATCHER);
        Project project = (Project)prCtrl.getMock();
        project.setNewProperty("prop", "true");
        prCtrl.setVoidCallable(2);
        project.addBuildListener(null);
        prCtrl.setVoidCallable(3);

        MockControl xhCtrl = MockClassControl.createControl(XharnessTask.class);
        XharnessTask xhTask = (XharnessTask)xhCtrl.getMock();
        xhTask.getName();
View Full Code Here

     
      Project project=new Project();
     
      AntServletLogger log=new AntServletLogger();
      log.setWriter( out );
      project.addBuildListener( log );
     
      project.init();

      Enumeration argsE=args.propertyNames();
      while( argsE.hasMoreElements() ) {
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.