cstamas commented on code in PR #432: URL: https://github.com/apache/maven-resolver/pull/432#discussion_r1501649537
########## maven-resolver-demos/maven-resolver-demo-snippets/pom.xml: ########## @@ -34,8 +34,8 @@ <properties> <Automatic-Module-Name>org.apache.maven.resolver.demo.snippets</Automatic-Module-Name> - <!-- To make Jetty work --> - <javaVersion>11</javaVersion> + <!-- To make Jetty + generator-signer work --> + <javaVersion>17</javaVersion> Review Comment: fixed ########## maven-resolver-generator-signer/src/main/java/org/eclipse/aether/generator/signer/gpg/GpgSignerFactory.java: ########## @@ -0,0 +1,206 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.eclipse.aether.generator.signer.gpg; + +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.Map; + +import org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; +import org.bouncycastle.openpgp.PGPException; +import org.bouncycastle.openpgp.PGPPrivateKey; +import org.bouncycastle.openpgp.PGPSecretKey; +import org.bouncycastle.openpgp.PGPSecretKeyRing; +import org.bouncycastle.openpgp.PGPSecretKeyRingCollection; +import org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator; +import org.bouncycastle.openpgp.PGPSignatureSubpacketVector; +import org.bouncycastle.openpgp.PGPUtil; +import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator; +import org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder; +import org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider; +import org.eclipse.aether.ConfigurationProperties; +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.generator.signer.SignerFactory; +import org.eclipse.aether.repository.ArtifactRepository; +import org.eclipse.aether.repository.RemoteRepository; +import org.eclipse.aether.spi.connector.layout.RepositoryLayout; +import org.eclipse.aether.spi.connector.layout.RepositoryLayoutProvider; +import org.eclipse.aether.transfer.NoRepositoryLayoutException; +import org.eclipse.aether.util.ConfigUtils; + +import static org.eclipse.aether.generator.signer.gpg.GpgConfigurationKeys.CONFIG_PROP_KEY_ID; + +/** + * GnuPG signer factory implementation, that is active only for {@link RemoteRepository}ies. + */ +@Singleton +@Named(GpgSignerFactory.NAME) +public final class GpgSignerFactory implements SignerFactory { + public static final String NAME = GpgConfigurationKeys.NAME; + private static final String SIGNER_KEY = GpgSignerFactory.class.getName() + ".signer"; Review Comment: fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org