Package org.apache.tools.ant

Examples of org.apache.tools.ant.BuildListener


            }
        }

        AntMessageLogger logger = new AntMessageLogger(task);
        ivy.getLoggerEngine().pushLogger(logger);
        task.getProject().addBuildListener(new BuildListener() {
            private int stackDepth = 0;

            public void buildFinished(BuildEvent event) {
            }
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

     *            the ivy instance on which the logger should be registered
     */
    public static void register(Task task, final Ivy ivy) {
        AntMessageLogger logger = new AntMessageLogger(task);
        ivy.getLoggerEngine().pushLogger(logger);
        task.getProject().addBuildListener(new BuildListener() {
            private int stackDepth = 0;

            public void buildFinished(BuildEvent event) {
            }

View Full Code Here

    newProject.init ( ) ;
    //  Deal with GANT-80 by getting all the the loggers from the Ant instance Project object and adding
    //  them to the new Project Object.  This was followed up by GANT-91 so the code was amended to copying
    //  over all listeners except the class loader if present.
    for ( final Object o : antProject.getBuildListeners ( ) ) {
      final BuildListener listener = (BuildListener) o ;
      if ( ! ( listener instanceof AntClassLoader ) ) { newProject.addBuildListener ( listener ) ; }
    }
    //  Deal with GANT-50 by getting the base directory from the Ant instance Project object and use it for
    //  the new Project object.  GANT-93 leads to change in the way the Gant file is extracted.
    newProject.setBaseDir ( antProject.getBaseDir ( ) ) ;
View Full Code Here

    /**
     * @param aTask
     */
    public AntMessageImpl(Task aTask) {
        task = aTask;
        aTask.getProject().addBuildListener(new BuildListener() {
            private int stackDepth = 0;

            public void buildFinished(BuildEvent event) {
            }

View Full Code Here

    /**
     * @param task
     */
    public AntMessageImpl(Task task) {
        _task = task;
        task.getProject().addBuildListener(new BuildListener() {
            private int stackDepth = 0;
      public void buildFinished(BuildEvent event) {
            }
            public void buildStarted(BuildEvent event) {
            }
View Full Code Here

      LOG.debug("Step didn't produce results, no need to notifying listeners");
      return;
    }

    for (final Iterator iter = getProject().getBuildListeners().iterator(); iter.hasNext();) {
      final BuildListener listener = (BuildListener) iter.next();
      if (listener instanceof IStepResultListener) {
        LOG.debug("Notifying " + listener + " of " + results.size() + " results");
        ((IStepResultListener) listener).stepResults(results);
      }
    }
View Full Code Here

    if (!str.equals(value))
    {
      LOG.debug("Notifying listeners of properties expansion: " + value + " -> " + str);
        for (final Iterator iter=fProject.getBuildListeners().iterator(); iter.hasNext();)
        {
          final BuildListener listener = (BuildListener) iter.next();
          if (listener instanceof IPropertyExpansionListener)
          {
            ((IPropertyExpansionListener) listener).propertiesExpanded(value, str);
          }
        }
View Full Code Here

    public void setParentTask(Task t) {
        parentTask = t;
    }

    public void setCurrentTestProject(Project p) {
        p.addBuildListener(new BuildListener() {
                public void buildStarted(BuildEvent event) {}
                public void buildFinished(BuildEvent event) {}
                public void targetStarted(BuildEvent event) {}
                public void targetFinished(BuildEvent event) {}
                public void taskStarted(BuildEvent event) {}
View Full Code Here

        // Add the default listener
        project.addBuildListener(createLogger());

        for (int i = 0; i < configuration.getListeners().size(); i++) {
            String className = (String) configuration.getListeners().elementAt(i);
            BuildListener listener = (BuildListener) ClasspathUtils.newInstance(className,
                    EasyAntEngine.class.getClassLoader(), BuildListener.class);
            project.setProjectReference(listener);

            project.addBuildListener(listener);
        }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.BuildListener

Copyright © 2018 www.massapicom. 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.