Examples of BuildListener


Examples of org.apache.tools.ant.BuildListener

        // 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

Examples of org.apache.tools.ant.BuildListener

        project.log("removing current logger", Project.MSG_DEBUG);
        // since DefaultLogger doesn't offer any way to get the out / err print
        // streams we should use reflection
        // TODO: we should find a better way to do this
        for (Iterator<?> i = project.getBuildListeners().iterator(); i.hasNext();) {
            BuildListener l = (BuildListener) i.next();
            if (l instanceof DefaultLogger) {
                try {
                    Field fieldOut = DefaultLogger.class.getDeclaredField("out");
                    fieldOut.setAccessible(true);
                    out = (PrintStream) fieldOut.get(l);
View Full Code Here

Examples of org.apache.tools.ant.BuildListener

    private Project configureSubModule(File file, File directory) {
        Project subModule = getProject().createSubProject();

        subModule.setJavaVersionProperty();
        for (int i = 0; i < getProject().getBuildListeners().size(); i++) {
            BuildListener buildListener = (BuildListener) getProject().getBuildListeners().elementAt(i);
            subModule.addBuildListener(buildListener);
        }
        // explicitly add the execution timer to time
        // sub builds
        subModule.addBuildListener(new SubBuildExecutionTimer());
View Full Code Here

Examples of org.apache.tools.ant.BuildListener

     *            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

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

Examples of org.apache.tools.ant.BuildListener

        Assert.assertEquals(action.getPropertyFilePath(), "/ant/build.properties");
    }
   
    @Test
    public void testAntRunBuilderWithBuildListener() {
        final BuildListener buildListener = EasyMock.createMock(BuildListener.class);
       
        MockBuilder builder = new MockBuilder(applicationContext) {
            @Override
            public void configure() {
                antrun("com/consol/ant/build.xml")
View Full Code Here

Examples of org.apache.tools.ant.BuildListener

            }
        }
        CeylonClassLoader loader = Launcher.getClassLoader();
        project.addReference(CEYLON_CLASSLOADER_REFERENCE, loader);
        // only add the build listed once, even if we change the class loader later
        project.addBuildListener(new BuildListener(){

            @Override
            public void buildFinished(BuildEvent arg0) {
                project.log("Build done, cleaning up Ceylon class loader", Project.MSG_VERBOSE);
                // make sure we get the latest one
View Full Code Here

Examples of org.apache.tools.ant.BuildListener

         * @param event Event to fire.
         */
        private void fireBuildEvent(BuildEvent event, BuildEventType type) {
            Enumeration en = _antProject.getBuildListeners().elements();
            while(en.hasMoreElements()) {
                BuildListener l = (BuildListener) en.nextElement();
                type.fireEvent(event, l);
            }
        }
View Full Code Here

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

Examples of org.bndtools.build.api.BuildListener

        IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(BndtoolsConstants.CORE_PLUGIN_ID, "buildListeners");
        listeners = new ArrayList<BuildListener>(elements.length);

        for (IConfigurationElement elem : elements) {
            try {
                BuildListener listener = (BuildListener) elem.createExecutableExtension("class");
                listeners.add(listener);
            } catch (Exception e) {
                logger.logError("Unable to instantiate build listener: " + elem.getAttribute("name"), 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.