Skip to content

Commit ea35e2c

Browse files
authored
[MGPG-105] Stop propagating bad practices (#71)
Storing any kind of "secret" on disk is bad. This change makes passphrase possible to come in two ways: * if interactive, via gpg-agent (as before) * if non-interactive, via Env variable Plugin from now on FAILS, if there is any kind of "secret" attempted to be configured in any other way that those two above. --- https://issues.apache.org/jira/browse/MGPG-105
1 parent 6081ad4 commit ea35e2c

File tree

30 files changed

+152
-191
lines changed

30 files changed

+152
-191
lines changed

pgp-keys-map.list

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,13 @@
1616
# under the License.
1717

1818
commons-io:commons-io = 0x2DB4F1EF0FA761ECC4EA935C86FDC7E2A11262CB
19-
javax.inject:javax.inject = noSig
2019
org.apiguardian:apiguardian-api = 0xFF6E2C001948C5F2F38B0CC385911F425EC61B51
2120
org.junit.jupiter:junit-jupiter-api = 0xFF6E2C001948C5F2F38B0CC385911F425EC61B51
2221
org.junit.jupiter:junit-jupiter-params = 0xFF6E2C001948C5F2F38B0CC385911F425EC61B51
2322
org.junit.platform:junit-platform-commons = 0xFF6E2C001948C5F2F38B0CC385911F425EC61B51
2423
org.opentest4j:opentest4j = 0xFF6E2C001948C5F2F38B0CC385911F425EC61B51
2524
org.apache.maven.resolver = 0x522CA055B326A636D833EF6A0551FD3684FCBBB7
2625
org.apache.maven.shared:maven-invoker = 0x84789D24DF77A32433CE1F079EB80E92EB2135B1
27-
org.codehaus.plexus:plexus-cipher = 0x6A814B1F869C2BBEAB7CB7271A2A1C94BDE89688
2826
org.codehaus.plexus:plexus-classworlds = 0xB91AB7D2121DC6B0A61AA182D7742D58455ECC7C
2927
org.codehaus.plexus:plexus-component-annotations = 0xFA77DCFEF2EE6EB2DEBEDD2C012579464D01C06A
3028
org.codehaus.plexus:plexus-utils = 0xF254B35617DC255D9344BCFA873A8E86B4372146
31-
org.codehaus.plexus:plexus-sec-dispatcher = 0x2BE13D052E9AA567D657D9791FD507154FB9BA39
32-
org.hamcrest:hamcrest = 0xE3A9F95079E84CE201F7CF60BEDE11EAF1164480
33-
org.hamcrest:hamcrest-core = 0xE3A9F95079E84CE201F7CF60BEDE11EAF1164480
34-
org.slf4j:slf4j-api = 0x475F3B8E59E6E63AA78067482C7B12F2A511E325

pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ under the License.
120120
<artifactId>plexus-utils</artifactId>
121121
<version>3.5.1</version>
122122
</dependency>
123-
<dependency>
124-
<groupId>org.codehaus.plexus</groupId>
125-
<artifactId>plexus-sec-dispatcher</artifactId>
126-
<version>2.0</version>
127-
</dependency>
128123

129124
<dependency>
130125
<groupId>org.junit.jupiter</groupId>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
invoker.environmentVariables.MAVEN_GPG_PASSPHRASE = TEST

src/it/no-main-artifact/pom.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ under the License.
4646
<groupId>org.apache.maven.plugins</groupId>
4747
<artifactId>maven-gpg-plugin</artifactId>
4848
<version>@project.version@</version>
49-
<configuration>
50-
<passphrase>TEST</passphrase>
51-
</configuration>
5249
<executions>
5350
<execution>
5451
<id>sign-artifacts</id>

src/it/settings.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,4 @@ under the License.
2323
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2424
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
2525

26-
<servers>
27-
<server>
28-
<id>gpg.passphrase</id>
29-
<passphrase>TEST</passphrase>
30-
</server>
31-
</servers>
32-
3326
</settings>

src/it/sign-and-deploy-file-with-extras/invoker.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
# under the License.
1717

1818
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:sign-and-deploy-file
19+
invoker.environmentVariables.MAVEN_GPG_PASSPHRASE = TEST

src/it/sign-and-deploy-file-with-extras/test.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
file = test.jar
1919
pomFile = test.pom
2020
url = file:target/repo
21-
gpg.passphrase = TEST
2221
sources = test-sources.jar
2322
javadoc = test-javadoc.jar

src/it/sign-and-deploy-file-with-pom/invoker.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
# under the License.
1717

1818
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:sign-and-deploy-file
19+
invoker.environmentVariables.MAVEN_GPG_PASSPHRASE = TEST

src/it/sign-and-deploy-file-with-pom/test.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@
1818
file = test.jar
1919
pomFile = test.pom
2020
url = file:target/repo
21-
gpg.passphrase = TEST

src/it/sign-and-deploy-file-without-pom/invoker.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
# under the License.
1717

1818
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:sign-and-deploy-file
19+
invoker.environmentVariables.MAVEN_GPG_PASSPHRASE = TEST

0 commit comments

Comments
 (0)