Skip to content

Commit

Permalink
[MGPG-121] Return the workaround for pseudo security (#90)
Browse files Browse the repository at this point in the history
Return the workaround, but this method is to be phased out.

---

https://issues.apache.org/jira/browse/MGPG-121
  • Loading branch information
cstamas authored Apr 2, 2024
1 parent 582df74 commit 78f5e37
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.maven.plugins.gpg;

import java.io.File;
import java.util.Collections;
import java.util.List;

import org.apache.maven.execution.MavenSession;
Expand All @@ -30,6 +31,8 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.settings.Server;
import org.apache.maven.settings.Settings;
import org.sonatype.plexus.components.cipher.DefaultPlexusCipher;
import org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher;
import org.sonatype.plexus.components.sec.dispatcher.SecDispatcher;
import org.sonatype.plexus.components.sec.dispatcher.SecDispatcherException;

Expand Down Expand Up @@ -287,8 +290,8 @@ public abstract class AbstractGpgMojo extends AbstractMojo {
* @deprecated Provides quasi-encryption, should be avoided.
*/
@Deprecated
@Component
private SecDispatcher secDispatcher;
private final SecDispatcher secDispatcher =
new DefaultSecDispatcher(new DefaultPlexusCipher(), Collections.emptyMap(), "~/.m2/settings-security.xml");

@Override
public final void execute() throws MojoExecutionException, MojoFailureException {
Expand Down

0 comments on commit 78f5e37

Please sign in to comment.