Package org.apache.easyant.core.report

Examples of org.apache.easyant.core.report.ExtensionPointReport


        getProject().log(
                LINE_SEP + "--- Available references for: " + target + " in current project: " + getProject().getName()
                        + " ---" + LINE_SEP);

        ExtensionPointReport extensionPointRep = getEareport().getExtensionPointReport(target);
        if (extensionPointRep != null) {
            getProject().log("\tExtension Point: " + target);
            getProject().log(
                    "\t\tDescription: "
                            + (extensionPointRep.getDescription() == null ? NONE : extensionPointRep.getDescription()));
            getProject().log(
                    "\t\tDepends: " + (extensionPointRep.getDepends() == null ? NONE : extensionPointRep.getDepends()));
            getProject().log(LINE_SEP + "\t\tFor information on targets attached to this extension-point, run:");
            getProject().log("\t\teasyant -listTargets " + target);
        } else {
            getProject().log("\tNo extension point found for name: " + target);
        }
View Full Code Here


                    LINE_SEP + "No ExtensionPoint / Plugin specified. Listing all targets available in the project.");

            List<TargetReport> targets = getEareport().getTargetReports();
            printTargets(targets, getProject());
        } else {
            ExtensionPointReport extensionPointRep = getEareport().getExtensionPointReport(container);

            if (extensionPointRep != null) {
                getProject().log("Targets for ExtensionPoint: " + container);
                List<TargetReport> targets = extensionPointRep.getTargetReports();
                printTargets(targets, getProject());
            } else {
                getProject().log("\tNo ExtensionPoint found by name: " + container);
            }
View Full Code Here

        // check the value of the property
        Assert.assertEquals("org.apache.easyant.example.Example", property.getValue());

        // check that package ExtensionPoint exists and that jar:jar target is bound to
        // this extension-point
        ExtensionPointReport packageEP = null;
        for (ExtensionPointReport extensionPoint : eaReport.getExtensionPointReports()) {
            if ("package".equals(extensionPoint.getName())) {
                packageEP = extensionPoint;
                break;
            }
        }
        Assert.assertNotNull(packageEP);
        Assert.assertEquals("compile,abstract-package:package,hello-world", packageEP.getDepends());

        List<TargetReport> targets = packageEP.getTargetReports();
        Set<String> expectedTargets = new HashSet<String>(Arrays.asList("hello-world"));
        Assert.assertEquals(expectedTargets.size(), targets.size());

        for (TargetReport target : packageEP.getTargetReports()) {
            Assert.assertTrue("expected to find " + target.getName(), expectedTargets.remove(target.getName()));
        }

        TargetReport helloWorld = eaReport.getTargetReport("hello-world");
        Assert.assertNotNull(helloWorld);
View Full Code Here

                eaReport.addTargetReport(targetReport);

                Message.debug("Ant file has a target called : " + targetReport.getName());
            } else {
                ExtensionPointReport extensionPoint = new ExtensionPointReport(target.getName());
                StringBuilder sb = new StringBuilder();
                Enumeration<?> targetDeps = target.getDependencies();
                while (targetDeps.hasMoreElements()) {
                    String t = (String) targetDeps.nextElement();
                    sb.append(t);
                    if (targetDeps.hasMoreElements()) {
                        sb.append(",");
                    }
                }
                extensionPoint.setDepends(sb.toString());
                extensionPoint.setDescription(target.getDescription());
                eaReport.addExtensionPointReport(extensionPoint);
                Message.debug("Ant file has an extensionPoint called : " + extensionPoint.getName());
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.easyant.core.report.ExtensionPointReport

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.