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:
- Locate
.pkg/.dmgfiles in the jpackage output directory - Submit each artifact to Apple's notary service via
xcrun notarytool - Staple the notarization ticket to the artifact via
xcrun stapler - 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 Summary
Constructors -
Method Summary
-
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:
executein interfaceorg.apache.maven.api.plugin.Mojo- Throws:
org.apache.maven.api.plugin.MojoException
-