mirror of
https://github.com/google/nomulus
synced 2026-01-05 04:56:03 +00:00
Upgrade a few pinned dependencies (#2359)
This commit is contained in:
@@ -222,9 +222,9 @@ dependencies {
|
||||
testImplementation deps['org.apache.sshd:sshd-scp']
|
||||
testImplementation deps['org.apache.sshd:sshd-sftp']
|
||||
testImplementation deps['org.apache.tomcat:tomcat-annotations-api']
|
||||
implementation deps['org.bouncycastle:bcpg-jdk15on']
|
||||
implementation deps['org.bouncycastle:bcpkix-jdk15on']
|
||||
implementation deps['org.bouncycastle:bcprov-jdk15on']
|
||||
implementation deps['org.bouncycastle:bcpg-jdk18on']
|
||||
implementation deps['org.bouncycastle:bcpkix-jdk18on']
|
||||
implementation deps['org.bouncycastle:bcprov-jdk18on']
|
||||
testImplementation deps['com.fasterxml.jackson.core:jackson-databind']
|
||||
implementation deps['org.hibernate:hibernate-core']
|
||||
implementation deps['org.hibernate:hibernate-hikaricp']
|
||||
|
||||
@@ -89,15 +89,16 @@ com.google.apis:google-api-services-gmail:v1-rev20220404-2.0.0=compileClasspath,
|
||||
com.google.apis:google-api-services-groupssettings:v1-rev20210624-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-healthcare:v1-rev20240110-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-iamcredentials:v1-rev20211203-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-monitoring:v3-rev20240128-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-monitoring:v3-rev20240303-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-pubsub:v1-rev20220904-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-sheets:v4-rev20230815-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-sqladmin:v1beta4-rev20240205-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.apis:google-api-services-storage:v1-rev20240209-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-api-1.0-sdk:1.9.86=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
|
||||
com.google.appengine:appengine-api-1.0-sdk:2.0.25=testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-api-stubs:2.0.25=testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-testing:1.9.86=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-api-1.0-sdk:2.0.25=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-api-stubs:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-remote-api:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-testing:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.appengine:appengine-tools-sdk:2.0.25=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.auth:google-auth-library-credentials:1.23.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.auth:google-auth-library-oauth2-http:1.23.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
com.google.auto.service:auto-service-annotations:1.0.1=errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
||||
@@ -371,14 +372,16 @@ org.apache.ftpserver:ftpserver-core:1.2.0=testCompileClasspath,testRuntimeClassp
|
||||
org.apache.httpcomponents:httpclient:4.5.14=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.httpcomponents:httpcore:4.4.16=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.mina:mina-core:2.1.6=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.sshd:sshd-core:2.0.0=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.sshd:sshd-scp:2.0.0=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.sshd:sshd-sftp:2.0.0=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.sshd:sshd-common:2.12.1=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.sshd:sshd-core:2.12.1=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.sshd:sshd-scp:2.12.1=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.sshd:sshd-sftp:2.12.1=testCompileClasspath,testRuntimeClasspath
|
||||
org.apache.tomcat:tomcat-annotations-api:11.0.0-M17=testCompileClasspath,testRuntimeClasspath
|
||||
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
|
||||
org.bouncycastle:bcpg-jdk15on:1.67=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.bouncycastle:bcpkix-jdk15on:1.67=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.bouncycastle:bcprov-jdk15on:1.67=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.bouncycastle:bcpg-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.bouncycastle:bcpkix-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.bouncycastle:bcprov-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.bouncycastle:bcutil-jdk18on:1.77=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
org.checkerframework:checker-compat-qual:2.5.3=compileClasspath,nonprodCompileClasspath,testCompileClasspath
|
||||
org.checkerframework:checker-compat-qual:2.5.5=annotationProcessor,testAnnotationProcessor
|
||||
org.checkerframework:checker-compat-qual:2.5.6=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testRuntimeClasspath
|
||||
@@ -489,7 +492,7 @@ org.seleniumhq.selenium:selenium-opera-driver:3.141.59=testCompileClasspath,test
|
||||
org.seleniumhq.selenium:selenium-remote-driver:3.141.59=testCompileClasspath,testRuntimeClasspath
|
||||
org.seleniumhq.selenium:selenium-safari-driver:3.141.59=testCompileClasspath,testRuntimeClasspath
|
||||
org.seleniumhq.selenium:selenium-support:3.141.59=testCompileClasspath,testRuntimeClasspath
|
||||
org.slf4j:jcl-over-slf4j:1.7.30=testRuntimeClasspath
|
||||
org.slf4j:jcl-over-slf4j:1.7.32=testCompileClasspath,testRuntimeClasspath
|
||||
org.slf4j:jul-to-slf4j:1.7.30=testRuntimeClasspath
|
||||
org.slf4j:slf4j-api:2.0.12=compileClasspath,nonprodCompileClasspath,nonprodRuntimeClasspath,testCompileClasspath
|
||||
org.slf4j:slf4j-api:2.1.0-alpha1=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
|
||||
@@ -73,21 +73,17 @@ public final class PgpHelper {
|
||||
*/
|
||||
public static PGPPublicKey lookupPublicKey(
|
||||
PGPPublicKeyRingCollection keyring, String query, KeyRequirement want) {
|
||||
try {
|
||||
Iterator<PGPPublicKeyRing> results =
|
||||
keyring.getKeyRings(checkNotNull(query, "query"), true, true);
|
||||
verify(results.hasNext(), "No public key found matching substring: %s", query);
|
||||
while (results.hasNext()) {
|
||||
Optional<PGPPublicKey> result = lookupPublicSubkey(results.next(), want);
|
||||
if (result.isPresent()) {
|
||||
return result.get();
|
||||
}
|
||||
Iterator<PGPPublicKeyRing> results =
|
||||
keyring.getKeyRings(checkNotNull(query, "query"), true, true);
|
||||
verify(results.hasNext(), "No public key found matching substring: %s", query);
|
||||
while (results.hasNext()) {
|
||||
Optional<PGPPublicKey> result = lookupPublicSubkey(results.next(), want);
|
||||
if (result.isPresent()) {
|
||||
return result.get();
|
||||
}
|
||||
throw new VerifyException(String.format(
|
||||
"No public key (%s) found matching substring: %s", want, query));
|
||||
} catch (PGPException e) {
|
||||
throw new VerifyException(String.format("Public key lookup failed for query: %s", query), e);
|
||||
}
|
||||
throw new VerifyException(
|
||||
String.format("No public key (%s) found matching substring: %s", want, query));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,7 +50,7 @@ import schemacrawler.tools.options.OutputOptions;
|
||||
import schemacrawler.tools.options.OutputOptionsBuilder;
|
||||
|
||||
/** Command to generate ER diagrams for SQL schema. */
|
||||
@Parameters(separators = " =", commandDescription = "Generate ER diagrams for SQL schmea.")
|
||||
@Parameters(separators = " =", commandDescription = "Generate ER diagrams for SQL schema.")
|
||||
public class GenerateSqlErDiagramCommand implements Command {
|
||||
|
||||
private static final String DB_NAME = "postgres";
|
||||
@@ -101,14 +101,14 @@ public class GenerateSqlErDiagramCommand implements Command {
|
||||
checkState(outDir.toFile().mkdirs(), "Failed to create directory %s", outDir);
|
||||
}
|
||||
|
||||
PostgreSQLContainer postgresContainer =
|
||||
new PostgreSQLContainer(NomulusPostgreSql.getDockerTag())
|
||||
.withDatabaseName(DB_NAME)
|
||||
.withUsername(DB_USER)
|
||||
.withPassword(DB_PASSWORD);
|
||||
postgresContainer.start();
|
||||
|
||||
try (Connection conn = getConnection(postgresContainer)) {
|
||||
try (PostgreSQLContainer<?> postgresContainer =
|
||||
new PostgreSQLContainer<>(NomulusPostgreSql.getDockerTag())) {
|
||||
postgresContainer
|
||||
.withDatabaseName(DB_NAME)
|
||||
.withUsername(DB_USER)
|
||||
.withPassword(DB_PASSWORD)
|
||||
.start();
|
||||
Connection conn = getConnection(postgresContainer);
|
||||
initDb(conn);
|
||||
if (diagramType == ALL || diagramType == FULL) {
|
||||
improveDiagramHtml(generateErDiagram(conn, FULL_DIAGRAM_COMMAND, FULL_DIAGRAM_FILE_NAME));
|
||||
@@ -116,8 +116,6 @@ public class GenerateSqlErDiagramCommand implements Command {
|
||||
if (diagramType == ALL || diagramType == BRIEF) {
|
||||
improveDiagramHtml(generateErDiagram(conn, BRIEF_DIAGRAM_COMMAND, BRIEF_DIAGRAM_FILE_NAME));
|
||||
}
|
||||
} finally {
|
||||
postgresContainer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +123,7 @@ public class GenerateSqlErDiagramCommand implements Command {
|
||||
try {
|
||||
Document doc = Jsoup.parse(diagram.toFile(), StandardCharsets.UTF_8.name());
|
||||
|
||||
// Add the last name of the flyway file to the HTML so we can have a test to verify that if
|
||||
// Add the last name of the flyway file to the HTML, so we can have a test to verify that if
|
||||
// the generated diagram is up to date.
|
||||
doc.select("body > table > tbody")
|
||||
.first()
|
||||
@@ -140,11 +138,9 @@ public class GenerateSqlErDiagramCommand implements Command {
|
||||
+ "</tr>");
|
||||
|
||||
// Add pan and zoom support for the embedded SVG in the HTML.
|
||||
StringBuilder svgPanZoomLib =
|
||||
new StringBuilder("<script>")
|
||||
.append(ResourceUtils.readResourceUtf8(SVG_PAN_ZOOM_LIB))
|
||||
.append("</script>");
|
||||
doc.select("head").first().append(svgPanZoomLib.toString());
|
||||
String svgPanZoomLib =
|
||||
"<script>" + ResourceUtils.readResourceUtf8(SVG_PAN_ZOOM_LIB) + "</script>";
|
||||
doc.select("head").first().append(svgPanZoomLib);
|
||||
doc.select("svg")
|
||||
.first()
|
||||
.attributes()
|
||||
@@ -163,8 +159,7 @@ public class GenerateSqlErDiagramCommand implements Command {
|
||||
+ "});"
|
||||
+ "</script>");
|
||||
|
||||
Files.write(
|
||||
diagram, doc.outerHtml().getBytes(StandardCharsets.UTF_8), StandardOpenOption.WRITE);
|
||||
Files.writeString(diagram, doc.outerHtml(), StandardOpenOption.WRITE);
|
||||
} catch (IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
@@ -194,7 +189,7 @@ public class GenerateSqlErDiagramCommand implements Command {
|
||||
return outputFile;
|
||||
}
|
||||
|
||||
private static Connection getConnection(PostgreSQLContainer container) {
|
||||
private static Connection getConnection(PostgreSQLContainer<?> container) {
|
||||
Properties info = new Properties();
|
||||
info.put("user", container.getUsername());
|
||||
info.put("password", container.getPassword());
|
||||
|
||||
@@ -27,18 +27,17 @@ import java.util.Arrays;
|
||||
import javax.annotation.Nullable;
|
||||
import org.apache.ftpserver.FtpServer;
|
||||
import org.apache.ftpserver.ftplet.FtpException;
|
||||
import org.apache.sshd.common.NamedFactory;
|
||||
import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory;
|
||||
import org.apache.sshd.common.keyprovider.KeyPairProvider;
|
||||
import org.apache.sshd.common.random.SingletonRandomFactory;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
import org.apache.sshd.scp.server.ScpCommandFactory;
|
||||
import org.apache.sshd.server.ServerBuilder;
|
||||
import org.apache.sshd.server.SshServer;
|
||||
import org.apache.sshd.server.auth.password.PasswordAuthenticator;
|
||||
import org.apache.sshd.server.auth.pubkey.PublickeyAuthenticator;
|
||||
import org.apache.sshd.server.command.Command;
|
||||
import org.apache.sshd.server.scp.ScpCommandFactory;
|
||||
import org.apache.sshd.server.session.ServerSession;
|
||||
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
|
||||
import org.apache.sshd.sftp.server.SftpSubsystemFactory;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.bouncycastle.openssl.PEMKeyPair;
|
||||
import org.bouncycastle.openssl.PEMParser;
|
||||
@@ -131,7 +130,7 @@ public class TestSftpServer implements FtpServer {
|
||||
server.setCommandFactory(new ScpCommandFactory());
|
||||
server.setPort(port);
|
||||
|
||||
NamedFactory<Command> sftpSubsystemFactory = new SftpSubsystemFactory.Builder().build();
|
||||
SftpSubsystemFactory sftpSubsystemFactory = new SftpSubsystemFactory.Builder().build();
|
||||
server.setSubsystemFactories(ImmutableList.of(sftpSubsystemFactory));
|
||||
|
||||
if (authorizedPassword != null) {
|
||||
@@ -150,17 +149,17 @@ public class TestSftpServer implements FtpServer {
|
||||
ImmutableMap.of(KEY_TYPE, HOST_KEY_PAIR);
|
||||
|
||||
@Override
|
||||
public Iterable<KeyPair> loadKeys() {
|
||||
public Iterable<KeyPair> loadKeys(SessionContext context) {
|
||||
return keyPairByTypeMap.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<String> getKeyTypes() {
|
||||
public Iterable<String> getKeyTypes(SessionContext context) {
|
||||
return keyPairByTypeMap.keySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeyPair loadKey(final String type) {
|
||||
public KeyPair loadKey(SessionContext context, final String type) {
|
||||
return keyPairByTypeMap.get(type);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,7 +45,7 @@ class GenerateSqlErDiagramCommandTest extends CommandTestCase<GenerateSqlErDiagr
|
||||
|
||||
@Test
|
||||
void testSchemaGeneration() throws Exception {
|
||||
runCommand("--out_dir=" + tmpDir.resolve("diagram").toString());
|
||||
runCommand("--out_dir=" + tmpDir.resolve("diagram"));
|
||||
|
||||
Path fullDiagram = tmpDir.resolve("diagram/full_er_diagram.html");
|
||||
Document fullDiagramDoc = Jsoup.parse(fullDiagram.toFile(), StandardCharsets.UTF_8.name());
|
||||
|
||||
Reference in New Issue
Block a user