Last active
July 27, 2023 17:06
-
-
Save michaelajr/ff4693bce9fc20e5200b34683aa4ba51 to your computer and use it in GitHub Desktop.
Setup for the maven-gpg-plugin. Fix for "signing failed: Inappropriate ioctl for device".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
* | |
* pom.xml fragment for setting up GPG signing. | |
* | |
--> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<profiles> | |
<!-- Sign the artifacts with GunuPG --> | |
<profile> | |
<id>sign</id> | |
<build> | |
<pluginManagement> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-gpg-plugin</artifactId> | |
<version>1.6</version> | |
<executions> | |
<execution> | |
<id>sign-artifacts</id> | |
<phase>verify</phase> | |
<goals> | |
<goal>sign</goal> | |
</goals> | |
<configuration> | |
<gpgArguments> | |
<arg>--pinentry-mode</arg> | |
<arg>loopback</arg> | |
</gpgArguments> | |
<passphraseServerId>${gpg.keyname}</passphraseServerId> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</pluginManagement> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-gpg-plugin</artifactId> | |
</plugin> | |
</plugins> | |
</build> | |
</profile> | |
</profiles> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
* | |
* settings.xml fragment for enabling GPG signing. | |
* | |
--> | |
<settings | |
xmlns="http://maven.apache.org/SETTINGS/1.1.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 | |
http://maven.apache.org/xsd/settings-1.1.0.xsd"> | |
<servers> | |
<server> | |
<id>KEY_NAME</id> | |
<passphrase>PASS_PHRASE</passphrase> | |
</server> | |
</servers> | |
<profiles> | |
<profile> | |
<id>gpg</id> | |
<properties> | |
<gpg.executable>PATH_TO_BINARY</gpg.executable> | |
<gpg.keyname>KEY_NAME</gpg.keyname> | |
</properties> | |
</profile> | |
</profiles> | |
<activeProfiles> | |
<activeProfile>gpg</activeProfile> | |
</activeProfiles> | |
</settings> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment