Class KnowledgeExportMojo
java.lang.Object
network.ike.plugin.KnowledgeExportMojo
- All Implemented Interfaces:
org.apache.maven.api.plugin.Mojo
@Mojo(name="knowledge-export",
defaultPhase="package")
public class KnowledgeExportMojo
extends Object
implements org.apache.maven.api.plugin.Mojo
Exports a ledger-form knowledge set as its protobuf change-set artifact: composes the
project's
KnowledgeSetSource, replays the session into a fresh ephemeral
store, exports the store, and attaches the file as the changeset classifier —
the released form of the set. A starter set is exactly this artifact applied to an
empty base.
The exporter lives tinkar-side (dev.ikm.tinkar.entity.builder.ChangeSetMain)
because this plugin stays tinkar-free (the foundation boundary): the goal builds a
classloader over the project's MAIN_RUNTIME dependency classpath — plus the
project's own classes directory — and invokes the entry point reflectively,
in-process. Unlike ike:knowledge-bindings, export replays into a store, so the
project must carry the tinkar ephemeral/entity/executor providers at runtime scope and
supply their legacy META-INF/services controller registrations in its own
resources (tinkar providers declare services in module-info only; the goal
runs on the classpath).
Typical use — a *-changeset module depending on its *-terms ledger
module plus the providers:
<plugin>
<groupId>network.ike.tooling</groupId>
<artifactId>ike-maven-plugin</artifactId>
<executions>
<execution>
<goals><goal>knowledge-export</goal></goals>
</execution>
</executions>
</plugin>
- Since:
- 234
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
KnowledgeExportMojo
public KnowledgeExportMojo()Creates this goal instance.
-
-
Method Details
-
getLog
protected org.apache.maven.api.plugin.Log getLog()Access the Maven logger.- Returns:
- the logger
-
execute
public void execute()Resolves the project's runtime dependency classpath, invokes the tinkar-side exporter in a classloader over it, and attaches the change-set artifact.- Specified by:
executein interfaceorg.apache.maven.api.plugin.Mojo- Throws:
org.apache.maven.api.plugin.MojoException- if the classpath cannot be resolved, the exporter entry point is absent, export fails, or the output file was not produced
-