Class NotarizeMojo

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

@Mojo(name="notarize", defaultPhase="verify", projectRequired=true) public class NotarizeMojo extends Object implements org.apache.maven.api.plugin.Mojo
Sign and notarize macOS installer packages (.pkg, .dmg).

This goal automates the Apple notarization workflow for installer artifacts produced by JReleaser's jpackage assembler:

  1. Locate .pkg / .dmg files in the jpackage output directory
  2. Submit each artifact to Apple's notary service via xcrun notarytool
  3. Staple the notarization ticket to the artifact via xcrun stapler
  4. Verify the result with spctl --assess

On non-macOS platforms, the goal skips silently — no profile activation or conditional configuration required.

Prerequisites:

  • A "Developer ID Installer" certificate in the login keychain
  • A notarytool keychain profile configured via:
    xcrun notarytool store-credentials "notarytool" \
        --apple-id "your@email.com" \
        --team-id "YOURTEAMID" \
        --password "app-specific-password"

Usage:

mvn ike:notarize

Or bound to the verify phase in a POM:

<plugin>
    <groupId>network.ike.tooling</groupId>
    <artifactId>ike-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>notarize-installer</id>
            <goals><goal>notarize</goal></goals>
        </execution>
    </executions>
</plugin>
See Also:
  • Constructor Details

    • NotarizeMojo

      public NotarizeMojo()
      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