Class PackageManifest

java.lang.Object
network.ike.docs.plugin.packages.PackageManifest

public final class PackageManifest extends Object
The manifest a library ships beside its registry, META-INF/ike/<groupId>/<artifactId>/manifest.yaml (dev-adoc-packages, IKE-Network/ike-issues#1341): generated by the build from the POM and the tree, never kept by hand. It declares the artifact's coordinates, the packages it ships with their kind, and where its registry is, so that the goal that unpacks the union can refuse two libraries that ship one package, naming both, and a tool can list the libraries present by listing the metadata area.
coordinates: network.ike.lab:unlv-topics
packages:
  - name: network.ike.lab/aip
    kind: topics
  - name: network.ike.lab/unlv
    kind: library
registry: META-INF/ike/network.ike.lab/unlv-topics/topic-registry.yaml
Since:
136
  • Field Details

  • Method Details

    • model

      public static Map<String,Object> model(Path root, String groupId, String artifactId, String libraryPackage) throws IOException
      The manifest as an ordered map, ready for YAML.
      Parameters:
      root - the AsciiDoc root
      groupId - the library's group id
      artifactId - the library's artifact id
      libraryPackage - the package ike.adoc.library-package names as the library's own, or null
      Returns:
      the manifest model
      Throws:
      IOException - if the tree cannot be read
    • model

      public static Map<String,Object> model(List<AdocPackages.Package> packages, String groupId, String artifactId)
      The manifest as an ordered map from packages already enumerated.
      Parameters:
      packages - the packages, from AdocPackages.packages(Path, String)
      groupId - the library's group id
      artifactId - the library's artifact id
      Returns:
      the manifest model
    • yaml

      public static String yaml(Map<String,Object> model)
      Render the manifest as YAML.
      Parameters:
      model - the model from model(Path, String, String, String)
      Returns:
      the YAML text