Package org.apache.tools.ant

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


        } catch (RuntimeException exc) {
            error = exc;
            throw exc;
        } finally {
            if (error != null) {
                project.log(error.toString(), Project.MSG_ERR);
            }
        }
    }

    /**
 
View Full Code Here


                        // this property set by LoadModule task when it
                        // configures the build repo
                        String resolver = subModule.getProperty(EasyAntMagicNames.EASYANT_BUILD_REPOSITORY);

                        subModule.log("Publishing in build scoped repository", Project.MSG_INFO);
                        // Publish on build scoped repository
                        IvyPublish ivyPublish = new IvyPublish();
                        ivyPublish.setSettingsRef(IvyInstanceHelper.buildProjectIvyReference(subModule));
                        ivyPublish.setResolver(resolver);
                        // TODO: this should be more flexible!
View Full Code Here

                        ivyPublish.setLocation(getLocation());
                        ivyPublish.setOverwrite(overwrite);
                        ivyPublish.setTaskName("publish-buildscoped-repository");
                        ivyPublish.execute();
                    } else {
                        subModule.log("Skipping publish because " + artifactsDir.getPath() + " is not a directory",
                                Project.MSG_VERBOSE);
                    }
                }
            } else {
                subModule.log("Skipping sub-project build because no matching targets were found", Project.MSG_VERBOSE);
View Full Code Here

                        subModule.log("Skipping publish because " + artifactsDir.getPath() + " is not a directory",
                                Project.MSG_VERBOSE);
                    }
                }
            } else {
                subModule.log("Skipping sub-project build because no matching targets were found", Project.MSG_VERBOSE);
            }
            subModule.fireSubBuildFinished(null);
        } catch (BuildException e) {
            subModule.fireSubBuildFinished(e);
            throw e;
View Full Code Here

    public void progress(IvyEvent event) {
        try {
            Project project = (Project) IvyContext.peekInContextStack(IvyTask.ANT_PROJECT_CONTEXT_KEY);
            if (project != null) {
                project.log("[buildinfo:collect] Received Event: " + event.getName(), Project.MSG_DEBUG);
            }
            if (EndResolveEvent.NAME.equals(event.getName())) {
                collectDependencyInformation(event);
            } else if (EndArtifactPublishEvent.NAME.equals(event.getName())) {
                collectModuleInformation(event);
View Full Code Here

    private void collectDependencyInformation(IvyEvent event) {
        Project project = (Project) IvyContext.peekInContextStack(IvyTask.ANT_PROJECT_CONTEXT_KEY);
        ResolveReport report = ((EndResolveEvent) event).getReport();
        @SuppressWarnings("unchecked") Map<String, String> attributes = event.getAttributes();
        Module module = getOrCreateModule(attributes);
        project.log("[buildinfo:collect] Collecting dependencies for " + module.getId(), Project.MSG_INFO);
        if (module.getDependencies() == null || module.getDependencies().isEmpty()) {
            String[] configurations = report.getConfigurations();
            List<Dependency> moduleDependencies = Lists.newArrayList();
            for (String configuration : configurations) {
                project.log("[buildinfo:collect] Configuration: " + configuration + " Dependencies", Project.MSG_DEBUG);
View Full Code Here

        project.log("[buildinfo:collect] Collecting dependencies for " + module.getId(), Project.MSG_INFO);
        if (module.getDependencies() == null || module.getDependencies().isEmpty()) {
            String[] configurations = report.getConfigurations();
            List<Dependency> moduleDependencies = Lists.newArrayList();
            for (String configuration : configurations) {
                project.log("[buildinfo:collect] Configuration: " + configuration + " Dependencies", Project.MSG_DEBUG);
                ConfigurationResolveReport configurationReport = report.getConfigurationReport(configuration);
                ArtifactDownloadReport[] allArtifactsReports = configurationReport.getAllArtifactsReports();
                for (final ArtifactDownloadReport artifactsReport : allArtifactsReports) {
                    project.log(
                            "[buildinfo:collect] Artifact Download Report for configuration: " + configuration + " : " + artifactsReport,
View Full Code Here

            for (String configuration : configurations) {
                project.log("[buildinfo:collect] Configuration: " + configuration + " Dependencies", Project.MSG_DEBUG);
                ConfigurationResolveReport configurationReport = report.getConfigurationReport(configuration);
                ArtifactDownloadReport[] allArtifactsReports = configurationReport.getAllArtifactsReports();
                for (final ArtifactDownloadReport artifactsReport : allArtifactsReports) {
                    project.log(
                            "[buildinfo:collect] Artifact Download Report for configuration: " + configuration + " : " + artifactsReport,
                            Project.MSG_DEBUG);
                    ModuleRevisionId id = artifactsReport.getArtifact().getModuleRevisionId();
                    String type = getType(artifactsReport.getArtifact());
                    Dependency dependency = findDependencyInList(id, type, moduleDependencies);
View Full Code Here

                        String md5 = checksums.get(MD5);
                        String sha1 = checksums.get(SHA1);
                        dependencyBuilder.md5(md5).sha1(sha1);
                        dependency = dependencyBuilder.build();
                        moduleDependencies.add(dependency);
                        project.log(
                                "[buildinfo:collect] Added dependency '" + dependency.getId() + "'", Project.MSG_DEBUG);
                    } else {
                        if (!dependency.getScopes().contains(configuration)) {
                            dependency.getScopes().add(configuration);
                            project.log(
View Full Code Here

                        project.log(
                                "[buildinfo:collect] Added dependency '" + dependency.getId() + "'", Project.MSG_DEBUG);
                    } else {
                        if (!dependency.getScopes().contains(configuration)) {
                            dependency.getScopes().add(configuration);
                            project.log(
                                    "[buildinfo:collect] Added scope " + configuration +
                                            " to dependency '" + dependency.getId() + "'", Project.MSG_DEBUG);
                        } else {
                            project.log(
                                    "[buildinfo:collect] Find same dependency twice in configuration '" + configuration +
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.