Class RenameMojo

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

@Mojo(name="rename", defaultPhase="verify") public class RenameMojo extends Object implements org.apache.maven.api.plugin.Mojo
Rename a file within a directory.

Replaces exec-maven-plugin calls to mv in the documentation pipeline. Performs an atomic move when possible, falling back to copy-and-delete on cross-filesystem boundaries.

Gracefully skips if the source file does not exist (e.g., when the renderer was not enabled or produced no output).

Usage:

<execution>
    <id>rename-html-single</id>
    <phase>verify</phase>
    <goals><goal>rename</goal></goals>
    <configuration>
        <source>${asciidoc.output.directory}/html-single/source.html</source>
        <target>${asciidoc.output.directory}/html-single/target.html</target>
        <skip>${ike.skip.html-single}</skip>
    </configuration>
</execution>
Since:
99
  • Constructor Details

    • RenameMojo

      public RenameMojo()
      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() throws org.apache.maven.api.plugin.MojoException
      Specified by:
      execute in interface org.apache.maven.api.plugin.Mojo
      Throws:
      org.apache.maven.api.plugin.MojoException