Class RootConfig

java.lang.Object
network.ike.plugin.adoc.RootConfig

public final class RootConfig extends Object
The one .asciidoctorconfig of a repository, at its root, so the IDE preview of every module resolves includes in the union (design topic dev-adoc-packages). The file comes from the asciidoctorconfig classifier of ike-build-standards.

It is installed by the goal that writes the union and not by a stock unpack, because every module with AsciiDoc sources would write the one file: under -T, which IKE repositories use by default, a stock unpack in two modules at once fails the build. The caller holds the union's lock. A file that already has this content is left alone, and a new one arrives by atomic move, so a concurrent reader never sees a partial file.

  • Field Details

    • FILE_NAME

      public static final String FILE_NAME
      The file's name, at the root of the classifier's zip and of the repository.
      See Also:
    • CLASSIFIER

      public static final String CLASSIFIER
      The classifier of the ike-build-standards zip that holds the file.
      See Also:
  • Method Details

    • install

      public static boolean install(Path zip, Path root) throws IOException
      Installs the file from a classifier zip into a repository root.
      Parameters:
      zip - the classifier's zip
      root - the repository root
      Returns:
      whether the file was written; false when it already had this content
      Throws:
      IOException - if the zip holds no such file, or the file cannot be written