org.apache.tools.ant.BuildListener Java Examples

The following examples show how to use org.apache.tools.ant.BuildListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LangtoolsIdeaAntLogger.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public LangtoolsIdeaAntLogger(Project project) {
    for (Object o : project.getBuildListeners()) {
        if (o instanceof DefaultLogger) {
            this.logger = (DefaultLogger)o;
            project.removeBuildListener((BuildListener)o);
            project.addBuildListener(this);
        }
    }
    logger.setMessageOutputLevel(3);
    tasks.push(Task.ROOT);
}
 
Example #2
Source File: JdkIdeaAntLogger.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public JdkIdeaAntLogger(Project project) {
    for (Object o : project.getBuildListeners()) {
        if (o instanceof DefaultLogger) {
            this.logger = (DefaultLogger)o;
            project.removeBuildListener((BuildListener)o);
            project.addBuildListener(this);
        }
    }
    tasks.push(Task.ROOT);
}
 
Example #3
Source File: AntRunner.java    From spoofax with Apache License 2.0 5 votes vote down vote up
public AntRunner(IResourceService resourceService, FileObject antFile, FileObject baseDir,
    Map<String, String> properties, @SuppressWarnings("unused") @Nullable URL[] classpaths,
    @Nullable BuildListener listener) {
    this.antProject = new Project();

    final File localAntFile = resourceService.localFile(antFile);
    final File localBaseDir = resourceService.localPath(baseDir);

    // TODO: use classpaths

    antProject.setProperty(MagicNames.ANT_FILE, localAntFile.getPath());
    antProject.setBaseDir(localBaseDir);
    antProject.init();
    if(listener != null) {
        antProject.addBuildListener(listener);
    }

    final PropertyHelper propHelper = PropertyHelper.getPropertyHelper(antProject);
    antProject.addReference(MagicNames.REFID_PROPERTY_HELPER, propHelper);
    for(Entry<String, String> property : properties.entrySet()) {
        propHelper.setUserProperty(property.getKey(), property.getValue());
    }

    final ProjectHelper projectHelper = ProjectHelper.getProjectHelper();
    antProject.addReference(MagicNames.REFID_PROJECT_HELPER, projectHelper);
    projectHelper.parse(antProject, localAntFile);
}
 
Example #4
Source File: DefaultAntBuilderFactory.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultAntBuilderFactory(BuildListener buildListener, Project project) {
    this.buildListener = buildListener;
    this.project = project;
}
 
Example #5
Source File: DefaultAntBuilderFactory.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultAntBuilderFactory(BuildListener buildListener, Project project) {
    this.buildListener = buildListener;
    this.project = project;
}
 
Example #6
Source File: DefaultAntBuilderFactory.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultAntBuilderFactory(BuildListener buildListener, Project project) {
    this.buildListener = buildListener;
    this.project = project;
}
 
Example #7
Source File: DefaultAntBuilderFactory.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultAntBuilderFactory(BuildListener buildListener, Project project) {
    this.buildListener = buildListener;
    this.project = project;
}
 
Example #8
Source File: IAntRunnerService.java    From spoofax with Apache License 2.0 4 votes vote down vote up
IAntRunner get(FileObject antFile, FileObject baseDir, Map<String, String> properties, @Nullable URL[] classpaths,
@Nullable BuildListener listener);
 
Example #9
Source File: AntRunnerService.java    From spoofax with Apache License 2.0 4 votes vote down vote up
@Override public IAntRunner get(FileObject antFile, FileObject baseDir, Map<String, String> properties,
    @Nullable URL[] classpaths, @Nullable BuildListener listener) {
    return new AntRunner(resourceService, antFile, baseDir, properties, classpaths, listener);
}