You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2018/07/18 22:50:57 UTC

[isis] 01/05: ISIS-1810: allows gpg passphrase to be specified on command line

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit a009d314f96486d4f29a139d2711887bc4bbc515
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jul 18 08:06:36 2018 +0200

    ISIS-1810: allows gpg passphrase to be specified on command line
    
    while performing a release
---
 core/pom.xml | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/core/pom.xml b/core/pom.xml
index 2226784..9dd1c05 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -2445,6 +2445,45 @@ ${license.additional-notes}
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <!--
+            as per https://stackoverflow.com/a/28860520/56880
+            allows -Dgpg.passphrase= to be used rather than gpg.useagent
+            inherited from parent.
+            Note that this requires gpg v2.1+
+            -->
+            <id>gpg</id>
+            <activation>
+                <property>
+                    <name>gpg.passphrase</name>
+                </property>
+            </activation>
+            <properties>
+                <gpg.useagent>false</gpg.useagent>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-gpg-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>sign-release-artifacts</id>
+                                <goals>
+                                    <goal>sign</goal>
+                                </goals>
+                                <configuration>
+                                    <gpgArguments>
+                                        <arg>--pinentry-mode</arg>
+                                        <arg>loopback</arg>
+                                    </gpgArguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
     <modules>