Package org.knopflerfish.ant.taskdefs.bundle.BundleArchives

Examples of org.knopflerfish.ant.taskdefs.bundle.BundleArchives.BundleArchive


  private String basToString(final BundleArchives bas) {
    final StringBuffer res = new StringBuffer();

    if (null != bas) {
      for (Iterator it = bas.allBundleArchives.iterator(); it.hasNext();) {
        final BundleArchive ba = (BundleArchive) it.next();

        if (0 < res.length()) {
          res.append("<br>\n");
        }
        res.append(providerToString(ba));
View Full Code Here


  private String providersToString(final Set providers) {
    final StringBuffer res = new StringBuffer();

    for (Iterator it = providers.iterator(); it.hasNext();) {
      final BundleArchive ba = (BundleArchive) it.next();

      if (0 < res.length()) {
        res.append(", ");
      }
      res.append(providerToString(ba));
View Full Code Here

    while (it.hasNext()) {
      final Map.Entry entry = (Map.Entry) it.next();
      final Set bsnSet = (Set) entry.getValue();
      // Sorted set with bundle archives, same bsn, different versions
      for (Iterator itV = bsnSet.iterator(); itV.hasNext();) {
        final BundleArchive ba = (BundleArchive) itV.next();
        final String targetName = ba.bsn + "-" + ba.version;
        targetNames.append(",").append(targetName);

        final Comment comment = doc.createComment(ba.relPath);
        final Element target = doc.createElement("target");
        target.setAttribute("name", targetName);

        final Element mvnDeployBundle = doc.createElement("mvn_deploy_bundle");
        target.appendChild(doc.createTextNode("\n"+prefix2));
        target.appendChild(mvnDeployBundle);

        mvnDeployBundle.setAttribute("projDirName", ba.projectName);
        addMavenCoordinates(mvnDeployBundle, ba);
        mvnDeployBundle.setAttribute("artifactName", ba.name);
        mvnDeployBundle.setAttribute("artifactBundle", ba.file.getAbsolutePath());
        mvnDeployBundle.setAttribute("packing", "jar");

        // Optional attributes
        final String description = ba.getBundleDescription();
        if (null != description) {
          mvnDeployBundle.setAttribute("description", description);
        }

        if (null!=settingsFile) {
View Full Code Here

    while (it.hasNext()) {
      final Map.Entry entry = (Map.Entry) it.next();
      final Set bsnSet = (Set) entry.getValue();
      // Sorted set with bundle archives, same bsn, different versions
      for (Iterator itV = bsnSet.iterator(); itV.hasNext();) {
        final BundleArchive ba = (BundleArchive) itV.next();

        dependencies.appendChild(doc.createTextNode("\n\n" +prefix2));
        dependencies.appendChild(doc.createComment(ba.relPath));
        dependencies.appendChild(doc.createTextNode("\n" +prefix2));

        final Element dependency = doc.createElement("dependency");
        dependencies.appendChild(dependency);

        // Dummy element to read mvn coordinates from
        final Element coordinateEl = doc.createElement("dummy");
        addMavenCoordinates(coordinateEl, ba);
        addMavenCoordinates(coordinateEl, dependency, prefix3);

        dependency.appendChild(doc.createTextNode("\n" +prefix2));

        // Bundle metadata for xsl rendering
        final Element bundle = doc.createElement("bundle");
        bundles.appendChild(doc.createTextNode("\n" +prefix2));
        bundles.appendChild(bundle);

        bundle.appendChild(doc.createTextNode("\n" +prefix3));
        final Element name = doc.createElement("name");
        bundle.appendChild(name);
        name.appendChild(doc.createTextNode(ba.name));
        log("name: " +ba.name, Project.MSG_VERBOSE);

        String description = ba.getBundleDescription();
        log("description: " +description, Project.MSG_VERBOSE);
        if (null==description) {
          description = "";
        }
        bundle.appendChild(doc.createTextNode("\n" +prefix3));
View Full Code Here

      while (itBSN.hasNext()) {
        final Map.Entry entry = (Map.Entry) itBSN.next();
        final Set bsnSet = (Set) entry.getValue();
        // Sorted set with bundle archives, same BSN, different versions
        for (Iterator itV = bsnSet.iterator(); itV.hasNext();) {
          final BundleArchive ba = (BundleArchive) itV.next();
          writeBundlePage(ba);
        }
      }

      final String mainPageTemplate = Util.loadFile(getBundleMainTemplate().getAbsolutePath());
View Full Code Here

    if(ba.pkgProvidedMap.size() == 0) {
      dependingList.append("None found");
    } else {
      for(Iterator it = ba.pkgProvidedMap.entrySet().iterator(); it.hasNext();) {
        final Map.Entry entry = (Map.Entry) it.next();
        final BundleArchive dependentBa = (BundleArchive) entry.getKey();
        final Set pkgs = (Set) entry.getValue();

        String row = replace(bundleRow, "${what}", getPackagesJavadocString(relPathUp, pkgs));
        row = replace(row, "${bundledoc}", relPathUp + getVarMap(dependentBa).get("html.uri"));
        row = stdReplace(dependentBa, row);
View Full Code Here

    if(ba.pkgProvidersMap.size() == 0 && ba.pkgUnprovidedMap.size() == 0) {
      providersList.append("None found");
    } else {
      for(Iterator it = ba.pkgProvidersMap.entrySet().iterator(); it.hasNext();) {
        final Map.Entry entry = (Map.Entry) it.next();
        final BundleArchive providingBa = (BundleArchive) entry.getKey();
        final Set pkgs = (Set) entry.getValue();

        String row = replace(bundleRow, "${what}", getPackagesJavadocString(relPathUp, pkgs));
        row = replace(row, "${bundledoc}", relPathUp + getVarMap(providingBa).get("html.uri"));
        row = stdReplace(providingBa, row);
View Full Code Here

    while (itBSN.hasNext()) {
      final Map.Entry entry = (Map.Entry) itBSN.next();
      final Set bsnSet = (Set) entry.getValue();
      // Sorted set with bundle archives, same BSN, different versions
      for (Iterator itV = bsnSet.iterator(); itV.hasNext();) {
        final BundleArchive ba = (BundleArchive) itV.next();
        bundleList.append(stdReplace(ba, rowTemplate));

        if(0<ba.pkgUnprovidedMap.size()) {
          // Build one row for each unprovided, non-system package
          String urow = stdReplace(ba, indexMainUnresolvedRow);
View Full Code Here

        final Set providerBas = (Set) vpEntry.getValue();

        String row = replace(rowTemplate, "${pkg}", getPackageJavadocString(null, "", pkg, version));
        final StringBuffer sbProviders = new StringBuffer();
        for (Iterator itP = providerBas.iterator(); itP.hasNext(); ) {
          BundleArchive provider = (BundleArchive) itP.next();
          sbProviders.append(stdReplace(provider, indexListRow));
        }
        sb.append(replace(row, "${providers}", sbProviders.toString()));
      }
    }
View Full Code Here

TOP

Related Classes of org.knopflerfish.ant.taskdefs.bundle.BundleArchives.BundleArchive

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.