Class KbCreatePublishMojo

java.lang.Object
network.ike.plugin.KbCreatePublishMojo
All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo

@Mojo(name="kb-create-publish", projectRequired=false) public class KbCreatePublishMojo extends Object implements org.apache.maven.api.plugin.Mojo
Creates a new knowledge-base project, the executing half of the ike:kb-create-* pair (IKE-Network/ike-issues#1370): pins every knowledge source, writes the POM and files the kb/ templates render, applies the standards scaffold's project scope (wrapper, .mvn, .gitignore, CLAUDE.md, README.md), makes a local git repository with one commit and no remote, and proves the project by running ./mvnw validate in it.

Run ike:kb-create-draft first: publish creates exactly what the draft showed. The folder may exist (a caller may have put the Maven wrapper in it), but never with a pom.xml or a .git in it. The project's <scm> names its own folder as a file: URL until a remote is added (decision 4).

Since:
280
  • Constructor Details

    • KbCreatePublishMojo

      public KbCreatePublishMojo()
      Creates this goal instance.
  • Method Details

    • execute

      public void execute()
      Creates, commits and validates the project.
      Specified by:
      execute in interface org.apache.maven.api.plugin.Mojo
      Throws:
      org.apache.maven.api.plugin.MojoException - if the folder already holds a project, a knowledge source cannot be pinned, a file cannot be written, git fails, or the new project does not validate