diff --git a/assemblies/nexus-base-feature/pom.xml b/assemblies/nexus-base-feature/pom.xml index f6cff68ea5..876e761951 100644 --- a/assemblies/nexus-base-feature/pom.xml +++ b/assemblies/nexus-base-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-base-feature diff --git a/assemblies/nexus-base-overlay/pom.xml b/assemblies/nexus-base-overlay/pom.xml index 800fdd0e67..2a1cc6fb8f 100644 --- a/assemblies/nexus-base-overlay/pom.xml +++ b/assemblies/nexus-base-overlay/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-base-overlay diff --git a/assemblies/nexus-base-template/pom.xml b/assemblies/nexus-base-template/pom.xml index be46cd30f4..3cf169597f 100644 --- a/assemblies/nexus-base-template/pom.xml +++ b/assemblies/nexus-base-template/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-base-template diff --git a/assemblies/nexus-boot-feature/pom.xml b/assemblies/nexus-boot-feature/pom.xml index feb89fe4d6..759fdfd909 100644 --- a/assemblies/nexus-boot-feature/pom.xml +++ b/assemblies/nexus-boot-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-boot-feature diff --git a/assemblies/nexus-core-feature/pom.xml b/assemblies/nexus-core-feature/pom.xml index 1a5ab4779a..42c22fb3d7 100644 --- a/assemblies/nexus-core-feature/pom.xml +++ b/assemblies/nexus-core-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-core-feature diff --git a/assemblies/nexus-startup-feature/pom.xml b/assemblies/nexus-startup-feature/pom.xml index e7ee2b6238..acfab2c0bb 100644 --- a/assemblies/nexus-startup-feature/pom.xml +++ b/assemblies/nexus-startup-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-startup-feature diff --git a/assemblies/pom.xml b/assemblies/pom.xml index 2754d024f0..50e91d3ba2 100644 --- a/assemblies/pom.xml +++ b/assemblies/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.assemblies @@ -46,7 +46,7 @@ org.sonatype.nexus nexus-components pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -54,7 +54,7 @@ org.sonatype.nexus.plugins nexus-plugins pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import diff --git a/buildsupport/all/pom.xml b/buildsupport/all/pom.xml index e8aedd6757..8c80e3ab6b 100644 --- a/buildsupport/all/pom.xml +++ b/buildsupport/all/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-all @@ -35,7 +35,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-commons pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -43,7 +43,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-db pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -51,7 +51,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-goodies pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -59,7 +59,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-groovy pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -67,7 +67,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-guice pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -75,7 +75,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-httpclient pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -83,7 +83,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-internal pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -91,7 +91,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-jetty pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -99,7 +99,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-jruby pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -107,7 +107,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-logging pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -115,7 +115,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-maven pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -123,7 +123,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-metrics pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -131,7 +131,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-osgi pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -139,7 +139,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-other pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -147,7 +147,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-rest pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -155,7 +155,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-security pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -163,7 +163,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-testing pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -171,7 +171,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-ui pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import diff --git a/buildsupport/commons/pom.xml b/buildsupport/commons/pom.xml index 8ad2166c3d..a4b5c0d0f0 100644 --- a/buildsupport/commons/pom.xml +++ b/buildsupport/commons/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-commons diff --git a/buildsupport/db/pom.xml b/buildsupport/db/pom.xml index cdec12720b..090bfab66d 100644 --- a/buildsupport/db/pom.xml +++ b/buildsupport/db/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-db @@ -47,7 +47,7 @@ com.h2database h2 - 2.2.224 + 2.3.232 diff --git a/buildsupport/extjs-maven-plugin/pom.xml b/buildsupport/extjs-maven-plugin/pom.xml index f51dd33363..3a6066f297 100644 --- a/buildsupport/extjs-maven-plugin/pom.xml +++ b/buildsupport/extjs-maven-plugin/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT extjs-maven-plugin @@ -37,7 +37,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import diff --git a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/AggregateJsMojo.java b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/AggregateJsMojo.java index 3d805bbbae..d40921ada7 100644 --- a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/AggregateJsMojo.java +++ b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/AggregateJsMojo.java @@ -33,11 +33,11 @@ * * @since 3.0 */ -@Mojo(name="aggregate-js", defaultPhase = PROCESS_RESOURCES) +@Mojo(name = "aggregate-js", defaultPhase = PROCESS_RESOURCES) public class AggregateJsMojo extends AbstractMojo { - private static final String[] DEFAULT_INCLUDES = { "**/*.js" }; + private static final String[] DEFAULT_INCLUDES = {"**/*.js"}; @Parameter(required = true) private File sourceDirectory; @@ -67,10 +67,10 @@ public class AggregateJsMojo private boolean omit; /** - * Omission flags. When named flag is enabled, sections matching those omission tokens will be commented out. + * Omission flags. When named flag is enabled, sections matching those omission tokens will be commented out. */ @Parameter - private Map omitFlags; + private Map omitFlags; @Override public void execute() throws MojoExecutionException, MojoFailureException { diff --git a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/ClassDefScanner.java b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/ClassDefScanner.java index a9fd7e1a4e..c6170040f7 100644 --- a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/ClassDefScanner.java +++ b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/ClassDefScanner.java @@ -373,7 +373,7 @@ else if (node instanceof StringLiteral) { */ private String stringLiteral(final AstNode node) { checkState(node instanceof StringLiteral, node, "Expected string literal only"); - //noinspection ConstantConditions + // noinspection ConstantConditions StringLiteral string = (StringLiteral) node; return string.getValue(); } @@ -383,7 +383,7 @@ private String stringLiteral(final AstNode node) { */ private double numberLiteral(final AstNode node) { checkState(node instanceof NumberLiteral, node, "Expected number literal only"); - //noinspection ConstantConditions + // noinspection ConstantConditions NumberLiteral number = (NumberLiteral) node; return number.getNumber(); } @@ -394,7 +394,7 @@ private double numberLiteral(final AstNode node) { private List arrayStringLiteral(final AstNode node) { checkState(node instanceof ArrayLiteral, node, "Expected array literal only"); List result = new ArrayList<>(); - //noinspection ConstantConditions + // noinspection ConstantConditions ArrayLiteral array = (ArrayLiteral) node; for (AstNode element : array.getElements()) { result.add(stringLiteral(element)); diff --git a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/LogErrorReporter.java b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/LogErrorReporter.java index d94fdc6201..632b7f2800 100644 --- a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/LogErrorReporter.java +++ b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/LogErrorReporter.java @@ -24,7 +24,7 @@ * @since 3.0 */ public class LogErrorReporter - implements ErrorReporter + implements ErrorReporter { private final Log log; @@ -32,22 +32,46 @@ public LogErrorReporter(final Log log) { this.log = checkNotNull(log); } - private String format(final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { + private String format( + final String message, + final String sourceName, + final int line, + final String lineSource, + final int lineOffset) + { return String.format("%s (%s#%d:%d): %s", message, sourceName, line, lineOffset, lineSource); } @Override - public void warning(final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { + public void warning( + final String message, + final String sourceName, + final int line, + final String lineSource, + final int lineOffset) + { log.warn(format(message, sourceName, line, lineSource, lineOffset)); } @Override - public void error(final String message, final String sourceName, final int line, final String lineSource, final int lineOffset){ + public void error( + final String message, + final String sourceName, + final int line, + final String lineSource, + final int lineOffset) + { log.error(format(message, sourceName, line, lineSource, lineOffset)); } @Override - public EvaluatorException runtimeError(final String message, final String sourceName, final int line, final String lineSource, final int lineOffset) { + public EvaluatorException runtimeError( + final String message, + final String sourceName, + final int line, + final String lineSource, + final int lineOffset) + { return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); } } diff --git a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/OmissionFileAppender.java b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/OmissionFileAppender.java index 60ae2eb588..2104999799 100644 --- a/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/OmissionFileAppender.java +++ b/buildsupport/extjs-maven-plugin/src/main/java/org/sonatype/nexus/extjs/OmissionFileAppender.java @@ -29,7 +29,7 @@ * @since 3.0 */ public class OmissionFileAppender - extends FileAppender + extends FileAppender { public static final String IF_START_PREFIX = "// flags = new HashMap<>(); + private final Map flags = new HashMap<>(); - public OmissionFileAppender(final Log log, - final Writer output, - @Nullable final Map rawFlags) + public OmissionFileAppender( + final Log log, + final Writer output, + @Nullable final Map rawFlags) { super(log, output); if (rawFlags != null) { @@ -53,8 +54,8 @@ public Map getFlags() { return flags; } - private void parseFlags(final Map rawFlags) { - for (Entry entry : rawFlags.entrySet()) { + private void parseFlags(final Map rawFlags) { + for (Entry entry : rawFlags.entrySet()) { boolean flag = Boolean.parseBoolean(entry.getValue()); flags.put(entry.getKey(), flag); } diff --git a/buildsupport/goodies/pom.xml b/buildsupport/goodies/pom.xml index 79e40113cf..865d0ebfde 100644 --- a/buildsupport/goodies/pom.xml +++ b/buildsupport/goodies/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-goodies diff --git a/buildsupport/groovy/pom.xml b/buildsupport/groovy/pom.xml index 0169feeff8..657d0241d3 100644 --- a/buildsupport/groovy/pom.xml +++ b/buildsupport/groovy/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-groovy diff --git a/buildsupport/guice/pom.xml b/buildsupport/guice/pom.xml index 6f4e0a3d06..8375eaee5a 100644 --- a/buildsupport/guice/pom.xml +++ b/buildsupport/guice/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-guice diff --git a/buildsupport/httpclient/pom.xml b/buildsupport/httpclient/pom.xml index b236e17df1..86a6a916bd 100644 --- a/buildsupport/httpclient/pom.xml +++ b/buildsupport/httpclient/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-httpclient diff --git a/buildsupport/internal/pom.xml b/buildsupport/internal/pom.xml index 46fcb593c8..21b3c99dde 100644 --- a/buildsupport/internal/pom.xml +++ b/buildsupport/internal/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-internal diff --git a/buildsupport/it-deps/pom.xml b/buildsupport/it-deps/pom.xml index 624b2de7b5..43f52f3189 100644 --- a/buildsupport/it-deps/pom.xml +++ b/buildsupport/it-deps/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-it-deps diff --git a/buildsupport/jetty/pom.xml b/buildsupport/jetty/pom.xml index bd9b7a50aa..111f8f9de3 100644 --- a/buildsupport/jetty/pom.xml +++ b/buildsupport/jetty/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-jetty diff --git a/buildsupport/jruby/pom.xml b/buildsupport/jruby/pom.xml index 4706b991ef..7b243c7b52 100644 --- a/buildsupport/jruby/pom.xml +++ b/buildsupport/jruby/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-jruby diff --git a/buildsupport/logging/pom.xml b/buildsupport/logging/pom.xml index 330cfeefe8..99f23be349 100644 --- a/buildsupport/logging/pom.xml +++ b/buildsupport/logging/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-logging diff --git a/buildsupport/maven/pom.xml b/buildsupport/maven/pom.xml index af06555493..6238d856fb 100644 --- a/buildsupport/maven/pom.xml +++ b/buildsupport/maven/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-maven diff --git a/buildsupport/metrics/pom.xml b/buildsupport/metrics/pom.xml index 3b44378a23..e2194889dc 100644 --- a/buildsupport/metrics/pom.xml +++ b/buildsupport/metrics/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-metrics diff --git a/buildsupport/osgi/pom.xml b/buildsupport/osgi/pom.xml index 86e0030805..bb4fc332fa 100644 --- a/buildsupport/osgi/pom.xml +++ b/buildsupport/osgi/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-osgi diff --git a/buildsupport/other/pom.xml b/buildsupport/other/pom.xml index bb65e9d9cd..8185cf64a7 100644 --- a/buildsupport/other/pom.xml +++ b/buildsupport/other/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-other diff --git a/buildsupport/pom.xml b/buildsupport/pom.xml index 6c66c3cdd3..704ea3d4ca 100644 --- a/buildsupport/pom.xml +++ b/buildsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.buildsupport diff --git a/buildsupport/rest/pom.xml b/buildsupport/rest/pom.xml index 8e6b4da5ca..5f95431354 100644 --- a/buildsupport/rest/pom.xml +++ b/buildsupport/rest/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-rest @@ -84,7 +84,7 @@ com.thoughtworks.xstream xstream - 1.4.20 + 1.4.21 xmlpull diff --git a/buildsupport/scripts/pom.xml b/buildsupport/scripts/pom.xml index 3ac61a6352..364023c0b4 100644 --- a/buildsupport/scripts/pom.xml +++ b/buildsupport/scripts/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-scripts @@ -36,7 +36,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import diff --git a/buildsupport/security/pom.xml b/buildsupport/security/pom.xml index ede7fcad4a..910240d070 100644 --- a/buildsupport/security/pom.xml +++ b/buildsupport/security/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-security diff --git a/buildsupport/testing/pom.xml b/buildsupport/testing/pom.xml index d8c005f3a0..e2d1b39fb9 100644 --- a/buildsupport/testing/pom.xml +++ b/buildsupport/testing/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-testing diff --git a/buildsupport/ui/pom.xml b/buildsupport/ui/pom.xml index b34232cc10..b6ac61e7df 100644 --- a/buildsupport/ui/pom.xml +++ b/buildsupport/ui/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-buildsupport-ui diff --git a/components/nexus-audit/pom.xml b/components/nexus-audit/pom.xml index 447d246c64..bd18b30ed9 100644 --- a/components/nexus-audit/pom.xml +++ b/components/nexus-audit/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-audit diff --git a/components/nexus-audit/src/main/java/org/sonatype/nexus/audit/AuditorSupport.java b/components/nexus-audit/src/main/java/org/sonatype/nexus/audit/AuditorSupport.java index 76b17ea8cb..a1a70f58b4 100644 --- a/components/nexus-audit/src/main/java/org/sonatype/nexus/audit/AuditorSupport.java +++ b/components/nexus-audit/src/main/java/org/sonatype/nexus/audit/AuditorSupport.java @@ -76,7 +76,7 @@ public abstract class AuditorSupport /** * Mapping of class to simple type names for auditing. */ - private Map typeLookup = new HashMap<>(); + private Map typeLookup = new HashMap<>(); @Inject public void setAuditRecorder(final Provider auditRecorder) { diff --git a/components/nexus-base/pom.xml b/components/nexus-base/pom.xml index a7a1d557df..482417c002 100644 --- a/components/nexus-base/pom.xml +++ b/components/nexus-base/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-base diff --git a/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/LogbackLogManager.java b/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/LogbackLogManager.java index 1a8d54fa9d..5c48f36ade 100644 --- a/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/LogbackLogManager.java +++ b/components/nexus-base/src/main/java/org/sonatype/nexus/internal/log/LogbackLogManager.java @@ -194,7 +194,8 @@ public Set getLogFiles() { public File getLogFile(final String fileName) { final String filePrefix = allowedFilePrefixes.stream() .filter(fileName::startsWith) - .findAny().orElse(""); + .findAny() + .orElse(""); return requireNonNull(getAllLogFiles(fileName)).stream() .filter(file -> fileName.equals(filePrefix + file.getName())) @@ -206,7 +207,7 @@ public File getLogFile(final String fileName) { } @VisibleForTesting - void logFileNotFound (String fileName) { + void logFileNotFound(String fileName) { log.info("Unable to find log file: {}", fileName); } @@ -218,7 +219,7 @@ public InputStream getLogFileStream(final String fileName, final long from, fina boolean containsPathSeparator = fileName.contains(File.pathSeparator) || fileName.contains("/"); boolean startsWithAllowedPrefix = allowedFilePrefixes.stream().anyMatch(fileName::startsWith); - if (!startsWithAllowedPrefix && containsPathSeparator) { + if (!startsWithAllowedPrefix && containsPathSeparator) { log.warn("Cannot retrieve log files with path separators in their name, unless it is a task or replication log"); return null; } @@ -495,8 +496,7 @@ else if (loggerOverridesEvent.getAction() == Action.RESET_ALL) { } private void applyOverrides() { - overrides.forEach(entry -> - setLogbackLoggerLevel(entry.getKey(), LogbackLevels.convert(entry.getValue()))); + overrides.forEach(entry -> setLogbackLoggerLevel(entry.getKey(), LogbackLevels.convert(entry.getValue()))); } // diff --git a/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/LogbackLogManagerTest.java b/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/LogbackLogManagerTest.java index 964e3c6f9b..6d8c3ce87e 100644 --- a/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/LogbackLogManagerTest.java +++ b/components/nexus-base/src/test/java/org/sonatype/nexus/internal/log/LogbackLogManagerTest.java @@ -154,9 +154,12 @@ public void testReloadOverridesFromDatastoreInvoked() throws Exception { EventManager eventManager = mock(EventManager.class); LoggingOverridesStore store = mock(LoggingOverridesStore.class); - Continuation data = new ContinuationArrayList() {{ - add(new LoggingOverridesData("logger-name", LoggerLevel.DEBUG.toString())); - }}; + Continuation data = new ContinuationArrayList() + { + { + add(new LoggingOverridesData("logger-name", LoggerLevel.DEBUG.toString())); + } + }; when(store.readRecords()).thenReturn(data); DatastoreLoggerOverrides overrides = new DatastoreLoggerOverrides( @@ -190,15 +193,15 @@ public void testLoggerOverridesEventProcessed() { eventManager.post(changeEvent); LoggerContext context = LogbackLogManager.loggerContext(); - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger(testName).getLevel(), is(Level.toLevel(testLevel)))); + await().atMost(10, SECONDS) + .untilAsserted(() -> assertThat(context.getLogger(testName).getLevel(), is(Level.toLevel(testLevel)))); LoggerOverridesEvent resetEvent = new LoggerOverridesEvent(testName, null, Action.RESET); resetEvent.setRemoteNodeId("nodeId"); eventManager.post(resetEvent); - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger(testName).getLevel(), is(nullValue()))); + await().atMost(10, SECONDS) + .untilAsserted(() -> assertThat(context.getLogger(testName).getLevel(), is(nullValue()))); } @Test @@ -214,16 +217,14 @@ public void testResetRootLoggerEventProcessed() { changeEvent.setRemoteNodeId("nodeId"); eventManager.post(changeEvent); - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger("ROOT").getLevel(), is(Level.DEBUG))); + await().atMost(10, SECONDS).untilAsserted(() -> assertThat(context.getLogger("ROOT").getLevel(), is(Level.DEBUG))); // reset ROOT log level back to INFO LoggerOverridesEvent resetEvent = new LoggerOverridesEvent("ROOT", null, Action.RESET); resetEvent.setRemoteNodeId("nodeId"); eventManager.post(resetEvent); - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger("ROOT").getLevel(), is(Level.INFO))); + await().atMost(10, SECONDS).untilAsserted(() -> assertThat(context.getLogger("ROOT").getLevel(), is(Level.INFO))); } @Test @@ -243,20 +244,20 @@ public void testResetAllLoggersEventProcessed() { eventManager.post(changeEvent2); // check that loggers were set. - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger("org.bar").getLevel(), is(Level.TRACE))); - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger("org.foo").getLevel(), is(Level.DEBUG))); + await().atMost(10, SECONDS) + .untilAsserted(() -> assertThat(context.getLogger("org.bar").getLevel(), is(Level.TRACE))); + await().atMost(10, SECONDS) + .untilAsserted(() -> assertThat(context.getLogger("org.foo").getLevel(), is(Level.DEBUG))); // reset all loggers LoggerOverridesEvent resetEvent = new LoggerOverridesEvent(null, null, Action.RESET_ALL); resetEvent.setRemoteNodeId("nodeId"); eventManager.post(resetEvent); - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger("org.bar").getLevel(), is(nullValue()))); - await().atMost(10, SECONDS).untilAsserted(() -> - assertThat(context.getLogger("org.foo").getLevel(), is(nullValue()))); + await().atMost(10, SECONDS) + .untilAsserted(() -> assertThat(context.getLogger("org.bar").getLevel(), is(nullValue()))); + await().atMost(10, SECONDS) + .untilAsserted(() -> assertThat(context.getLogger("org.foo").getLevel(), is(nullValue()))); } @Test diff --git a/components/nexus-blobstore-api/pom.xml b/components/nexus-blobstore-api/pom.xml index 0a26a1e426..5e80912bd1 100644 --- a/components/nexus-blobstore-api/pom.xml +++ b/components/nexus-blobstore-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-blobstore-api diff --git a/components/nexus-blobstore-api/src/main/java/org/sonatype/nexus/blobstore/api/BlobStore.java b/components/nexus-blobstore-api/src/main/java/org/sonatype/nexus/blobstore/api/BlobStore.java index ddcc466d66..cc2ef17465 100644 --- a/components/nexus-blobstore-api/src/main/java/org/sonatype/nexus/blobstore/api/BlobStore.java +++ b/components/nexus-blobstore-api/src/main/java/org/sonatype/nexus/blobstore/api/BlobStore.java @@ -21,7 +21,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import java.util.stream.Stream; - import javax.annotation.Nullable; import org.sonatype.goodies.lifecycle.Lifecycle; @@ -34,7 +33,7 @@ /** * A generic storage bin for binary objects of all sizes. - * + *

* In general, most methods can throw {@link BlobStoreException} for conditions such as network connectivity problems, * or file IO issues, blob store misconfiguration, or internal corruption. * @@ -77,6 +76,7 @@ public interface BlobStore /** * Header whose presence indicates a temporary blob (may be handled differently by the underlying implementation). + * * @since 3.1 */ String TEMPORARY_BLOB_HEADER = "BlobStore.temporary-blob"; @@ -86,16 +86,16 @@ public interface BlobStore * {@link BlobId} reflecting a path like structure. If the create methods in this class are called with a header with * this key and a value of "true", the blob will be stored in the blob store using a direct file system path, using * {@link #BLOB_NAME_HEADER} header for the tail. - * + *

* For example, if the {@link #BLOB_NAME_HEADER} contains a value like "path/to/index.html", the blob will be stored - * on disk within the blob store at a path that terminates in "path/to/index.html.bytes". Note: direct-path - * blobs only use the unix-style path separator ('/'), even if the underlying filesystem is not. - * + * on disk within the blob store at a path that terminates in "path/to/index.html.bytes". Note: direct-path blobs only + * use the unix-style path separator ('/'), even if the underlying filesystem is not. + *

* Use this feature for Blobs that: * *

    - *
  • will not or cannot have a database table mapping generated {@link BlobId} to paths
  • - *
  • can be overwritten on "disk" without side effects
  • + *
  • will not or cannot have a database table mapping generated {@link BlobId} to paths
  • + *
  • can be overwritten on "disk" without side effects
  • *
* * @since 3.8 @@ -104,7 +104,7 @@ public interface BlobStore /** * An associated repository name for disaster recovery purposes (which isn't required to be strictly unique) - * + *

* (uses 'Bucket' prefix for legacy compatibility reasons) * * @since 3.25 @@ -118,11 +118,11 @@ public interface BlobStore *

  • {@link #BLOB_NAME_HEADER}
  • *
  • {@link #CREATED_BY_HEADER}
  • * - * + *

    * Note: if headers contains an entry with key {@link #DIRECT_PATH_BLOB_HEADER} and value true, and the * {@link #BLOB_NAME_HEADER} matches a direct-path blob that already exists, the blob will be overwritten. * - * @throws BlobStoreException (or a subclass) if the input stream can't be read correctly + * @throws BlobStoreException (or a subclass) if the input stream can't be read correctly * @throws IllegalArgumentException if mandatory headers are missing */ Blob create(InputStream blobData, Map headers); @@ -135,9 +135,9 @@ public interface BlobStore Blob create(InputStream blobData, Map headers, @Nullable BlobId blobId); /** - * Imports a blob by creating a hard link, throwing {@link BlobStoreException} if that's not supported - * from the source file's location. - * + * Imports a blob by creating a hard link, throwing {@link BlobStoreException} if that's not supported from the source + * file's location. + *

    * Otherwise similar to {@link #create(InputStream, Map)} with the difference that a known file size and sha1 are * already provided. * @@ -148,25 +148,25 @@ public interface BlobStore /** * Creates the new blob attributes * - * @param blobId the blob id - * @param headers the headers of the blob, {@see BlobStore} + * @param blobId the blob id + * @param headers the headers of the blob, {@see BlobStore} * @param blobMetrics blob metrics */ - default void createBlobAttributes(BlobId blobId, Map headers, BlobMetrics blobMetrics) { } - + default void createBlobAttributes(BlobId blobId, Map headers, BlobMetrics blobMetrics) { + } /** * Creates the new blob attributes instance * - * @param blobId the blob id - * @param headers the headers of the blob, {@see BlobStore} + * @param blobId the blob id + * @param headers the headers of the blob, {@see BlobStore} * @param metrics blob metrics */ BlobAttributes createBlobAttributesInstance(BlobId blobId, Map headers, BlobMetrics metrics); /** - * Duplicates a blob within the blob store by copying the temp blob but with the provided headers. The blob must be - * in this blob store; moving blobs between blob stores is not supported. + * Duplicates a blob within the blob store by copying the temp blob but with the provided headers. The blob must be in + * this blob store; moving blobs between blob stores is not supported. * * @since 3.1 */ @@ -182,23 +182,23 @@ default Blob makeBlobPermanent(final BlobId blobId, final Map he } /** - * Returns the corresponding {@link Blob}, or {@code null} if the blob does not exist or has been {@link #delete - * deleted}. + * Returns the corresponding {@link Blob}, or {@code null} if the blob does not exist or has been + * {@link #delete deleted}. */ @Nullable Blob get(BlobId blobId); /** - * Returns the corresponding {@link Blob}, or {@code null} if the blob does not exist, or has been {@link #delete - * deleted} and {@code includeDeleted} is {@code false}). + * Returns the corresponding {@link Blob}, or {@code null} if the blob does not exist, or has been + * {@link #delete deleted} and {@code includeDeleted} is {@code false}). */ @Nullable Blob get(BlobId blobId, boolean includeDeleted); /** - * Performs a simple existence check using the attributes path returning {@code true} if it exists and - * {@code false} if it does not. - * + * Performs a simple existence check using the attributes path returning {@code true} if it exists and {@code false} + * if it does not. + *

    * This was introduced to allow existence checking of direct-path blobs in support of edge cases such as RHC. */ boolean exists(BlobId blobId); @@ -218,7 +218,7 @@ default Blob makeBlobPermanent(final BlobId blobId, final Map he boolean isBlobEmpty(BlobId blobId); /** - * Removes a blob from the blob store. This may not immediately delete the blob from the underlying storage + * Removes a blob from the blob store. This may not immediately delete the blob from the underlying storage * mechanism, but will make it immediately unavailable to future calls to {@link BlobStore#get(BlobId)}. * * @return {@code true} if the blob has been deleted, {@code false} if no blob was found by that ID. @@ -236,8 +236,8 @@ default Blob makeBlobPermanent(final BlobId blobId, final Map he /** * Provides access to the blob store's metrics service instance *

    - * Note: this method may not be available for all the blob store implementations - * and, if not supported, expect a {@link UnsupportedOperationException} + * Note: this method may not be available for all the blob store implementations and, if not supported, expect a + * {@link UnsupportedOperationException} *

    */ BlobStoreMetricsService getMetricsService(); @@ -296,15 +296,20 @@ default Blob makeBlobPermanent(final BlobId blobId, final Map he Stream getBlobIdStream(); /** - * Get a {@link Stream} of {@link BlobId} for blobs contained in this blob store that have been updated within the provided duration. + * Get a {@link Stream} of {@link BlobId} for blobs contained in this blob store that have been updated within the + * provided duration. */ Stream getBlobIdUpdatedSinceStream(Duration duration); /** - * Get a {@link Stream} of {@link BlobId} for blobs contained in this blob store that have been updated within the provided from date - * and under the specified path prefix. + * Get a {@link Stream} of {@link BlobId} for blobs contained in this blob store that have been updated within the + * provided from date and under the specified path prefix. */ - Stream getBlobIdUpdatedSinceStream(String prefix, OffsetDateTime fromDateTime); + PaginatedResult getBlobIdUpdatedSinceStream( + String prefix, + OffsetDateTime fromDateTime, + @Nullable String continuationToken, + int pageSize); /** * Get a {@link Stream} of direct-path {@link BlobId}s under the specified path prefix. @@ -330,10 +335,15 @@ default Blob makeBlobPermanent(final BlobId blobId, final Map he * @return {@code true} if the blob has been successfully undeleted. * @since 3.12 */ - boolean undelete(@Nullable BlobStoreUsageChecker inUseChecker, BlobId blobId, BlobAttributes attributes, boolean isDryRun); + boolean undelete( + @Nullable BlobStoreUsageChecker inUseChecker, + BlobId blobId, + BlobAttributes attributes, + boolean isDryRun); /** * Identifies if the storage backed by the instance is available to be written to + * * @return {@code true} if the blob store can be written to * @since 3.14 */ @@ -345,7 +355,9 @@ default Blob makeBlobPermanent(final BlobId blobId, final Map he * @return {@code true} if the blob store can be a member of a group * @since 3.14 */ - default boolean isGroupable() { return true; } + default boolean isGroupable() { + return true; + } /** * Identifies if the instance is writable. The writable state is a configuration option and not representative of the @@ -392,9 +404,8 @@ default Future asyncDelete(BlobId blobId) { } /** - * Deletes the blob if it is indeed a Temporary blob - * Note: This method should only called with a BlobId known to have been created as a TempBlob, implementations may - * perform no checks if they provide no special handling. + * Deletes the blob if it is indeed a Temporary blob Note: This method should only called with a BlobId known to have + * been created as a TempBlob, implementations may perform no checks if they provide no special handling. * * @since 3.37 */ @@ -407,11 +418,12 @@ default void validateCanCreateAndUpdate() throws Exception { /** * Flush blobstore metrics to disk, forgoing the typical wait period + * * @throws IOException */ @VisibleForTesting default void flushMetrics() throws IOException { - //default impl does nothing + // default impl does nothing } /** diff --git a/components/nexus-blobstore-api/src/main/java/org/sonatype/nexus/blobstore/api/PaginatedResult.java b/components/nexus-blobstore-api/src/main/java/org/sonatype/nexus/blobstore/api/PaginatedResult.java new file mode 100644 index 0000000000..7761b8ed88 --- /dev/null +++ b/components/nexus-blobstore-api/src/main/java/org/sonatype/nexus/blobstore/api/PaginatedResult.java @@ -0,0 +1,35 @@ +/* + * Sonatype Nexus (TM) Open Source Version + * Copyright (c) 2008-present Sonatype, Inc. + * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. + * + * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, + * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks + * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the + * Eclipse Foundation. All other trademarks are the property of their respective owners. + */ +package org.sonatype.nexus.blobstore.api; + +import java.util.List; + +public class PaginatedResult +{ + private final List results; + + private final String nextContinuationToken; + + public PaginatedResult(List results, String nextContinuationToken) { + this.results = results; + this.nextContinuationToken = nextContinuationToken; + } + + public List getResults() { + return results; + } + + public String getNextContinuationToken() { + return nextContinuationToken; + } +} diff --git a/components/nexus-blobstore-file/pom.xml b/components/nexus-blobstore-file/pom.xml index 160c356622..874bd3e496 100644 --- a/components/nexus-blobstore-file/pom.xml +++ b/components/nexus-blobstore-file/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-blobstore-file diff --git a/components/nexus-blobstore-file/src/main/java/org/sonatype/nexus/blobstore/file/FileBlobStore.java b/components/nexus-blobstore-file/src/main/java/org/sonatype/nexus/blobstore/file/FileBlobStore.java index 75974e649f..e75458e3e7 100644 --- a/components/nexus-blobstore-file/src/main/java/org/sonatype/nexus/blobstore/file/FileBlobStore.java +++ b/components/nexus-blobstore-file/src/main/java/org/sonatype/nexus/blobstore/file/FileBlobStore.java @@ -34,6 +34,7 @@ import java.util.EnumSet; import java.util.HashSet; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -41,6 +42,7 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.Lock; +import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nullable; import javax.inject.Inject; @@ -62,6 +64,7 @@ import org.sonatype.nexus.blobstore.api.BlobStoreUsageChecker; import org.sonatype.nexus.blobstore.api.OperationMetrics; import org.sonatype.nexus.blobstore.api.OperationType; +import org.sonatype.nexus.blobstore.api.PaginatedResult; import org.sonatype.nexus.blobstore.api.RawObjectAccess; import org.sonatype.nexus.blobstore.api.metrics.BlobStoreMetricsService; import org.sonatype.nexus.blobstore.file.internal.BlobCollisionException; @@ -214,7 +217,7 @@ public FileBlobStore( @VisibleForTesting public FileBlobStore( - final Path contentDir, //NOSONAR + final Path contentDir, // NOSONAR final BlobIdLocationResolver blobIdLocationResolver, final FileOperations fileOperations, final BlobStoreMetricsService metricsService, @@ -334,7 +337,10 @@ private Path temporaryAttributePath(final BlobId id, final UUID suffix) { @Override @MonitoringBlobStoreMetrics(operationType = UPLOAD) - protected Blob doCreate(final InputStream blobData, final Map headers, @Nullable final BlobId blobId) + protected Blob doCreate( + final InputStream blobData, + final Map headers, + @Nullable final BlobId blobId) { return create(headers, destination -> fileOperations.create(destination, blobData), blobId); } @@ -651,8 +657,8 @@ protected void doCompact(@Nullable final BlobStoreUsageChecker inUseChecker) { Boolean.parseBoolean(metadata.getProperty(REBUILD_DELETED_BLOB_INDEX_KEY, "false")); if (deletedBlobIndexRebuildRequired) { - //this is a multi node task, i.e. it will run on all nodes simultaneously, so make sure walking the blobstore - //is only done on one node + // this is a multi node task, i.e. it will run on all nodes simultaneously, so make sure walking the blobstore + // is only done on one node if (!nodeAccess.isOldestNode()) { log.info("Skipping compact without deleted blob index on this node because this is not the oldest node."); return; @@ -684,14 +690,13 @@ protected void doDeleteTempFiles(final Integer daysOlderThan) { iterateFiles(getAbsoluteBlobDir().resolve(CONTENT_PREFIX).resolve(TMP).toFile(), ageFileFilter, ageFileFilter); filesToDelete.forEachRemaining(f -> { - try { - forceDelete(f); - } - catch (UncheckedIOException | IOException e) { - log.error("Unable to delete temp file {}. Message was {}.", f, e.getMessage()); - } - } - ); + try { + forceDelete(f); + } + catch (UncheckedIOException | IOException e) { + log.error("Unable to delete temp file {}. Message was {}.", f, e.getMessage()); + } + }); } catch (UncheckedIOException | NoSuchFileException e) { log.debug("Tmp folder is empty: {}", e.getMessage()); @@ -704,8 +709,7 @@ protected void doDeleteTempFiles(final Integer daysOlderThan) { } } - private boolean maybeCompactBlob(@Nullable final BlobStoreUsageChecker inUseChecker, final BlobId blobId) - { + private boolean maybeCompactBlob(@Nullable final BlobStoreUsageChecker inUseChecker, final BlobId blobId) { Optional attributesOption = ofNullable((FileBlobAttributes) getBlobAttributes(blobId)); if (!attributesOption.isPresent() || !undelete(inUseChecker, blobId, attributesOption.get(), false)) { // attributes file is missing or blob id not in use, so it's safe to delete the file @@ -771,7 +775,7 @@ private void checkExists(final Path path, final BlobId blobId) throws IOExceptio } /** - * This is a simple existence check resulting from NEXUS-16729. This allows clients to perform a simple check and is + * This is a simple existence check resulting from NEXUS-16729. This allows clients to perform a simple check and is * primarily intended for use in directpath scenarios. */ @Override @@ -949,7 +953,7 @@ void doCompactWithDeletedBlobIndex(@Nullable final BlobStoreUsageChecker inUseCh progressLogger.info("Elapsed time: {}, processed: {}/{}", progressLogger.getElapsed(), counter + 1, numBlobs); } - //once done removing stuff, clean any empty directories left around in the directpath area + // once done removing stuff, clean any empty directories left around in the directpath area pruneEmptyDirectories(progressLogger, contentDir.resolve(DIRECT_PATH_ROOT)); progressLogger.flush(); } @@ -975,17 +979,17 @@ private void pruneEmptyDirectories(final ProgressLogIntervalHelper progressLogge @VisibleForTesting void doCompactWithoutDeletedBlobIndex(@Nullable final BlobStoreUsageChecker inUseChecker) throws IOException { log.info("Begin deleted blobs processing without deleted blob index"); - //clear the deleted blob index ahead of time, so we won't lose deletes that may occur while the compact is being - //performed + // clear the deleted blob index ahead of time, so we won't lose deletes that may occur while the compact is being + // performed blobDeletionIndex.deleteAllRecords(); ProgressLogIntervalHelper progressLogger = new ProgressLogIntervalHelper(log, INTERVAL_IN_SECONDS); AtomicInteger count = new AtomicInteger(0); - //rather than using the blobId stream here, need to use a different means of walking the file tree, as - //we are deleting items on the way through, and apparently on *nix systems, deleting files that you are about to - //walk over causes a FileNotFoundException to be thrown and the walking stops. Overridding the visitFileFailed - //method allows us to get past that + // rather than using the blobId stream here, need to use a different means of walking the file tree, as + // we are deleting items on the way through, and apparently on *nix systems, deleting files that you are about to + // walk over causes a FileNotFoundException to be thrown and the walking stops. Overridding the visitFileFailed + // method allows us to get past that Files.walkFileTree(contentDir, EnumSet.of(FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor() { @Override @@ -1021,7 +1025,7 @@ public FileVisitResult visitFileFailed(final Path file, final IOException exc) t } }); - //Do this check one final time, to preserve the functionality of throwing an exception when interrupted + // Do this check one final time, to preserve the functionality of throwing an exception when interrupted checkCancellation(); progressLogger.flush(); @@ -1140,12 +1144,19 @@ public Stream getBlobIdUpdatedSinceStream(final Duration duration) { } @Override - public Stream getBlobIdUpdatedSinceStream(String prefix, OffsetDateTime fromDateTime) { + public PaginatedResult getBlobIdUpdatedSinceStream( + String prefix, + OffsetDateTime fromDateTime, + @Nullable final String continuationToken, + final int pageSize) + { DateBasedWalkFile dateBasedWalkFile = new DateBasedWalkFile(contentDir.toString(), fromDateTime); Map dateBasedBlobIds = dateBasedWalkFile.getBlobIdToDateRef(contentDir.resolve(prefix).toString()); - return reconciliationLogger.getBlobsCreatedSince(reconciliationLogDir, fromDateTime.toLocalDateTime(), - dateBasedBlobIds); + List blobIds = + reconciliationLogger.getBlobsCreatedSince(reconciliationLogDir, fromDateTime.toLocalDateTime(), + dateBasedBlobIds).collect(Collectors.toList()); + return new PaginatedResult<>(blobIds, null); } @Override @@ -1180,7 +1191,8 @@ String toBlobName(final Path path) { try { String pathStr = contentDir.resolve(DIRECT_PATH_ROOT) .relativize(path) // just the relative path part under DIRECT_PATH_ROOT - .toString().replace(File.separatorChar, '/'); // guarantee we return unix-style paths + .toString() + .replace(File.separatorChar, '/'); // guarantee we return unix-style paths return removeEnd(pathStr, BLOB_FILE_ATTRIBUTES_SUFFIX); // drop the .properties suffix } catch (Exception ex) { @@ -1237,8 +1249,7 @@ private FileBlobAttributes getFileBlobAttributes(final BlobId blobId) { private BlobId toBlobId(final String blobName) { Map headers = ImmutableMap.of( BLOB_NAME_HEADER, blobName, - DIRECT_PATH_BLOB_HEADER, "true" - ); + DIRECT_PATH_BLOB_HEADER, "true"); return blobIdLocationResolver.fromHeaders(headers); } diff --git a/components/nexus-blobstore/pom.xml b/components/nexus-blobstore/pom.xml index afea58fc4d..6508f747f6 100644 --- a/components/nexus-blobstore/pom.xml +++ b/components/nexus-blobstore/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-blobstore diff --git a/components/nexus-blobstore/src/main/java/org/sonatype/nexus/blobstore/group/BlobStoreGroup.java b/components/nexus-blobstore/src/main/java/org/sonatype/nexus/blobstore/group/BlobStoreGroup.java index 53e6afd3ba..b06172fe6c 100644 --- a/components/nexus-blobstore/src/main/java/org/sonatype/nexus/blobstore/group/BlobStoreGroup.java +++ b/components/nexus-blobstore/src/main/java/org/sonatype/nexus/blobstore/group/BlobStoreGroup.java @@ -48,6 +48,7 @@ import org.sonatype.nexus.blobstore.api.BlobStoreUsageChecker; import org.sonatype.nexus.blobstore.api.OperationMetrics; import org.sonatype.nexus.blobstore.api.OperationType; +import org.sonatype.nexus.blobstore.api.PaginatedResult; import org.sonatype.nexus.blobstore.api.RawObjectAccess; import org.sonatype.nexus.blobstore.api.UnimplementedRawObjectAccess; import org.sonatype.nexus.blobstore.api.metrics.BlobStoreMetricsService; @@ -155,8 +156,7 @@ private MutableConfiguration getCacheConfiguration() { return new MutableConfiguration() .setStoreByValue(false) .setExpiryPolicyFactory( - CreatedExpiryPolicy.factoryOf(new Duration(blobIdCacheTimeout.unit(), blobIdCacheTimeout.value())) - ) + CreatedExpiryPolicy.factoryOf(new Duration(blobIdCacheTimeout.unit(), blobIdCacheTimeout.value()))) .setManagementEnabled(true) .setStatisticsEnabled(true); } @@ -256,7 +256,8 @@ public Blob get(final BlobId blobId) { public Blob get(final BlobId blobId, final boolean includeDeleted) { if (includeDeleted) { // check directly without using cache - return members.get().stream() + return members.get() + .stream() .filter((BlobStore member) -> member.exists(blobId)) .map((BlobStore member) -> member.get(blobId, true)) .filter(Objects::nonNull) @@ -265,8 +266,8 @@ public Blob get(final BlobId blobId, final boolean includeDeleted) { } else { return locate(blobId) - .map((BlobStore target) -> target.get(blobId, false)) - .orElse(null); + .map((BlobStore target) -> target.get(blobId, false)) + .orElse(null); } } @@ -274,7 +275,8 @@ public Blob get(final BlobId blobId, final boolean includeDeleted) { @Guarded(by = STARTED) public boolean delete(final BlobId blobId, final String reason) { locatedBlobs.remove(blobId); - List locations = members.get().stream() + List locations = members.get() + .stream() .filter((BlobStore member) -> member.exists(blobId)) .collect(toList()); @@ -291,7 +293,8 @@ public boolean delete(final BlobId blobId, final String reason) { @Guarded(by = STARTED) public boolean deleteHard(final BlobId blobId) { locatedBlobs.remove(blobId); - List locations = members.get().stream() + List locations = members.get() + .stream() .filter((BlobStore member) -> member.exists(blobId)) .collect(toList()); @@ -313,19 +316,19 @@ public BlobStoreMetricsService getMetricsService() { @Override @Guarded(by = STARTED) public BlobStoreMetrics getMetrics() { - Iterable membersMetrics = members.get().stream() + Iterable membersMetrics = members.get() + .stream() .filter(BlobStore::isStarted) - .map(BlobStore::getMetrics) - ::iterator; + .map(BlobStore::getMetrics)::iterator; return new BlobStoreGroupMetrics(membersMetrics); } @Override public Map getOperationMetricsByType() { Map result = new EnumMap<>(OperationType.class); - Iterable> metrics = members.get().stream() - .map(BlobStore::getOperationMetricsByType) - ::iterator; + Iterable> metrics = members.get() + .stream() + .map(BlobStore::getOperationMetricsByType)::iterator; for (Map metric : metrics) { for (Entry metricsEntry : metric.entrySet()) { OperationType type = metricsEntry.getKey(); @@ -346,9 +349,9 @@ public Map getOperationMetricsByType() { @Override public Map getOperationMetricsDelta() { Map result = new EnumMap<>(OperationType.class); - Iterable> metrics = members.get().stream() - .map(BlobStore::getOperationMetricsDelta) - ::iterator; + Iterable> metrics = members.get() + .stream() + .map(BlobStore::getOperationMetricsDelta)::iterator; for (Map metric : metrics) { for (Entry metricsEntry : metric.entrySet()) { OperationType type = metricsEntry.getKey(); @@ -384,12 +387,14 @@ public synchronized void deleteTempFiles(@Nullable final Integer daysOlderThan) } @Override - public boolean undelete(@Nullable final BlobStoreUsageChecker inUseChecker, - final BlobId blobId, - final BlobAttributes attributes, - final boolean isDryRun) + public boolean undelete( + @Nullable final BlobStoreUsageChecker inUseChecker, + final BlobId blobId, + final BlobAttributes attributes, + final boolean isDryRun) { - return members.get().stream() + return members.get() + .stream() .map((BlobStore member) -> member.undelete(inUseChecker, blobId, attributes, isDryRun)) .anyMatch((Boolean deleted) -> deleted); } @@ -427,20 +432,23 @@ public void shutdown() throws Exception { @Override public boolean exists(final BlobId blobId) { - return members.get().stream() + return members.get() + .stream() .anyMatch((BlobStore member) -> member.exists(blobId)); } @Override public boolean bytesExists(final BlobId blobId) { - return members.get().stream() + return members.get() + .stream() .anyMatch((BlobStore member) -> member.bytesExists(blobId)); } @Override public boolean isBlobEmpty(final BlobId blobId) { - return members.get().stream() - .anyMatch((BlobStore member) -> member.isBlobEmpty(blobId)); + return members.get() + .stream() + .anyMatch((BlobStore member) -> member.isBlobEmpty(blobId)); } @Override @@ -451,7 +459,8 @@ public void remove() { @Override public Stream getBlobIdStream() { - return members.get().stream() + return members.get() + .stream() .map((BlobStore member) -> member.getBlobIdStream()) .flatMap(identity()); } @@ -465,16 +474,19 @@ public Stream getBlobIdUpdatedSinceStream(final java.time.Duration durat } @Override - public Stream getBlobIdUpdatedSinceStream(final String prefix, final OffsetDateTime fromDateTime) { - return members - .get() - .stream() - .flatMap((BlobStore member) -> member.getBlobIdUpdatedSinceStream(prefix, fromDateTime)); + public PaginatedResult getBlobIdUpdatedSinceStream( + final String prefix, + final OffsetDateTime fromDateTime, + @Nullable final String continuationToken, + final int pageSize) + { + throw new UnsupportedOperationException(); } @Override public Stream getDirectPathBlobIdStream(final String prefix) { - return members.get().stream() + return members.get() + .stream() .map((BlobStore member) -> member.getDirectPathBlobIdStream(prefix)) .flatMap(identity()); } @@ -505,7 +517,9 @@ public RawObjectAccess getRawObjectAccess() { /** * Supplier for thread-safe lazy initialization of members. */ - private class MembersSupplier implements Supplier> { + private class MembersSupplier + implements Supplier> + { public List get() { List memberList = new ArrayList<>(); for (String name : BlobStoreGroupConfigurationHelper.memberNames(blobStoreConfiguration)) { @@ -539,11 +553,12 @@ Optional locate(final BlobId blobId) { private BlobStore search(BlobId blobId) { log.trace("Searching for {} in {}", blobId, members); - return members.get().stream() - .sorted(Comparator.comparing(BlobStore::isWritable).reversed()) - .filter((BlobStore member) -> member.exists(blobId)) - .findAny() - .orElse(null); + return members.get() + .stream() + .sorted(Comparator.comparing(BlobStore::isWritable).reversed()) + .filter((BlobStore member) -> member.exists(blobId)) + .findAny() + .orElse(null); } @Override @@ -561,7 +576,8 @@ public String toString() { * @since 3.14 */ @FunctionalInterface - private interface CreateBlobFunction { + private interface CreateBlobFunction + { Blob create(BlobStore blobStore); } } diff --git a/components/nexus-bootstrap/pom.xml b/components/nexus-bootstrap/pom.xml index a928d7e1f8..6feb406526 100644 --- a/components/nexus-bootstrap/pom.xml +++ b/components/nexus-bootstrap/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-bootstrap diff --git a/components/nexus-bootstrap/src/main/java/org/sonatype/nexus/bootstrap/Launcher.java b/components/nexus-bootstrap/src/main/java/org/sonatype/nexus/bootstrap/Launcher.java index 7fbd949214..0c3ff4f3a4 100644 --- a/components/nexus-bootstrap/src/main/java/org/sonatype/nexus/bootstrap/Launcher.java +++ b/components/nexus-bootstrap/src/main/java/org/sonatype/nexus/bootstrap/Launcher.java @@ -64,8 +64,7 @@ public class Launcher public Launcher( final File defaultsFile, @Nullable final File propertiesFile, - @Nullable final File nodeNamePropertiesFile) - throws Exception + @Nullable final File nodeNamePropertiesFile) throws Exception { configureLogging(); @@ -187,7 +186,8 @@ private Property withKeyPrefixRemoved() { private void configureInitialLoggingOverrides(final Map props) { LoggerContext loggerContext = loggerContext(); if (props != null) { - props.entrySet().stream() + props.entrySet() + .stream() .map(Property::new) .filter(p -> p.key.startsWith(LOGGING_OVERRIDE_PREFIX)) .filter(p -> !p.value.isEmpty()) diff --git a/components/nexus-cache/pom.xml b/components/nexus-cache/pom.xml index 6d97f0b15d..5dd9e4d684 100644 --- a/components/nexus-cache/pom.xml +++ b/components/nexus-cache/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-cache diff --git a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheBuilder.java b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheBuilder.java index 03feb8a9ef..51ade5180b 100644 --- a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheBuilder.java +++ b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheBuilder.java @@ -21,6 +21,7 @@ /** * Abstracts cache configurations to make using different underlying implementations easier + * * @since 3.14 */ public interface CacheBuilder diff --git a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheHelper.java b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheHelper.java index 03be13f869..3b2eb1162c 100644 --- a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheHelper.java +++ b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheHelper.java @@ -41,8 +41,10 @@ public class CacheHelper private final Provider cacheBuilderProvider; @Inject - public CacheHelper(final Provider cacheManagerProvider, - final Provider cacheBuilderProvider) { + public CacheHelper( + final Provider cacheManagerProvider, + final Provider cacheBuilderProvider) + { this.cacheManagerProvider = checkNotNull(cacheManagerProvider); this.cacheBuilderProvider = checkNotNull(cacheBuilderProvider); } @@ -52,12 +54,14 @@ private CacheManager manager() { } @SuppressWarnings("unchecked") - public CacheBuilder builder() { + public CacheBuilder builder() { return cacheBuilderProvider.get(); } - public synchronized Cache maybeCreateCache(final String name, - final MutableConfiguration mutableConfiguration) { + public synchronized Cache maybeCreateCache( + final String name, + final MutableConfiguration mutableConfiguration) + { checkNotNull(name); checkNotNull(mutableConfiguration); @@ -75,7 +79,7 @@ public synchronized Cache maybeCreateCache(final String name, return cache; } - public synchronized Cache getOrCreate(final CacheBuilder builder) { + public synchronized Cache getOrCreate(final CacheBuilder builder) { checkNotNull(builder); Cache cache = manager().getCache(builder.getName(), builder.getKeyType(), builder.getValueType()); @@ -91,16 +95,18 @@ public synchronized Cache getOrCreate(final CacheBuilder build return cache; } - public synchronized Cache maybeCreateCache(final String name, - final Factory expiryPolicyFactory) + public synchronized Cache maybeCreateCache( + final String name, + final Factory expiryPolicyFactory) { return maybeCreateCache(name, null, null, expiryPolicyFactory); } - public synchronized Cache maybeCreateCache(final String name, - @Nullable final Class keyType, - @Nullable final Class valueType, - final Factory expiryPolicyFactory) + public synchronized Cache maybeCreateCache( + final String name, + @Nullable final Class keyType, + @Nullable final Class valueType, + final Factory expiryPolicyFactory) { return maybeCreateCache(name, createCacheConfig(keyType, valueType, expiryPolicyFactory)); } diff --git a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheManager.java b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheManager.java index fb7c4b0dae..2163897cd6 100644 --- a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheManager.java +++ b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/CacheManager.java @@ -27,14 +27,14 @@ public interface CacheManager /** * Creates the {@link NexusCache}. It may be a distributed or a local cache depending on a Nexus mode. * - * @param cacheName the name of the cache. - * @param keyType the expected key type. - * @param valueType the expected value type. + * @param cacheName the name of the cache. + * @param keyType the expected key type. + * @param valueType the expected value type. * @param expiryAfter the expiration policy of the cache. * @return the newly created {@link NexusCache} */ NexusCache getCache(String cacheName, Class keyType, Class valueType, Duration expiryAfter); - + /** * Destroys the {@link NexusCache} specified by cacheName. */ diff --git a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/NexusCache.java b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/NexusCache.java index 18c21ad1d5..e76b6ba75e 100644 --- a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/NexusCache.java +++ b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/NexusCache.java @@ -34,7 +34,7 @@ public interface NexusCache * Associates the specified value with the specified key in the cache. If the {@link NexusCache} previously * contained a mapping for the key, the old value is replaced by the specified value. * - * @param key key with which the specified value is to be associated + * @param key key with which the specified value is to be associated * @param value value to be associated with the specified key */ void put(final K key, final V value); diff --git a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/LocalCacheManager.java b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/LocalCacheManager.java index 8068ee9da4..cc8b2ac114 100644 --- a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/LocalCacheManager.java +++ b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/LocalCacheManager.java @@ -59,7 +59,7 @@ public NexusCache getCache( return new LocalCache<>( cacheHelper.maybeCreateCache(cacheName, keyType, valueType, CreatedExpiryPolicy.factoryOf(expiryAfter))); } - + @Override public void destroyCache(final String cacheName) { cacheHelper.maybeDestroyCache(cacheName); diff --git a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheBuilder.java b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheBuilder.java index 8cc99611f0..56eb032d9d 100644 --- a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheBuilder.java +++ b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheBuilder.java @@ -59,7 +59,7 @@ public Cache build(final CacheManager manager) { builder.withExpiry(mapToEhCacheExpiry(expiryFactory.create())); - Cache cache = manager.createCache(name, Eh107Configuration.fromEhcacheCacheConfiguration(builder)); + Cache cache = manager.createCache(name, Eh107Configuration.fromEhcacheCacheConfiguration(builder)); manager.enableStatistics(name, statisticsEnabled); manager.enableManagement(name, managementEnabled); @@ -99,7 +99,7 @@ private Duration toJavaDuration(final javax.cache.expiry.Duration duration) { return Duration.of(1, ChronoUnit.FOREVER); } ChronoUnit chronoUnit = null; - switch(duration.getTimeUnit()) { + switch (duration.getTimeUnit()) { case DAYS: chronoUnit = ChronoUnit.DAYS; break; diff --git a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProvider.java b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProvider.java index 938d0bb6b3..bb3f9ee902 100644 --- a/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProvider.java +++ b/components/nexus-cache/src/main/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProvider.java @@ -77,8 +77,7 @@ public EhCacheManagerProvider(@Nullable final URI uri) { private CacheManager create(@Nullable final URI config) { CachingProvider provider = Caching.getCachingProvider( EhcacheCachingProvider.class.getName(), - EhcacheCachingProvider.class.getClassLoader() - ); + EhcacheCachingProvider.class.getClassLoader()); log.info("Creating cache-manager with configuration: {}", config); CacheManager manager = provider.getCacheManager(config, getClass().getClassLoader()); diff --git a/components/nexus-cache/src/test/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProviderTest.java b/components/nexus-cache/src/test/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProviderTest.java index 8b912e1791..2e1057dd77 100644 --- a/components/nexus-cache/src/test/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProviderTest.java +++ b/components/nexus-cache/src/test/java/org/sonatype/nexus/cache/internal/ehcache/EhCacheManagerProviderTest.java @@ -79,15 +79,15 @@ public void preconfiguredCacheWithEternal() { log(cacheManager); assertThat(cacheManager, notNullValue()); - Cache cache = cacheManager.getCache("testEternalCache", Object.class, Object.class); + Cache cache = cacheManager.getCache("testEternalCache", Object.class, Object.class); log(cache); assertThat(cache, notNullValue()); - //log(JCacheConfiguration.class.getProtectionDomain().getCodeSource().getLocation()); - //JCacheConfiguration config = (JCacheConfiguration) cache.getConfiguration(JCacheConfiguration.class); - //log(config.getExpiryPolicy().getExpiryForAccess()); - //log(config.getExpiryPolicy().getExpiryForAccess().isEternal()); - //log(config.getExpiryPolicy().getExpiryForAccess().isZero()); + // log(JCacheConfiguration.class.getProtectionDomain().getCodeSource().getLocation()); + // JCacheConfiguration config = (JCacheConfiguration) cache.getConfiguration(JCacheConfiguration.class); + // log(config.getExpiryPolicy().getExpiryForAccess()); + // log(config.getExpiryPolicy().getExpiryForAccess().isEternal()); + // log(config.getExpiryPolicy().getExpiryForAccess().isZero()); Object key = "foo"; Object value = "bar"; diff --git a/components/nexus-capability/pom.xml b/components/nexus-capability/pom.xml index 6315d6895c..7f6427d0cc 100644 --- a/components/nexus-capability/pom.xml +++ b/components/nexus-capability/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-capability diff --git a/components/nexus-cleanup-config/pom.xml b/components/nexus-cleanup-config/pom.xml index d82ae9f66b..c3a0663d51 100644 --- a/components/nexus-cleanup-config/pom.xml +++ b/components/nexus-cleanup-config/pom.xml @@ -19,7 +19,7 @@ nexus-components org.sonatype.nexus - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT 4.0.0 diff --git a/components/nexus-cleanup/pom.xml b/components/nexus-cleanup/pom.xml index 56ef78bcd8..e454586712 100644 --- a/components/nexus-cleanup/pom.xml +++ b/components/nexus-cleanup/pom.xml @@ -19,7 +19,7 @@ nexus-components org.sonatype.nexus - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT 4.0.0 diff --git a/components/nexus-commands/pom.xml b/components/nexus-commands/pom.xml index a229a75e83..bfcd0e17b3 100644 --- a/components/nexus-commands/pom.xml +++ b/components/nexus-commands/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-commands diff --git a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/ActionRegistrar.java b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/ActionRegistrar.java index e951513415..cfa3b3a467 100644 --- a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/ActionRegistrar.java +++ b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/ActionRegistrar.java @@ -45,9 +45,10 @@ public class ActionRegistrar private final SessionFactory sessionFactory; @Inject - public ActionRegistrar(final BeanLocator beanLocator, - @Nullable final SessionFactory sessionFactory, - @Nullable final BundleContext bundleContext) + public ActionRegistrar( + final BeanLocator beanLocator, + @Nullable final SessionFactory sessionFactory, + @Nullable final BundleContext bundleContext) { this.beanLocator = checkNotNull(beanLocator); this.sessionFactory = sessionFactory; // might be null during tests diff --git a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/BeanEntryCommand.java b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/BeanEntryCommand.java index 193304dd17..be5780c798 100644 --- a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/BeanEntryCommand.java +++ b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/BeanEntryCommand.java @@ -48,7 +48,7 @@ public BeanEntryCommand(final BeanLocator beanLocator, final BeanEntry clazz) { - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings({"unchecked", "rawtypes"}) Iterator> itr = beanLocator.locate(Key.get((Class) clazz)).iterator(); if (itr.hasNext()) { return itr.next().getValue(); diff --git a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/InfoProviderMediator.java b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/InfoProviderMediator.java index fb1184b05a..26a598102d 100644 --- a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/InfoProviderMediator.java +++ b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/internal/InfoProviderMediator.java @@ -34,16 +34,15 @@ public class InfoProviderMediator implements Mediator { @Override - public void add(final BeanEntry beanEntry, final BundleContext bundleContext) - throws Exception - { + public void add(final BeanEntry beanEntry, final BundleContext bundleContext) throws Exception { log.debug("Adding: {}", beanEntry); bundleContext.registerService(InfoProvider.class, beanEntry.getValue(), null); } @Override - public void remove(final BeanEntry beanEntry, final BundleContext bundleContext) - throws Exception + public void remove( + final BeanEntry beanEntry, + final BundleContext bundleContext) throws Exception { // TODO: implement remove } diff --git a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/package-info.java b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/package-info.java index acb31a701b..520afc3e61 100644 --- a/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/package-info.java +++ b/components/nexus-commands/src/main/java/org/sonatype/nexus/commands/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.commands; \ No newline at end of file +package org.sonatype.nexus.commands; diff --git a/components/nexus-common/pom.xml b/components/nexus-common/pom.xml index 4c9b238464..cfaf76cecc 100644 --- a/components/nexus-common/pom.xml +++ b/components/nexus-common/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-common diff --git a/components/nexus-core/pom.xml b/components/nexus-core/pom.xml index 2c139d94ed..790f714d48 100644 --- a/components/nexus-core/pom.xml +++ b/components/nexus-core/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-core diff --git a/components/nexus-crypto/pom.xml b/components/nexus-crypto/pom.xml index d034bd3244..565054b4ce 100644 --- a/components/nexus-crypto/pom.xml +++ b/components/nexus-crypto/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-crypto diff --git a/components/nexus-datastore-api/pom.xml b/components/nexus-datastore-api/pom.xml index e079b521f8..cb8eada269 100644 --- a/components/nexus-datastore-api/pom.xml +++ b/components/nexus-datastore-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-datastore-api diff --git a/components/nexus-datastore-api/src/main/java/org/sonatype/nexus/datastore/api/DataStoreConfiguration.java b/components/nexus-datastore-api/src/main/java/org/sonatype/nexus/datastore/api/DataStoreConfiguration.java index ddaa7d0def..a38a4c5fd8 100644 --- a/components/nexus-datastore-api/src/main/java/org/sonatype/nexus/datastore/api/DataStoreConfiguration.java +++ b/components/nexus-datastore-api/src/main/java/org/sonatype/nexus/datastore/api/DataStoreConfiguration.java @@ -96,7 +96,10 @@ public String toString() { '}'; } - public static Map> diff(final DataStoreConfiguration left, final DataStoreConfiguration right) { + public static Map> diff( + final DataStoreConfiguration left, + final DataStoreConfiguration right) + { Map> results = new HashMap<>(); diff("name", left, right, DataStoreConfiguration::getName, results); diff("source", left, right, DataStoreConfiguration::getSource, results); @@ -105,17 +108,20 @@ public static Map> diff(final DataStoreConfiguration Stream.concat(left.getAttributes().keySet().stream(), right.getAttributes().keySet().stream()) .distinct() .forEach(attributeKey -> { - Function getAttribute = (config -> config.getAttributes().getOrDefault(attributeKey, null)); + Function getAttribute = + (config -> config.getAttributes().getOrDefault(attributeKey, null)); diff("attributes->" + attributeKey, left, right, getAttribute, results); }); return results; } - private static void diff(final String fieldName, - final DataStoreConfiguration a, - final DataStoreConfiguration b, - final Function fieldFunction, - Map> results) { + private static void diff( + final String fieldName, + final DataStoreConfiguration a, + final DataStoreConfiguration b, + final Function fieldFunction, + Map> results) + { String aField = fieldFunction.apply(a); String bField = fieldFunction.apply(b); @@ -133,7 +139,8 @@ private static void diff(final String fieldName, protected Map maybeRedact(final Map attributes) { if (attributes == null || attributes.isEmpty()) { return attributes; - } else { + } + else { return transformEntries(attributes, DataStoreConfiguration::maybeRedact); } } diff --git a/components/nexus-datastore-api/src/test/java/org/sonatype/nexus/datastore/api/DataStoreConfigurationTest.java b/components/nexus-datastore-api/src/test/java/org/sonatype/nexus/datastore/api/DataStoreConfigurationTest.java index e2092e9c12..f105f88e24 100644 --- a/components/nexus-datastore-api/src/test/java/org/sonatype/nexus/datastore/api/DataStoreConfigurationTest.java +++ b/components/nexus-datastore-api/src/test/java/org/sonatype/nexus/datastore/api/DataStoreConfigurationTest.java @@ -88,7 +88,8 @@ public void nameAndSourceDiff() { public void attributesDiffer() { Map> diffMap = DataStoreConfiguration.diff(configurationA, configurationC); assertThat(diffMap.keySet(), hasSize(5)); - assertThat(diffMap.keySet(), containsInAnyOrder("name", "source", "attributes->entry-2", "attributes->entry-3", "attributes->entry-4")); + assertThat(diffMap.keySet(), + containsInAnyOrder("name", "source", "attributes->entry-2", "attributes->entry-3", "attributes->entry-4")); assertThat(diffMap.get("name").values(), containsInAnyOrder("configA", "configC")); assertThat(diffMap.get("source").get("configA"), equalTo("sourceA")); assertThat(diffMap.get("source").get("configC"), equalTo("sourceC")); @@ -116,7 +117,6 @@ public void hideSensitiveKeys() { assertThat(diffMap.get("attributes->key-2").values(), containsInAnyOrder(REDACTED, REDACTED)); assertThat(diffMap.get("attributes->jdbcUrl").values(), containsInAnyOrder( format("localhost:5432/nexus?username=user&password=%s", REDACTED), - format("localhost:5432/nexus?password=%s&username=user", REDACTED)) - ); + format("localhost:5432/nexus?password=%s&username=user", REDACTED))); } } diff --git a/components/nexus-datastore-mybatis/pom.xml b/components/nexus-datastore-mybatis/pom.xml index 09ed8efab3..f0e72543ea 100644 --- a/components/nexus-datastore-mybatis/pom.xml +++ b/components/nexus-datastore-mybatis/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-datastore-mybatis diff --git a/components/nexus-datastore/pom.xml b/components/nexus-datastore/pom.xml index 65fb285ad9..d211ea819e 100644 --- a/components/nexus-datastore/pom.xml +++ b/components/nexus-datastore/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-datastore diff --git a/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/ConfigStoreSupport.java b/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/ConfigStoreSupport.java index c2b27fc9ac..02b8685119 100644 --- a/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/ConfigStoreSupport.java +++ b/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/ConfigStoreSupport.java @@ -40,7 +40,7 @@ public abstract class ConfigStoreSupport private EventManager eventManager; - @SuppressWarnings({ "rawtypes", "unchecked" }) + @SuppressWarnings({"rawtypes", "unchecked"}) protected ConfigStoreSupport(final DataSessionSupplier sessionSupplier) { super(sessionSupplier, DEFAULT_DATASTORE_NAME); diff --git a/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/DataStoreConfigurationManager.java b/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/DataStoreConfigurationManager.java index 4c25fe56e1..cf3821e3a5 100644 --- a/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/DataStoreConfigurationManager.java +++ b/components/nexus-datastore/src/main/java/org/sonatype/nexus/datastore/DataStoreConfigurationManager.java @@ -58,7 +58,8 @@ public Iterable load() { Set configuredStores = new TreeSet<>(CASE_INSENSITIVE_ORDER); // only attempt to load a named store once from the first store that has it // (if the first attempt fails then that store is considered not available) - return configurationSources.values().stream() + return configurationSources.values() + .stream() .filter(DataStoreConfigurationSource::isEnabled) .sorted(comparingInt(this::getPriority).reversed()) .flatMap(source -> stream(source.browseStoreNames()) @@ -68,11 +69,12 @@ public Iterable load() { .collect(toImmutableList()); } - private int getPriority(final DataStoreConfigurationSource configSource){ + private int getPriority(final DataStoreConfigurationSource configSource) { if (configSource.getClass().isAnnotationPresent(Priority.class)) { Priority priority = configSource.getClass().getAnnotation(Priority.class); return priority.value(); - } else { + } + else { log.warn("Loaded config source {} without priority, assuming last", configSource.getName()); return Integer.MIN_VALUE; } diff --git a/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreConfigurationManagerTest.java b/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreConfigurationManagerTest.java index 262479a65a..1ac246f73a 100644 --- a/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreConfigurationManagerTest.java +++ b/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreConfigurationManagerTest.java @@ -40,6 +40,7 @@ import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; + /** * {@link DataStoreConfigurationManager} tests. */ @@ -66,7 +67,9 @@ private static DataStoreConfiguration newDataStoreConfiguration(final String nam } @Priority(1) - private static class NumberOneConfigSource implements DataStoreConfigurationSource { + private static class NumberOneConfigSource + implements DataStoreConfigurationSource + { @Override public String getName() { return "numberOne"; @@ -84,7 +87,9 @@ public DataStoreConfiguration load(final String storeName) { } @Priority(2) - private static class NumberTwoConfigSource implements DataStoreConfigurationSource { + private static class NumberTwoConfigSource + implements DataStoreConfigurationSource + { @Override public String getName() { return "numberTwo"; @@ -102,7 +107,9 @@ public DataStoreConfiguration load(final String storeName) { } @Priority(3) - private static class NumberThreeConfigSource implements DataStoreConfigurationSource { + private static class NumberThreeConfigSource + implements DataStoreConfigurationSource + { @Override public String getName() { return "numberThree"; @@ -124,14 +131,21 @@ public void followsPriorityAnnotationForLoads() { NumberOneConfigSource source1 = new NumberOneConfigSource(); NumberTwoConfigSource source2 = new NumberTwoConfigSource(); NumberThreeConfigSource source3 = new NumberThreeConfigSource(); - //Intentionally load them out of order + // Intentionally load them out of order when(configurationSources.values()).thenReturn(ImmutableList.of(source1, source2, source3)); - List configs = StreamSupport.stream(underTest.load().spliterator(), false).collect(toList()); + List configs = + StreamSupport.stream(underTest.load().spliterator(), false).collect(toList()); assertThat(configs, hasSize(7)); - assertThat(configs.stream().filter(dataStoreConfiguration -> dataStoreConfiguration.getSource().equals("numberThree")).count(), is(equalTo(4L))); - assertThat(configs.stream().filter(dataStoreConfiguration -> dataStoreConfiguration.getSource().equals("numberTwo")).count(), is(equalTo(2L))); - assertThat(configs.stream().filter(dataStoreConfiguration -> dataStoreConfiguration.getSource().equals("numberOne")).count(), is(equalTo(1L))); + assertThat(configs.stream() + .filter(dataStoreConfiguration -> dataStoreConfiguration.getSource().equals("numberThree")) + .count(), is(equalTo(4L))); + assertThat(configs.stream() + .filter(dataStoreConfiguration -> dataStoreConfiguration.getSource().equals("numberTwo")) + .count(), is(equalTo(2L))); + assertThat(configs.stream() + .filter(dataStoreConfiguration -> dataStoreConfiguration.getSource().equals("numberOne")) + .count(), is(equalTo(1L))); } @Test diff --git a/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreSupportTest.java b/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreSupportTest.java index fc7210d784..e353d152a1 100644 --- a/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreSupportTest.java +++ b/components/nexus-datastore/src/test/java/org/sonatype/nexus/datastore/DataStoreSupportTest.java @@ -135,7 +135,8 @@ public void attributesAreInterpolatedAtStart() throws Exception { verify(underTest).doStart(eq("testStore"), captor.capture()); assertThat((Map) captor.getValue(), hasEntry("jdbcUrl", "jdbc:h2:/tmp/example/db/testStore")); - assertThat(underTest.getConfiguration().getAttributes(), hasEntry("jdbcUrl", "jdbc:h2:${karaf.data}/db/${storeName}")); + assertThat(underTest.getConfiguration().getAttributes(), + hasEntry("jdbcUrl", "jdbc:h2:${karaf.data}/db/${storeName}")); } @Test diff --git a/components/nexus-distributed-event-service-api/pom.xml b/components/nexus-distributed-event-service-api/pom.xml index 26713b2884..3cdea467a2 100644 --- a/components/nexus-distributed-event-service-api/pom.xml +++ b/components/nexus-distributed-event-service-api/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT diff --git a/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/RepositoryRemoteConnectionStatusEvent.java b/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/RepositoryRemoteConnectionStatusEvent.java index c0ca7e9127..fb94fa4793 100644 --- a/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/RepositoryRemoteConnectionStatusEvent.java +++ b/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/RepositoryRemoteConnectionStatusEvent.java @@ -44,8 +44,7 @@ public RepositoryRemoteConnectionStatusEvent( @JsonProperty("remoteConnectionStatusTypeOrdinal") final int remoteConnectionStatusTypeOrdinal, @JsonProperty("reason") final String reason, @JsonProperty("blockedUntilMillis") final long blockedUntilMillis, - @JsonProperty("requestUrl") final String requestUrl - ) + @JsonProperty("requestUrl") final String requestUrl) { super(UPDATED); this.repositoryName = checkNotNull(repositoryName); diff --git a/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SelectorConfigurationChangedEvent.java b/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SelectorConfigurationChangedEvent.java index 74816f1a4e..38d57fba75 100644 --- a/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SelectorConfigurationChangedEvent.java +++ b/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SelectorConfigurationChangedEvent.java @@ -28,8 +28,7 @@ public class SelectorConfigurationChangedEvent public static final String NAME = "SelectorConfigurationChangedEvent"; @JsonCreator - public SelectorConfigurationChangedEvent(@JsonProperty("eventType") final EventType eventType) - { + public SelectorConfigurationChangedEvent(@JsonProperty("eventType") final EventType eventType) { super(eventType); } } diff --git a/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SupportZipGenerationEvent.java b/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SupportZipGenerationEvent.java index f0a4bdc46e..e8192f861b 100644 --- a/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SupportZipGenerationEvent.java +++ b/components/nexus-distributed-event-service-api/src/main/java/org/sonatype/nexus/distributed/event/service/api/common/SupportZipGenerationEvent.java @@ -25,7 +25,7 @@ * Contains the 'request' object which holds all properties for 'support zip' creation and nodeID of target node */ public class SupportZipGenerationEvent - extends DistributedEventSupport + extends DistributedEventSupport { public static final String NAME = "SupportZipGenerationEvent"; @@ -36,7 +36,8 @@ public class SupportZipGenerationEvent @JsonCreator public SupportZipGenerationEvent( @JsonProperty("recipientNodeId") final String recipientNodeId, - @JsonProperty("request") final SupportZipGeneratorRequest request) { + @JsonProperty("request") final SupportZipGeneratorRequest request) + { super(EventType.CREATED); this.recipientNodeId = checkNotNull(recipientNodeId); this.request = checkNotNull(request); diff --git a/components/nexus-elasticsearch/pom.xml b/components/nexus-elasticsearch/pom.xml index a4c3cf6747..39ca9127e4 100644 --- a/components/nexus-elasticsearch/pom.xml +++ b/components/nexus-elasticsearch/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-elasticsearch diff --git a/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/NodeProvider.java b/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/NodeProvider.java index 903b07e8e9..0133bdbd3c 100644 --- a/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/NodeProvider.java +++ b/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/NodeProvider.java @@ -67,7 +67,7 @@ public class NodeProvider private final ApplicationDirectories directories; private final NodeAccess nodeAccess; - + private final List plugins; private final List pluginLocators; @@ -75,10 +75,11 @@ public class NodeProvider private Node node; @Inject - public NodeProvider(final ApplicationDirectories directories, - final NodeAccess nodeAccess, - @Nullable @Named("${nexus.elasticsearch.plugins}") final String plugins, - @Nullable final List pluginLocators) + public NodeProvider( + final ApplicationDirectories directories, + final NodeAccess nodeAccess, + @Nullable @Named("${nexus.elasticsearch.plugins}") final String plugins, + @Nullable final List pluginLocators) { this.directories = checkNotNull(directories); this.nodeAccess = checkNotNull(nodeAccess); diff --git a/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/PluginUsingNode.java b/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/PluginUsingNode.java index 5672921f4e..93fec215c3 100644 --- a/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/PluginUsingNode.java +++ b/components/nexus-elasticsearch/src/main/java/org/sonatype/nexus/elasticsearch/internal/PluginUsingNode.java @@ -33,4 +33,3 @@ public PluginUsingNode(final Settings preparedSettings, Collection org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-email diff --git a/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailConfiguration.java b/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailConfiguration.java index 950afef17b..d8d5bcd173 100644 --- a/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailConfiguration.java +++ b/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailConfiguration.java @@ -22,7 +22,7 @@ public interface EmailConfiguration { boolean isEnabled(); - + void setEnabled(boolean enabled); String getHost(); @@ -30,7 +30,7 @@ public interface EmailConfiguration void setHost(String host); int getPort(); - + void setPort(int port); String getUsername(); diff --git a/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailManager.java b/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailManager.java index f95e71eeee..a62e737100 100644 --- a/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailManager.java +++ b/components/nexus-email/src/main/java/org/sonatype/nexus/email/EmailManager.java @@ -40,8 +40,7 @@ public interface EmailManager /** * Send verification email to given address using the provided password. */ - void sendVerification(EmailConfiguration configuration, String password, String address) - throws EmailException; + void sendVerification(EmailConfiguration configuration, String password, String address) throws EmailException; /** * Send verification email to given address using the existing password. diff --git a/components/nexus-email/src/main/java/org/sonatype/nexus/email/package-info.java b/components/nexus-email/src/main/java/org/sonatype/nexus/email/package-info.java index 577d2fbf4e..4bc48fed30 100644 --- a/components/nexus-email/src/main/java/org/sonatype/nexus/email/package-info.java +++ b/components/nexus-email/src/main/java/org/sonatype/nexus/email/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.email; \ No newline at end of file +package org.sonatype.nexus.email; diff --git a/components/nexus-email/src/test/java/org/sonatype/nexus/email/internal/secrets/migration/EmailSecretsMigratorTests.java b/components/nexus-email/src/test/java/org/sonatype/nexus/email/internal/secrets/migration/EmailSecretsMigratorTests.java index d8faa23934..603eb3e01d 100644 --- a/components/nexus-email/src/test/java/org/sonatype/nexus/email/internal/secrets/migration/EmailSecretsMigratorTests.java +++ b/components/nexus-email/src/test/java/org/sonatype/nexus/email/internal/secrets/migration/EmailSecretsMigratorTests.java @@ -42,7 +42,7 @@ public class EmailSecretsMigratorTests @Test public void testMigrate() { - Secret notMigrated = getMockSecret("legacy","legacyPassword"); + Secret notMigrated = getMockSecret("legacy", "legacyPassword"); when(emailConfiguration.getPassword()).thenReturn(notMigrated); when(emailManager.getConfiguration()).thenReturn(emailConfiguration); diff --git a/components/nexus-extdirect/pom.xml b/components/nexus-extdirect/pom.xml index 262db67bbb..6109b849f6 100644 --- a/components/nexus-extdirect/pom.xml +++ b/components/nexus-extdirect/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-extdirect diff --git a/components/nexus-extdirect/src/main/java/org/sonatype/nexus/extdirect/package-info.java b/components/nexus-extdirect/src/main/java/org/sonatype/nexus/extdirect/package-info.java index 4bcfb6a546..07eccb4607 100644 --- a/components/nexus-extdirect/src/main/java/org/sonatype/nexus/extdirect/package-info.java +++ b/components/nexus-extdirect/src/main/java/org/sonatype/nexus/extdirect/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.extdirect; \ No newline at end of file +package org.sonatype.nexus.extdirect; diff --git a/components/nexus-extender/pom.xml b/components/nexus-extender/pom.xml index 6f016bc22d..1570e719f1 100644 --- a/components/nexus-extender/pom.xml +++ b/components/nexus-extender/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-extender diff --git a/components/nexus-features/pom.xml b/components/nexus-features/pom.xml index 9a1980873f..53bfaf70de 100644 --- a/components/nexus-features/pom.xml +++ b/components/nexus-features/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-features diff --git a/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesResolver.java b/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesResolver.java index 703605f0ce..c63dc9db46 100644 --- a/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesResolver.java +++ b/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesResolver.java @@ -87,7 +87,8 @@ public Stream resolve(final Feature feature) { else if (installedFeatures.add(id)) { log.debug("Resolving feature {}", id); return Stream.concat( - feature.getDependencies().stream() + feature.getDependencies() + .stream() .flatMap(d -> resolve(d.getName() + '/' + d.getVersion())), feature.getBundles().stream()); } diff --git a/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesWrapper.java b/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesWrapper.java index db262e2c97..7887cf4dd9 100644 --- a/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesWrapper.java +++ b/components/nexus-features/src/main/java/org/sonatype/nexus/features/internal/FeaturesWrapper.java @@ -66,7 +66,7 @@ public class FeaturesWrapper new Hashtable<>(singletonMap(SERVICE_RANKING, MAX_VALUE)); // NOSONAR: registerService API wants a Dictionary private final FeaturesService wrapper = (FeaturesService) newProxyInstance(FeaturesService.class.getClassLoader(), - new Class[] { FeaturesService.class }, this); + new Class[]{FeaturesService.class}, this); private volatile FeaturesService delegate; diff --git a/components/nexus-formfields/pom.xml b/components/nexus-formfields/pom.xml index 873802222c..10ecbfe218 100644 --- a/components/nexus-formfields/pom.xml +++ b/components/nexus-formfields/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-formfields diff --git a/components/nexus-guice-servlet/pom.xml b/components/nexus-guice-servlet/pom.xml index bca414a990..125b430b9e 100644 --- a/components/nexus-guice-servlet/pom.xml +++ b/components/nexus-guice-servlet/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-guice-servlet diff --git a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicFilterPipeline.java b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicFilterPipeline.java index fa21cc0a5b..2cf44d3a01 100644 --- a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicFilterPipeline.java +++ b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicFilterPipeline.java @@ -98,8 +98,10 @@ public synchronized void initPipeline(final ServletContext context) throws Servl } @Override - public void dispatch(ServletRequest request, ServletResponse response, FilterChain proceedingFilterChain) - throws IOException, ServletException + public void dispatch( + ServletRequest request, + ServletResponse response, + FilterChain proceedingFilterChain) throws IOException, ServletException { new FilterChainInvocation(filterDefinitions(), servletPipeline, proceedingFilterChain).doFilter( withDispatcher(request, servletPipeline), response); @@ -115,7 +117,8 @@ public void destroyPipeline() { } } - private static ServletRequest withDispatcher(ServletRequest servletRequest, + private static ServletRequest withDispatcher( + ServletRequest servletRequest, final DynamicServletPipeline servletPipeline) { if (!servletPipeline.hasServletsMapped()) { diff --git a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicServletPipeline.java b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicServletPipeline.java index 59d5d2f4fe..7facb47b39 100644 --- a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicServletPipeline.java +++ b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/DynamicServletPipeline.java @@ -89,8 +89,9 @@ RequestDispatcher getRequestDispatcher(final String path) { if (servletDefinition.shouldServe(path)) { return new RequestDispatcher() { - public void forward(ServletRequest servletRequest, ServletResponse servletResponse) - throws ServletException, IOException + public void forward( + ServletRequest servletRequest, + ServletResponse servletResponse) throws ServletException, IOException { checkState(!servletResponse.isCommitted(), "Response has been committed--you can only call forward before" @@ -98,21 +99,23 @@ public void forward(ServletRequest servletRequest, ServletResponse servletRespon servletResponse.resetBuffer(); - ServletRequest requestToProcess = servletRequest instanceof HttpServletRequest ? - wrapRequest((HttpServletRequest) servletRequest, path) : - servletRequest; + ServletRequest requestToProcess = + servletRequest instanceof HttpServletRequest ? wrapRequest((HttpServletRequest) servletRequest, path) + : servletRequest; doServiceImpl(requestToProcess, servletResponse); } - public void include(ServletRequest servletRequest, ServletResponse servletResponse) - throws ServletException, IOException + public void include( + ServletRequest servletRequest, + ServletResponse servletResponse) throws ServletException, IOException { doServiceImpl(servletRequest, servletResponse); } - private void doServiceImpl(ServletRequest servletRequest, ServletResponse servletResponse) - throws ServletException, IOException + private void doServiceImpl( + ServletRequest servletRequest, + ServletResponse servletResponse) throws ServletException, IOException { servletRequest.setAttribute(REQUEST_DISPATCHER_REQUEST, Boolean.TRUE); try { diff --git a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/FilterPipelineMediator.java b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/FilterPipelineMediator.java index b09ed026d0..0096b7a1e4 100644 --- a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/FilterPipelineMediator.java +++ b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/FilterPipelineMediator.java @@ -23,8 +23,9 @@ final class FilterPipelineMediator implements Mediator { - public void add(final BeanEntry entry, final DynamicFilterPipeline watcher) - throws Exception + public void add( + final BeanEntry entry, + final DynamicFilterPipeline watcher) throws Exception { // initialize pipeline before exposing via cache final FilterPipeline pipeline = entry.getValue(); @@ -32,12 +33,13 @@ public void add(final BeanEntry entry, final Dynamic watcher.refreshCache(); } - public void remove(final BeanEntry entry, final DynamicFilterPipeline watcher) - throws Exception + public void remove( + final BeanEntry entry, + final DynamicFilterPipeline watcher) throws Exception { // remove pipeline from cache before disposing final FilterPipeline pipeline = entry.getValue(); watcher.refreshCache(); pipeline.destroyPipeline(); } -} \ No newline at end of file +} diff --git a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/PipelineLogger.java b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/PipelineLogger.java index d1186c728c..c4c360404d 100644 --- a/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/PipelineLogger.java +++ b/components/nexus-guice-servlet/src/main/java/com/google/inject/servlet/PipelineLogger.java @@ -71,4 +71,4 @@ public String visit(InstanceServletBinding binding) { private static String format(String pattern, Object element) { return Strings.padEnd(pattern, PADDING, ' ') + ' ' + element; } -} \ No newline at end of file +} diff --git a/components/nexus-httpclient/pom.xml b/components/nexus-httpclient/pom.xml index 8758b78592..1beb2717ec 100644 --- a/components/nexus-httpclient/pom.xml +++ b/components/nexus-httpclient/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-httpclient diff --git a/components/nexus-jmx/pom.xml b/components/nexus-jmx/pom.xml index ce5161957b..f272f92d4c 100644 --- a/components/nexus-jmx/pom.xml +++ b/components/nexus-jmx/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-jmx diff --git a/components/nexus-main/pom.xml b/components/nexus-main/pom.xml index c29a9dca4a..39b1c38663 100644 --- a/components/nexus-main/pom.xml +++ b/components/nexus-main/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-main diff --git a/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NexusMain.java b/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NexusMain.java index 0ea7471cce..1e4b492088 100644 --- a/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NexusMain.java +++ b/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NexusMain.java @@ -27,7 +27,7 @@ public class NexusMain extends org.apache.karaf.main.Main { - //Visible for testing + // Visible for testing static final Version MINIMUM_JAVA_VERSION = new Version(1, 8, 0); Logger log = Logger.getLogger(this.getClass().getName()); @@ -87,8 +87,8 @@ public static void main(final String[] args) throws Exception { else if (!restart) { int overriddenExitCode = Integer.getInteger("nexus.overrideExitCode", 0); - if (overriddenExitCode!=0) { - System.err.println("Exited with code: " + overriddenExitCode ); + if (overriddenExitCode != 0) { + System.err.println("Exited with code: " + overriddenExitCode); System.err.println("Please check the previous log messages to identify why shutdown was initiated."); System.exit(overriddenExitCode); } @@ -153,7 +153,7 @@ private static void setDirectory(final String propertyName, final File parent, f System.setProperty(propertyName, new File(parent, child).getAbsolutePath()); } - //Visible for testing + // Visible for testing static void requireMinimumJavaVersion() { if (isNotSupportedVersion(System.getProperty("java.version"))) { // logging is not configured yet, so use console diff --git a/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NonResettableLogManager.java b/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NonResettableLogManager.java index 8ea16e2bac..16bd3d67fc 100644 --- a/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NonResettableLogManager.java +++ b/components/nexus-main/src/main/java/org/sonatype/nexus/karaf/NonResettableLogManager.java @@ -27,6 +27,6 @@ public void reset() { // overridden to be a noop // reset() is called on several occasions where its standard behavior has undesired effects: // - shortly after pax-logging has configured Logback, thereby undoing the efforts of LevelChangePropagator - // - during JVM shutdown, thereby disabling shutdown logging from components using JUL + // - during JVM shutdown, thereby disabling shutdown logging from components using JUL } } diff --git a/components/nexus-main/src/test/java/org/sonatype/nexus/karaf/NexusMainTest.java b/components/nexus-main/src/test/java/org/sonatype/nexus/karaf/NexusMainTest.java index 01ed68bdf6..c04f99b649 100644 --- a/components/nexus-main/src/test/java/org/sonatype/nexus/karaf/NexusMainTest.java +++ b/components/nexus-main/src/test/java/org/sonatype/nexus/karaf/NexusMainTest.java @@ -42,13 +42,13 @@ public class NexusMainTest @Rule public final SystemErrRule systemErrRule = new SystemErrRule().enableLog(); - @SuppressWarnings("java:S2699") //sonar wants assertions, but none seem worthwhile here + @SuppressWarnings("java:S2699") // sonar wants assertions, but none seem worthwhile here @Test public void doNotExitWhenGreaterVersion() throws Exception { requireMinimumJavaVersion(); } - @SuppressWarnings("java:S2699") //sonar wants assertions, but none seem worthwhile here + @SuppressWarnings("java:S2699") // sonar wants assertions, but none seem worthwhile here @Test public void doNotExitWhenExactVersion() throws Exception { setVersion(NexusMain.MINIMUM_JAVA_VERSION.toString()); @@ -63,13 +63,13 @@ public void exitOnLowerJavaVersion() throws Exception { requireMinimumJavaVersion(); } - @SuppressWarnings("java:S2699") //sonar wants assertions, but none seem worthwhile here + @SuppressWarnings("java:S2699") // sonar wants assertions, but none seem worthwhile here @Test public void doNotExitWhenWrongVersionButCheckDisabled() throws Exception { runDisabledVmCheckWithVersion(LOWER); } - @SuppressWarnings("java:S2699") //sonar wants assertions, but none seem worthwhile here + @SuppressWarnings("java:S2699") // sonar wants assertions, but none seem worthwhile here @Test public void doNotExitWhenVmCheckDisabledAndInvalidVersion() throws Exception { runDisabledVmCheckWithVersion(INVALID); @@ -96,7 +96,7 @@ public void logInvalidVersionErrorWhenVmCheckDisabledAndInvalidVersion() throws @Test public void logExpectedExitWithNoOverriddenExitCode() throws Exception { try (MockedConstruction ignored = - Mockito.mockConstruction(NexusMain.class)) { + Mockito.mockConstruction(NexusMain.class)) { exit.expectSystemExitWithStatus(0); NexusMain.main(new String[0]); } @@ -105,7 +105,7 @@ public void logExpectedExitWithNoOverriddenExitCode() throws Exception { @Test public void logExpectedExitWithOverriddenExitCode() throws Exception { try (MockedConstruction ignored = - Mockito.mockConstruction(NexusMain.class)) { + Mockito.mockConstruction(NexusMain.class)) { System.setProperty("nexus.overrideExitCode", "-42"); exit.expectSystemExitWithStatus(-42); NexusMain.main(new String[0]); diff --git a/components/nexus-mime/pom.xml b/components/nexus-mime/pom.xml index 25a10ed341..43e409c34d 100644 --- a/components/nexus-mime/pom.xml +++ b/components/nexus-mime/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-mime diff --git a/components/nexus-oss-edition/pom.xml b/components/nexus-oss-edition/pom.xml index 4b1613502e..a30d762e34 100644 --- a/components/nexus-oss-edition/pom.xml +++ b/components/nexus-oss-edition/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-oss-edition diff --git a/components/nexus-oss-edition/src/main/java/com/sonatype/nexus/edition/oss/ApplicationLicenseImpl.java b/components/nexus-oss-edition/src/main/java/com/sonatype/nexus/edition/oss/ApplicationLicenseImpl.java index 01d2efcaaa..e6d2642398 100644 --- a/components/nexus-oss-edition/src/main/java/com/sonatype/nexus/edition/oss/ApplicationLicenseImpl.java +++ b/components/nexus-oss-edition/src/main/java/com/sonatype/nexus/edition/oss/ApplicationLicenseImpl.java @@ -90,4 +90,4 @@ public void refresh() { public boolean isEvaluation() { return false; } -} \ No newline at end of file +} diff --git a/components/nexus-pax-exam/pom.xml b/components/nexus-pax-exam/pom.xml index 3bcab64880..48555342c7 100644 --- a/components/nexus-pax-exam/pom.xml +++ b/components/nexus-pax-exam/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-pax-exam diff --git a/components/nexus-pax-logging/pom.xml b/components/nexus-pax-logging/pom.xml index 576f89a2f2..f7eaeb1074 100644 --- a/components/nexus-pax-logging/pom.xml +++ b/components/nexus-pax-logging/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-pax-logging diff --git a/components/nexus-plugin-api/pom.xml b/components/nexus-plugin-api/pom.xml index 733632b51f..703b29721b 100644 --- a/components/nexus-plugin-api/pom.xml +++ b/components/nexus-plugin-api/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-plugin-api diff --git a/components/nexus-quartz/pom.xml b/components/nexus-quartz/pom.xml index 10a90a8df2..843f95efe2 100644 --- a/components/nexus-quartz/pom.xml +++ b/components/nexus-quartz/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-quartz diff --git a/components/nexus-rapture/pom.xml b/components/nexus-rapture/pom.xml index 4a7670f952..952c5dd8fa 100644 --- a/components/nexus-rapture/pom.xml +++ b/components/nexus-rapture/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-rapture diff --git a/components/nexus-rapture/src/main/resources/static/rapture/NX/view/MaliciousRiskOnDisk.js b/components/nexus-rapture/src/main/resources/static/rapture/NX/view/MaliciousRiskOnDisk.js index 67b3fd788d..1407aecfff 100644 --- a/components/nexus-rapture/src/main/resources/static/rapture/NX/view/MaliciousRiskOnDisk.js +++ b/components/nexus-rapture/src/main/resources/static/rapture/NX/view/MaliciousRiskOnDisk.js @@ -32,13 +32,13 @@ Ext.define('NX.view.MaliciousRiskOnDisk', { xtype: 'nx-secondary-container', reactView: window.ReactComponents.MaliciousRiskOnDisk, reactViewProps: { - rerender: function(count) { - if (count === 0) { + rerender: function(count, hide) { + if (count === 0 || hide) { me.hide(); } else { me.show(); } - } + }, } } ]; diff --git a/components/nexus-rapture/src/main/resources/static/rapture/NX/view/feature/Content.js b/components/nexus-rapture/src/main/resources/static/rapture/NX/view/feature/Content.js index 68927d2af0..c93d78e7c5 100644 --- a/components/nexus-rapture/src/main/resources/static/rapture/NX/view/feature/Content.js +++ b/components/nexus-rapture/src/main/resources/static/rapture/NX/view/feature/Content.js @@ -69,7 +69,14 @@ Ext.define('NX.view.feature.Content', { const isAdmin = user && user.administrator; const shouldHideForNonAdmin = isRiskOnDiskNoneAdminOverrideEnabled && !isAdmin; - if (isRiskOnDiskEnabled && isCurrentTitleInTitles && user && !shouldHideForNonAdmin) { + if (!user) { + document.cookie = 'MALWARE_BANNER=; expires=Thu, 26 Feb 1950 00:00:00 UTC; path=/'; + } + + const malwareBanner = document.cookie.match(/MALWARE_BANNER_STATUS=([^;]*)/); + const hideMalwareBanner = malwareBanner && malwareBanner[1] === 'close'; + + if (isRiskOnDiskEnabled && isCurrentTitleInTitles && user && !shouldHideForNonAdmin && !hideMalwareBanner) { maliciousRiskOnDisk.setHeight(285); maliciousRiskOnDisk.show(); maliciousRiskOnDisk.rerender(); diff --git a/components/nexus-repository-config/pom.xml b/components/nexus-repository-config/pom.xml index 5117ac4543..7a186a6b82 100644 --- a/components/nexus-repository-config/pom.xml +++ b/components/nexus-repository-config/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-config diff --git a/components/nexus-repository-content/pom.xml b/components/nexus-repository-content/pom.xml index d720b7e1d0..8b339e2662 100644 --- a/components/nexus-repository-content/pom.xml +++ b/components/nexus-repository-content/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-content diff --git a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/blobstore/metrics/BlobStoreMetricsStoreImpl.java b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/blobstore/metrics/BlobStoreMetricsStoreImpl.java index e735656e7e..9d425df53c 100644 --- a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/blobstore/metrics/BlobStoreMetricsStoreImpl.java +++ b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/blobstore/metrics/BlobStoreMetricsStoreImpl.java @@ -76,7 +76,7 @@ public void initializeMetrics(String blobStoreName) { } catch (DuplicateKeyException e) { log.debug("Failed to initialize blobstore metrics as they are already initialized.", - e); //this is likely an HA race condition between multiple nodes - this is not a problem + e); // this is likely an HA race condition between multiple nodes - this is not a problem } } } diff --git a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobDAO.java b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobDAO.java index c9b4468c41..976e9b0f0b 100644 --- a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobDAO.java +++ b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobDAO.java @@ -65,9 +65,9 @@ Continuation browseAssetBlobs( /** * Browse asset blobs in the content data store in a paged fashion. * - * @param limit maximum number of asset blobs to return - * @param start start date - * @param end end date + * @param limit maximum number of asset blobs to return + * @param start start date + * @param end end date * @param continuationToken optional token to continue from a previous request * @return collection of asset blobs and the next continuation token * @see Continuation#nextContinuationToken() @@ -109,6 +109,13 @@ Continuation browseAssetBlobsWithinDuration( */ boolean deleteAssetBlobBatch(@Param("blobRefIds") String[] blobRefIds); + /** + * Deletes an asset blob along with asset. + * + * @param blobRef the blob reference + */ + void deleteAssetBlobWithAsset(@Param("blobRef") BlobRef blobRef); + /** * Generally it is recommended that this method not be called and let stores manage this value. * @@ -119,7 +126,9 @@ Continuation browseAssetBlobsWithinDuration( /** * Sets added to repository on the asset blob. */ - void setAddedToRepository(@Param("blobRef") BlobRef blobRef, @Param("addedToRepository") OffsetDateTime addedToRepository); + void setAddedToRepository( + @Param("blobRef") BlobRef blobRef, + @Param("addedToRepository") OffsetDateTime addedToRepository); /** * Sets the content type on the asset diff --git a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobStore.java b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobStore.java index ed56707b8f..819932fced 100644 --- a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobStore.java +++ b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/store/AssetBlobStore.java @@ -39,9 +39,10 @@ public class AssetBlobStore extends ContentStoreSupport { @Inject - public AssetBlobStore(final DataSessionSupplier sessionSupplier, - @Assisted final String contentStoreName, - @Assisted final Class daoClass) + public AssetBlobStore( + final DataSessionSupplier sessionSupplier, + @Assisted final String contentStoreName, + @Assisted final Class daoClass) { super(sessionSupplier, contentStoreName, daoClass); } @@ -56,8 +57,11 @@ public AssetBlobStore(final DataSessionSupplier sessionSupplier, * @see Continuation#nextContinuationToken() */ @Transactional - public Continuation browseUnusedAssetBlobs(final int limit, - final int blobCreatedDelayMinute, @Nullable final String continuationToken) { + public Continuation browseUnusedAssetBlobs( + final int limit, + final int blobCreatedDelayMinute, + @Nullable final String continuationToken) + { return dao().browseUnusedAssetBlobs(limit, blobCreatedDelayMinute, continuationToken); } @@ -94,7 +98,6 @@ public Continuation browseAssetBlobsWithinDuration( return dao().browseAssetBlobsWithinDuration(limit, start, end, continuationToken); } - /** * Creates the given asset blob in the content data store. * @@ -138,6 +141,16 @@ public boolean deleteAssetBlobBatch(final String[] blobRefIds) { return dao().deleteAssetBlobBatch(blobRefIds); } + /** + * Deletes an asset blob along with asset. + * + * @param blobRef the blob reference + */ + @Transactional + public void deleteAssetBlobWithAsset(final BlobRef blobRef) { + dao().deleteAssetBlobWithAsset(blobRef); + } + /** * Generally it is recommended that this method not be called and let stores manage this value. * @@ -191,7 +204,10 @@ public void setCreatedByIP(final AssetBlob blob, final String createdByIP) { * @return collection of asset blobs and the next continuation token */ @Transactional - public Continuation browseAssetsWithLegacyBlobRef(final int limit, @Nullable final String continuationToken) { + public Continuation browseAssetsWithLegacyBlobRef( + final int limit, + @Nullable final String continuationToken) + { return dao().browseAssetsWithLegacyBlobRef(limit, continuationToken); } diff --git a/components/nexus-repository-content/src/main/resources/org/sonatype/nexus/repository/content/store/AssetBlobDAO.xml b/components/nexus-repository-content/src/main/resources/org/sonatype/nexus/repository/content/store/AssetBlobDAO.xml index 8e9b633016..73e7d9ce89 100644 --- a/components/nexus-repository-content/src/main/resources/org/sonatype/nexus/repository/content/store/AssetBlobDAO.xml +++ b/components/nexus-repository-content/src/main/resources/org/sonatype/nexus/repository/content/store/AssetBlobDAO.xml @@ -103,6 +103,17 @@ DELETE FROM ${format}_asset_blob WHERE blob_ref = ANY(#{blobRefIds}); + + DELETE + FROM ${format}_asset + WHERE asset_blob_id = (SELECT asset_blob_id + FROM ${format}_asset_blob + WHERE blob_ref = #{blobRef}); + DELETE + FROM ${format}_asset_blob + WHERE blob_ref = #{blobRef}; + + UPDATE ${format}_asset_blob SET blob_created = #{blobCreated} WHERE blob_ref = #{blobRef}; diff --git a/components/nexus-repository-services/pom.xml b/components/nexus-repository-services/pom.xml index d2c7de9171..166d6ad67a 100644 --- a/components/nexus-repository-services/pom.xml +++ b/components/nexus-repository-services/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-services diff --git a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/group/GroupHandler.java b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/group/GroupHandler.java index 7bae6dc1ba..98cf3126ca 100644 --- a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/group/GroupHandler.java +++ b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/group/GroupHandler.java @@ -15,7 +15,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Set; - import javax.annotation.Nonnull; import javax.inject.Named; import javax.inject.Singleton; @@ -95,7 +94,8 @@ public Response handle(@Nonnull final Context context) throws Exception { switch (method) { case GET: case HEAD: { - final DispatchedRepositories dispatched = context.getRequest().getAttributes() + final DispatchedRepositories dispatched = context.getRequest() + .getAttributes() .getOrCreate(DispatchedRepositories.class); return doGet(context, dispatched); } @@ -108,9 +108,9 @@ public Response handle(@Nonnull final Context context) throws Exception { /** * Method that actually performs group GET. Override if needed. */ - protected Response doGet(@Nonnull final Context context, - @Nonnull final DispatchedRepositories dispatched) - throws Exception + protected Response doGet( + @Nonnull final Context context, + @Nonnull final DispatchedRepositories dispatched) throws Exception { final GroupFacet groupFacet = context.getRepository().facet(GroupFacet.class); return getFirst(context, groupFacet.members(), dispatched); @@ -120,10 +120,10 @@ protected Response doGet(@Nonnull final Context context, * Returns the first OK response from member repositories or {@link HttpResponses#notFound()} if none of the members * responded with OK. */ - protected Response getFirst(@Nonnull final Context context, - @Nonnull final List members, - @Nonnull final DispatchedRepositories dispatched) - throws Exception + protected Response getFirst( + @Nonnull final Context context, + @Nonnull final List members, + @Nonnull final DispatchedRepositories dispatched) throws Exception { final Request request = context.getRequest(); for (Repository member : members) { @@ -148,10 +148,10 @@ protected Response getFirst(@Nonnull final Context context, /** * Returns all responses from all members as a linked map, where order is group member order. */ - protected LinkedHashMap getAll(@Nonnull final Context context, - @Nonnull final Iterable members, - @Nonnull final DispatchedRepositories dispatched) - throws Exception + protected LinkedHashMap getAll( + @Nonnull final Context context, + @Nonnull final Iterable members, + @Nonnull final DispatchedRepositories dispatched) throws Exception { return getAll(context.getRequest(), context, members, dispatched); } @@ -161,18 +161,18 @@ protected LinkedHashMap getAll(@Nonnull final Context cont * different request then provided by the {@link Context#getRequest()} while still using the * same {@link Context} to execute the request in. * - * @param request {@link Request} that could be different then the {@link Context#getRequest()} - * @param context {@link Context} - * @param members {@link Repository}'s + * @param request {@link Request} that could be different then the {@link Context#getRequest()} + * @param context {@link Context} + * @param members {@link Repository}'s * @param dispatched {@link DispatchedRepositories} * @return LinkedHashMap of all responses from all members where order is group member order. * @throws Exception throw for any issues dispatching the request */ - protected LinkedHashMap getAll(@Nonnull final Request request, - @Nonnull final Context context, - @Nonnull final Iterable members, - @Nonnull final DispatchedRepositories dispatched) - throws Exception + protected LinkedHashMap getAll( + @Nonnull final Request request, + @Nonnull final Context context, + @Nonnull final Iterable members, + @Nonnull final DispatchedRepositories dispatched) throws Exception { final LinkedHashMap responses = Maps.newLinkedHashMap(); for (Repository member : members) { @@ -193,7 +193,6 @@ protected LinkedHashMap getAll(@Nonnull final Request requ return responses; } - /** * Returns standard 404 with no message. Override for format specific messaging. */ diff --git a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/proxy/ProxyFacetSupport.java b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/proxy/ProxyFacetSupport.java index 380806e8fc..44c2279093 100644 --- a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/proxy/ProxyFacetSupport.java +++ b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/proxy/ProxyFacetSupport.java @@ -177,7 +177,7 @@ public ProxyRepositoryConfiguration getConfiguration() { protected void configureCooperation( final Cooperation2Factory cooperationFactory, @Nullable @Named("local") Cooperation2Factory defaultCooperationFactory, - @Named("${nexus.proxy.clustered.cooperation.enabled:-true}") final boolean proxyClusteredCooperationEnabled, + @Named("${nexus.proxy.clustered.cooperation.enabled:-false}") final boolean proxyClusteredCooperationEnabled, @Named(DATASTORE_CLUSTERED_ENABLED_NAMED) final boolean clustered, @Named("${nexus.proxy.cooperation.enabled:-true}") final boolean cooperationEnabled, @Named("${nexus.proxy.cooperation.majorTimeout:-0s}") final Duration majorTimeout, diff --git a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/rest/api/model/CargoAttributes.java b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/rest/api/model/CargoAttributes.java new file mode 100644 index 0000000000..35db29d3ec --- /dev/null +++ b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/rest/api/model/CargoAttributes.java @@ -0,0 +1,37 @@ +/* + * Sonatype Nexus (TM) Open Source Version + * Copyright (c) 2008-present Sonatype, Inc. + * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. + * + * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, + * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks + * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the + * Eclipse Foundation. All other trademarks are the property of their respective owners. + */ +package org.sonatype.nexus.repository.rest.api.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; + +public class CargoAttributes +{ + public static final String REQUIRE_AUTHENTICATION = "requireAuthentication"; + + @ApiModelProperty(value = "Indicates if this repository requires authentication overriding anonymous access.", + example = "false") + protected final Boolean requireAuthentication; + + @JsonCreator + public CargoAttributes( + @JsonProperty(REQUIRE_AUTHENTICATION) final Boolean requireAuthentication) + { + this.requireAuthentication = requireAuthentication; + } + + public Boolean getRequireAuthentication() { + return requireAuthentication; + } +} diff --git a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtils.java b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtils.java index 3561c9d603..0e7b0ea778 100644 --- a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtils.java +++ b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtils.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -27,7 +28,6 @@ import org.sonatype.goodies.common.ComponentSupport; import org.sonatype.nexus.repository.Repository; -import org.sonatype.nexus.repository.rest.SearchMapping; import org.sonatype.nexus.repository.rest.SearchMappings; import org.sonatype.nexus.repository.rest.api.RepositoryManagerRESTAdapter; import org.sonatype.nexus.repository.search.BlankValueSearchQueryFilter; @@ -75,7 +75,7 @@ public class ElasticSearchUtils private final RepositoryManagerRESTAdapter repoAdapter; - private final Map searchParams; + private final Map searchParams = new HashMap<>(); private final Map assetSearchParams; @@ -88,16 +88,22 @@ public class ElasticSearchUtils private final ElasticSearchContribution blankValueElasticSearchContribution; @Inject - public ElasticSearchUtils(final RepositoryManagerRESTAdapter repoAdapter, - final Map searchMappings, - final Map searchContributions, - final Map filterAttributes) + public ElasticSearchUtils( + final RepositoryManagerRESTAdapter repoAdapter, + final Map searchMappings, + final Map searchContributions, + final Map filterAttributes) { this.repoAdapter = checkNotNull(repoAdapter); - this.searchParams = checkNotNull(searchMappings).entrySet().stream() + checkNotNull(searchMappings).entrySet() + .stream() .flatMap(e -> stream(e.getValue().get().spliterator(), true)) - .collect(toMap(SearchMapping::getAlias, SearchMapping::getAttribute)); - this.assetSearchParams = searchParams.entrySet().stream() + .forEach(mapping -> { + searchParams.put(mapping.getAlias(), mapping.getAttribute()); + searchParams.put(mapping.getAttribute(), mapping.getAttribute()); + }); + this.assetSearchParams = searchParams.entrySet() + .stream() .filter(e -> e.getValue().startsWith(ASSET_PREFIX)) .collect(toMap(Entry::getKey, Entry::getValue)); this.searchContributions = checkNotNull(searchContributions); @@ -124,14 +130,15 @@ public Repository getReadableRepository(final String repository) { * Constructs a query from the provided search filters using conjunction (AND) */ public QueryBuilder buildQuery(final Collection searchFilters) { - return buildQuery(searchFilters, true); + return buildQuery(convertFilters(searchFilters), true); } /** * @since 3.15 * @param searchFilters the filters for the query - * @param conjunction indicates the query should use conjunection (AND) rather than disjunction (OR) - * @return a {@link QueryBuilder} for the provided search filters, the query will be generated by the {@link ElasticSearchContribution}s + * @param conjunction indicates the query should use conjunection (AND) rather than disjunction (OR) + * @return a {@link QueryBuilder} for the provided search filters, the query will be generated by the + * {@link ElasticSearchContribution}s */ public QueryBuilder buildQuery(final Collection searchFilters, final boolean conjunction) { BoolQueryBuilder query = QueryBuilders.boolQuery(); @@ -143,7 +150,7 @@ public QueryBuilder buildQuery(final Collection searchFilters, fin ElasticSearchContribution elasticSearchContribution = searchContributions .getOrDefault(searchFilter.getProperty(), defaultElasticSearchContribution); elasticSearchContribution.contribute(contribute, searchFilter.getProperty(), searchFilter.getValue()); - }); + }); handleBlankValueFilters(contribute, searchFilters); @@ -158,8 +165,8 @@ private void handleBlankValueFilters( { searchFilters.stream() .filter(this::filter) - .forEach(filter -> - blankValueElasticSearchContribution.contribute(contribute, filter.getProperty(), filter.getValue())); + .forEach(filter -> blankValueElasticSearchContribution.contribute(contribute, filter.getProperty(), + filter.getValue())); } private boolean filter(final SearchFilter filter) { @@ -188,12 +195,23 @@ public QueryBuilder buildQuery(final UriInfo uriInfo, final List paramet } private Collection convertParameters(final UriInfo uriInfo, final List keys) { - return uriInfo.getQueryParameters().entrySet().stream() + return uriInfo.getQueryParameters() + .entrySet() + .stream() .filter(entry -> !keys.contains(entry.getKey())) .map(entry -> entry.getValue().stream().map(value -> { String key = searchParams.getOrDefault(entry.getKey(), entry.getKey()); return new SearchFilter(key, value); - }).collect(toSet())).flatMap(Collection::stream).collect(toSet()); + }).collect(toSet())) + .flatMap(Collection::stream) + .collect(toSet()); + } + + private Collection convertFilters(final Collection rawFilters) { + return rawFilters.stream().map(filter -> { + String key = searchParams.getOrDefault(filter.getProperty(), filter.getProperty()); + return new SearchFilter(key, filter.getValue()); + }).collect(toSet()); } @VisibleForTesting @@ -272,18 +290,18 @@ private SortOrder getValidSortOrder(final String direction, final SortOrder defa } public QueryBuilder buildQuery(final SearchRequest searchRequest) { - QueryBuilder queryBuilder = buildQuery(searchRequest.getSearchFilters(), searchRequest.isConjunction()); + QueryBuilder queryBuilder = + buildQuery(convertFilters(searchRequest.getSearchFilters()), searchRequest.isConjunction()); List sortBuilders = getSortBuilders( searchRequest.getSortField(), - searchRequest.getSortDirection() != null ? searchRequest.getSortDirection().name() : null - ); + searchRequest.getSortDirection() != null ? searchRequest.getSortDirection().name() : null); RepositoryQueryBuilder repositoryQueryBuilder = RepositoryQueryBuilder .repositoryQuery(queryBuilder) .sortBy(sortBuilders); - if(searchRequest.getRepositories() != null && !searchRequest.getRepositories().isEmpty()){ + if (searchRequest.getRepositories() != null && !searchRequest.getRepositories().isEmpty()) { repositoryQueryBuilder.inRepositories(searchRequest.getRepositories()); } diff --git a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/vulnerability/exceptions/ForbiddenException.java b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/vulnerability/exceptions/ForbiddenException.java new file mode 100644 index 0000000000..f316a256ee --- /dev/null +++ b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/vulnerability/exceptions/ForbiddenException.java @@ -0,0 +1,28 @@ +/* + * Sonatype Nexus (TM) Open Source Version + * Copyright (c) 2008-present Sonatype, Inc. + * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. + * + * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, + * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks + * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the + * Eclipse Foundation. All other trademarks are the property of their respective owners. + */ +package org.sonatype.nexus.repository.vulnerability.exceptions; + +/** + * Thrown when IQ Server return 403 error code. + * + * @since 3.26 + */ +public class ForbiddenException + extends RuntimeException +{ + private static final long serialVersionUID = -8491948572810933731L; + + public ForbiddenException(final String message) { + super(message); + } +} diff --git a/components/nexus-repository-services/src/test/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtilsTest.java b/components/nexus-repository-services/src/test/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtilsTest.java index df436bfb8d..a0d0abd24e 100644 --- a/components/nexus-repository-services/src/test/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtilsTest.java +++ b/components/nexus-repository-services/src/test/java/org/sonatype/nexus/repository/search/query/ElasticSearchUtilsTest.java @@ -75,9 +75,10 @@ public void setup() { Map searchMappings = ImmutableMap.of( "default", () -> ImmutableList.of( - new SearchMapping(SHA1_ALIAS, VALID_SHA1_ATTRIBUTE_NAME, "", SearchField.SHA1) - ) - ); + new SearchMapping(SHA1_ALIAS, VALID_SHA1_ATTRIBUTE_NAME, "", SearchField.SHA1)), + "testFormat", () -> ImmutableList.of( + new SearchMapping("format.custom", "attributes.format.custom", "", SearchField.FORMAT_FIELD_1), + new SearchMapping("format.test", "attributes.format.test", "", SearchField.FORMAT_FIELD_2))); Map searchContributions = new HashMap<>(); searchContributions.put(DefaultElasticSearchContribution.NAME, new DefaultElasticSearchContribution()); @@ -133,7 +134,7 @@ public void testGetSortBuilders_byGroup() throws Exception { } @Test - public void testGetSortBuilders_byGroupDescending() throws Exception{ + public void testGetSortBuilders_byGroupDescending() throws Exception { List sortBuilders = underTest.getSortBuilders("group", "desc"); assertThat(sortBuilders.size(), is(3)); assertSearchBuilder(sortBuilders.get(0), "group.case_insensitive", "desc"); @@ -160,7 +161,7 @@ public void testGetSortBuilders_byName() throws Exception { } @Test - public void testGetSortBuilders_byNameDescending() throws Exception{ + public void testGetSortBuilders_byNameDescending() throws Exception { List sortBuilders = underTest.getSortBuilders("name", "desc"); assertThat(sortBuilders.size(), is(3)); assertSearchBuilder(sortBuilders.get(0), "name.case_insensitive", "desc"); @@ -185,7 +186,7 @@ public void testGetSortBuilders_byRepository() throws Exception { } @Test - public void testGetSortBuilders_byRepositoryDescending() throws Exception{ + public void testGetSortBuilders_byRepositoryDescending() throws Exception { List sortBuilders = underTest.getSortBuilders("repository", "desc"); assertThat(sortBuilders.size(), is(1)); assertSearchBuilder(sortBuilders.get(0), "repository_name", "desc"); @@ -206,7 +207,7 @@ public void testGetSortBuilders_byRepositoryName() throws Exception { } @Test - public void testGetSortBuilders_byRepositoryNameDescending() throws Exception{ + public void testGetSortBuilders_byRepositoryNameDescending() throws Exception { List sortBuilders = underTest.getSortBuilders("repositoryName", "desc"); assertThat(sortBuilders.size(), is(1)); assertSearchBuilder(sortBuilders.get(0), "repository_name", "desc"); @@ -227,7 +228,7 @@ public void testGetSortBuilders_byVersion() throws Exception { } @Test - public void testGetSortBuilders_byVersionDescending() throws Exception{ + public void testGetSortBuilders_byVersionDescending() throws Exception { List sortBuilders = underTest.getSortBuilders("version", "desc"); assertThat(sortBuilders.size(), is(1)); assertSearchBuilder(sortBuilders.get(0), "normalized_version", "desc"); @@ -248,7 +249,7 @@ public void testGetSortBuilders_byOtherField() throws Exception { } @Test - public void testGetSortBuilders_byOtherFieldDescending() throws Exception{ + public void testGetSortBuilders_byOtherFieldDescending() throws Exception { List sortBuilders = underTest.getSortBuilders("otherfield", "desc"); assertThat(sortBuilders.size(), is(1)); assertSearchBuilder(sortBuilders.get(0), "otherfield", "desc"); @@ -264,7 +265,7 @@ public void constructSameQueryForSameFilters() { List forwards = newArrayList(a1, a2, b1, b2, c1); List backward = newArrayList(c1, b2, b1, a2, a1); - List mixed = newArrayList(a1, c1 ,b1, b2, a2); + List mixed = newArrayList(a1, c1, b1, b2, a2); String forwardQuery = underTest.buildQuery(forwards).toString(); String backwardQuery = underTest.buildQuery(backward).toString(); @@ -275,11 +276,17 @@ public void constructSameQueryForSameFilters() { } @Test - public void buildSearchRequestFromSearchFilters(){ + public void buildSearchRequestFromSearchFilters() { Collection searchFilters = new ArrayList<>(); searchFilters.add(new SearchFilter("keyword", "org.junit")); searchFilters.add(new SearchFilter("repository", "maven_central")); searchFilters.add(new SearchFilter("format", "maven")); + // alias should be mapped to full attribute name + searchFilters.add(new SearchFilter("format.custom", "testAlias")); + // attribute name should also be included in query + searchFilters.add(new SearchFilter("attributes.format.test", "testAttribute")); + // filters without mapping also included + searchFilters.add(new SearchFilter("new.prop", "aProp")); QueryBuilder queryBuilder = underTest.buildQuery(searchFilters); @@ -287,6 +294,18 @@ public void buildSearchRequestFromSearchFilters(){ " \"bool\" : {\n" + " \"must\" : [ {\n" + " \"query_string\" : {\n" + + " \"query\" : \"testAlias\",\n" + + " \"fields\" : [ \"attributes.format.custom\" ],\n" + + " \"lowercase_expanded_terms\" : false\n" + + " }\n" + + " }, {\n" + + " \"query_string\" : {\n" + + " \"query\" : \"testAttribute\",\n" + + " \"fields\" : [ \"attributes.format.test\" ],\n" + + " \"lowercase_expanded_terms\" : false\n" + + " }\n" + + " }, {\n" + + " \"query_string\" : {\n" + " \"query\" : \"maven\",\n" + " \"fields\" : [ \"format\" ],\n" + " \"lowercase_expanded_terms\" : false\n" + @@ -298,6 +317,12 @@ public void buildSearchRequestFromSearchFilters(){ " }\n" + " }, {\n" + " \"query_string\" : {\n" + + " \"query\" : \"aProp\",\n" + + " \"fields\" : [ \"new.prop\" ],\n" + + " \"lowercase_expanded_terms\" : false\n" + + " }\n" + + " }, {\n" + + " \"query_string\" : {\n" + " \"query\" : \"maven_central\",\n" + " \"fields\" : [ \"repository\" ],\n" + " \"lowercase_expanded_terms\" : false\n" + @@ -307,9 +332,13 @@ public void buildSearchRequestFromSearchFilters(){ "}")); } - private static void assertSearchBuilder(final SortBuilder sortBuilder, final String field, final String order) throws Exception { - //see https://github.com/elastic/elasticsearch/issues/20853 as to why i can't do something simple like -// assertThat(sortBuilder.toString(), is("somejson")); + private static void assertSearchBuilder( + final SortBuilder sortBuilder, + final String field, + final String order) throws Exception + { + // see https://github.com/elastic/elasticsearch/issues/20853 as to why i can't do something simple like + // assertThat(sortBuilder.toString(), is("somejson")); assertThat(fieldNameField.get(sortBuilder), is(field)); assertThat(orderField.get(sortBuilder).toString(), is(order)); diff --git a/components/nexus-repository-view/pom.xml b/components/nexus-repository-view/pom.xml index 55cf71bdf2..3cd1612451 100644 --- a/components/nexus-repository-view/pom.xml +++ b/components/nexus-repository-view/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-view diff --git a/components/nexus-rest-client/pom.xml b/components/nexus-rest-client/pom.xml index b150a69d89..b1025ca3a9 100644 --- a/components/nexus-rest-client/pom.xml +++ b/components/nexus-rest-client/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-rest-client diff --git a/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/RestClientConfiguration.java b/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/RestClientConfiguration.java index 4bc14c70a9..02b35bec25 100644 --- a/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/RestClientConfiguration.java +++ b/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/RestClientConfiguration.java @@ -41,9 +41,10 @@ public interface Customizer private final boolean useTrustStore; - private RestClientConfiguration(@Nullable final Supplier httpClient, - @Nullable final Customizer customizer, - final boolean useTrustStore) + private RestClientConfiguration( + @Nullable final Supplier httpClient, + @Nullable final Customizer customizer, + final boolean useTrustStore) { this.httpClient = httpClient; this.customizer = customizer; diff --git a/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/internal/RestClientFactoryImpl.java b/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/internal/RestClientFactoryImpl.java index 47e94facb5..9dc09c05e5 100644 --- a/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/internal/RestClientFactoryImpl.java +++ b/components/nexus-rest-client/src/main/java/org/sonatype/nexus/rest/client/internal/RestClientFactoryImpl.java @@ -52,8 +52,9 @@ public class RestClientFactoryImpl implements RestClientFactory { private final LoadingCache bridgeClassLoaderCache = - CacheBuilder.newBuilder().build(from( - (loader) -> new BridgeClassLoader(loader, ProxyBuilder.class.getClassLoader()))); + CacheBuilder.newBuilder() + .build(from( + (loader) -> new BridgeClassLoader(loader, ProxyBuilder.class.getClassLoader()))); private final Provider httpClient; @@ -69,7 +70,7 @@ public Client create(final RestClientConfiguration configuration) { try (TcclBlock tccl = TcclBlock.begin(ResteasyClientBuilder.class)) { HttpContext httpContext = new BasicHttpContext(); if (configuration.getUseTrustStore()) { - httpContext.setAttribute(SSLContextSelector.USE_TRUST_STORE, true); + httpContext.setAttribute(SSLContextSelector.USE_TRUST_STORE, true); } HttpClient client; if (configuration.getHttpClient() != null) { diff --git a/components/nexus-rest-jackson2/pom.xml b/components/nexus-rest-jackson2/pom.xml index b4961015d3..2c0980abc2 100644 --- a/components/nexus-rest-jackson2/pom.xml +++ b/components/nexus-rest-jackson2/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-rest-jackson2 diff --git a/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/ObjectMapperResolver.java b/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/ObjectMapperResolver.java index 5dfa920b56..465a078fde 100644 --- a/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/ObjectMapperResolver.java +++ b/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/ObjectMapperResolver.java @@ -40,8 +40,8 @@ @Provider @Produces(MediaType.APPLICATION_JSON) public class ObjectMapperResolver - extends ComponentSupport - implements ContextResolver, Component + extends ComponentSupport + implements ContextResolver, Component { private final javax.inject.Provider mapperProvider; diff --git a/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/package-info.java b/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/package-info.java index 2d2769c5b1..7abb871261 100644 --- a/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/package-info.java +++ b/components/nexus-rest-jackson2/src/main/java/org/sonatype/nexus/rest/jackson2/internal/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.rest.jackson2.internal; \ No newline at end of file +package org.sonatype.nexus.rest.jackson2.internal; diff --git a/components/nexus-rest/pom.xml b/components/nexus-rest/pom.xml index b3549678be..f4fe18e39a 100644 --- a/components/nexus-rest/pom.xml +++ b/components/nexus-rest/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-rest diff --git a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ApiDocConstants.java b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ApiDocConstants.java index a2c803f9e2..0a3e09a709 100644 --- a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ApiDocConstants.java +++ b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ApiDocConstants.java @@ -52,7 +52,8 @@ private ApiDocConstants() { public static final String BLOBSTORE_NOT_FOUND = "Blob store not found"; - public static final String BLOBSTORE_CHANGE_NOT_ALLOWED = "You cannot change a repository’s blob store through the API"; + public static final String BLOBSTORE_CHANGE_NOT_ALLOWED = + "You cannot change a repository’s blob store through the API"; public static final String BAD_REQUEST = "Bad request"; diff --git a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ExceptionMapperSupport.java b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ExceptionMapperSupport.java index 796a61f5d2..e0c35d7691 100644 --- a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ExceptionMapperSupport.java +++ b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ExceptionMapperSupport.java @@ -69,8 +69,7 @@ public Response toResponse(final E exception) { response.getStatus(), entity == null ? "(no entity/body)" : String.format("'%s'", entity), exception, - log.isDebugEnabled() ? exception : null - ); + log.isDebugEnabled() ? exception : null); return response; } @@ -83,7 +82,7 @@ private static String generateFaultId() { * Convert the given exception into a response. * * @param exception The exception to convert. - * @param id The unique identifier generated for this fault. + * @param id The unique identifier generated for this fault. */ protected abstract Response convert(final E exception, final String id); diff --git a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/MediaTypes.java b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/MediaTypes.java index 3d23258390..44c92a0a27 100644 --- a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/MediaTypes.java +++ b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/MediaTypes.java @@ -29,11 +29,13 @@ private MediaTypes() { public static final String VND_VALIDATION_ERRORS_V1_XML = "application/vnd.siesta-validation-errors-v1+xml"; - public static final MediaType VND_VALIDATION_ERRORS_V1_XML_TYPE = new MediaType("application", "vnd.siesta-validation-errors-v1+xml"); + public static final MediaType VND_VALIDATION_ERRORS_V1_XML_TYPE = + new MediaType("application", "vnd.siesta-validation-errors-v1+xml"); // application/vnd.siesta-validation-errors-v1+json public static final String VND_VALIDATION_ERRORS_V1_JSON = "application/vnd.siesta-validation-errors-v1+json"; - public static final MediaType VND_VALIDATION_ERRORS_V1_JSON_TYPE = new MediaType("application", "vnd.siesta-validation-errors-v1+json"); + public static final MediaType VND_VALIDATION_ERRORS_V1_JSON_TYPE = + new MediaType("application", "vnd.siesta-validation-errors-v1+json"); } diff --git a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/NotCacheable.java b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/NotCacheable.java index 066f04dd3b..ebb2b1d1cd 100644 --- a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/NotCacheable.java +++ b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/NotCacheable.java @@ -27,7 +27,7 @@ */ @NameBinding @Retention(RUNTIME) -@Target({ TYPE, METHOD }) +@Target({TYPE, METHOD}) public @interface NotCacheable { } diff --git a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ValidationErrorXO.java b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ValidationErrorXO.java index 5f2995a4a4..5d3768689d 100644 --- a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ValidationErrorXO.java +++ b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/ValidationErrorXO.java @@ -62,7 +62,7 @@ public ValidationErrorXO(final String message) { /** * Creates a validation error for a specific value. * - * @param id identifier of value failing validation. + * @param id identifier of value failing validation. * @param message validation description */ public ValidationErrorXO(final String id, final String message) { @@ -71,7 +71,7 @@ public ValidationErrorXO(final String id, final String message) { } /** - * @return identifier of value failing validation (never null). A value of "*" denotes that validation does + * @return identifier of value failing validation (never null). A value of "*" denotes that validation does * not applies to a specific value. */ public String getId() { @@ -124,4 +124,4 @@ public String toString() { ", message='" + message + '\'' + '}'; } -} \ No newline at end of file +} diff --git a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/WebApplicationMessageException.java b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/WebApplicationMessageException.java index b5f7b4e0b9..9281723d56 100644 --- a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/WebApplicationMessageException.java +++ b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/WebApplicationMessageException.java @@ -35,12 +35,14 @@ public WebApplicationMessageException(final Status status, final String message) public WebApplicationMessageException(final Status status, final Object message, final String mediaType) { super(Response.status(checkNotNull(status)) .entity(new GenericEntity<>(new ValidationErrorXO(checkNotNull(message).toString()), ValidationErrorXO.class)) - .type(mediaType).build()); + .type(mediaType) + .build()); } public WebApplicationMessageException(int status, final Object message, final String mediaType) { super(Response.status(status) - .entity(new GenericEntity<>(new ValidationErrorXO(checkNotNull(message).toString()), ValidationErrorXO.class)) - .type(mediaType).build()); + .entity(new GenericEntity<>(new ValidationErrorXO(checkNotNull(message).toString()), ValidationErrorXO.class)) + .type(mediaType) + .build()); } } diff --git a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/package-info.java b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/package-info.java index fcad0acaea..1c39f667a3 100644 --- a/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/package-info.java +++ b/components/nexus-rest/src/main/java/org/sonatype/nexus/rest/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.rest; \ No newline at end of file +package org.sonatype.nexus.rest; diff --git a/components/nexus-rest/src/test/java/org/sonatype/nexus/rest/WebApplicationMessageExceptionTest.java b/components/nexus-rest/src/test/java/org/sonatype/nexus/rest/WebApplicationMessageExceptionTest.java index 711f6be8d9..a2468221f2 100644 --- a/components/nexus-rest/src/test/java/org/sonatype/nexus/rest/WebApplicationMessageExceptionTest.java +++ b/components/nexus-rest/src/test/java/org/sonatype/nexus/rest/WebApplicationMessageExceptionTest.java @@ -19,43 +19,46 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -public class WebApplicationMessageExceptionTest extends TestCase { - - /** - * Method under test: {@link WebApplicationMessageException#WebApplicationMessageException(Response.Status, Object, String)} - */ - @Test - public void testConstructor() { - WebApplicationMessageException exception = new WebApplicationMessageException( - Response.Status.BAD_REQUEST, "Message", MediaType.APPLICATION_JSON); - Response response = exception.getResponse(); - - assertEquals(400, response.getStatus()); - - Object entity = response.getEntity(); - - assertTrue(entity instanceof ValidationErrorXO); - assertEquals("Message", ((ValidationErrorXO) entity).getMessage()); - assertEquals(ValidationErrorXO.GENERIC, ((ValidationErrorXO) entity).getId()); - assertEquals(ImmutableList.of(MediaType.APPLICATION_JSON), response.getHeaders().get("Content-Type")); - } - - /** - * Method under test: {@link WebApplicationMessageException#WebApplicationMessageException(Response.Status, String)} - */ - @Test - public void testConstructorNoMediaType() { - WebApplicationMessageException exception = new WebApplicationMessageException( - Response.Status.NOT_FOUND, "Message"); - Response response = exception.getResponse(); - - assertEquals(404, response.getStatus()); - - Object entity = response.getEntity(); - - assertTrue(entity instanceof ValidationErrorXO); - assertEquals("Message", ((ValidationErrorXO) entity).getMessage()); - assertEquals(ValidationErrorXO.GENERIC, ((ValidationErrorXO) entity).getId()); - assertEquals(ImmutableList.of(MediaType.TEXT_PLAIN), response.getHeaders().get("Content-Type")); - } +public class WebApplicationMessageExceptionTest + extends TestCase +{ + + /** + * Method under test: + * {@link WebApplicationMessageException#WebApplicationMessageException(Response.Status, Object, String)} + */ + @Test + public void testConstructor() { + WebApplicationMessageException exception = new WebApplicationMessageException( + Response.Status.BAD_REQUEST, "Message", MediaType.APPLICATION_JSON); + Response response = exception.getResponse(); + + assertEquals(400, response.getStatus()); + + Object entity = response.getEntity(); + + assertTrue(entity instanceof ValidationErrorXO); + assertEquals("Message", ((ValidationErrorXO) entity).getMessage()); + assertEquals(ValidationErrorXO.GENERIC, ((ValidationErrorXO) entity).getId()); + assertEquals(ImmutableList.of(MediaType.APPLICATION_JSON), response.getHeaders().get("Content-Type")); + } + + /** + * Method under test: {@link WebApplicationMessageException#WebApplicationMessageException(Response.Status, String)} + */ + @Test + public void testConstructorNoMediaType() { + WebApplicationMessageException exception = new WebApplicationMessageException( + Response.Status.NOT_FOUND, "Message"); + Response response = exception.getResponse(); + + assertEquals(404, response.getStatus()); + + Object entity = response.getEntity(); + + assertTrue(entity instanceof ValidationErrorXO); + assertEquals("Message", ((ValidationErrorXO) entity).getMessage()); + assertEquals(ValidationErrorXO.GENERIC, ((ValidationErrorXO) entity).getId()); + assertEquals(ImmutableList.of(MediaType.TEXT_PLAIN), response.getHeaders().get("Content-Type")); + } } diff --git a/components/nexus-scheduling/pom.xml b/components/nexus-scheduling/pom.xml index 446f48df27..02601a6ecd 100644 --- a/components/nexus-scheduling/pom.xml +++ b/components/nexus-scheduling/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-scheduling diff --git a/components/nexus-script/pom.xml b/components/nexus-script/pom.xml index 0d0cde351f..94123bcfc5 100644 --- a/components/nexus-script/pom.xml +++ b/components/nexus-script/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-script diff --git a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptCreatedEvent.java b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptCreatedEvent.java index 4a713be68e..ec92eb73b4 100644 --- a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptCreatedEvent.java +++ b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptCreatedEvent.java @@ -18,7 +18,7 @@ * @since 3.1 */ public class ScriptCreatedEvent - extends ScriptEvent + extends ScriptEvent { public ScriptCreatedEvent(final Script script) { super(script); diff --git a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptDeletedEvent.java b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptDeletedEvent.java index c0bb6d1d96..18884ea188 100644 --- a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptDeletedEvent.java +++ b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptDeletedEvent.java @@ -18,7 +18,7 @@ * @since 3.1 */ public class ScriptDeletedEvent - extends ScriptEvent + extends ScriptEvent { public ScriptDeletedEvent(final Script script) { super(script); diff --git a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptManager.java b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptManager.java index 76e2a9f942..e8b82014e3 100644 --- a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptManager.java +++ b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptManager.java @@ -21,7 +21,8 @@ * * @since 3.0 */ -public interface ScriptManager extends Lifecycle +public interface ScriptManager + extends Lifecycle { public static final String DEFAULT_TYPE = "groovy"; diff --git a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptRunEvent.java b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptRunEvent.java index b5d957d4ff..48e32ef159 100644 --- a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptRunEvent.java +++ b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptRunEvent.java @@ -24,4 +24,3 @@ public ScriptRunEvent(final Script script) { super(script); } } - diff --git a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptUpdatedEvent.java b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptUpdatedEvent.java index 040a07691b..b9c1a96d6e 100644 --- a/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptUpdatedEvent.java +++ b/components/nexus-script/src/main/java/org/sonatype/nexus/script/ScriptUpdatedEvent.java @@ -18,7 +18,7 @@ * @since 3.1 */ public class ScriptUpdatedEvent - extends ScriptEvent + extends ScriptEvent { public ScriptUpdatedEvent(final Script script) { super(script); diff --git a/components/nexus-security/pom.xml b/components/nexus-security/pom.xml index 80a1686760..072a402467 100644 --- a/components/nexus-security/pom.xml +++ b/components/nexus-security/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-security diff --git a/components/nexus-selector/pom.xml b/components/nexus-selector/pom.xml index 59c67cc519..3ac9866c48 100644 --- a/components/nexus-selector/pom.xml +++ b/components/nexus-selector/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-selector diff --git a/components/nexus-servlet/pom.xml b/components/nexus-servlet/pom.xml index a8fafe139d..6d72b33cb0 100644 --- a/components/nexus-servlet/pom.xml +++ b/components/nexus-servlet/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-servlet diff --git a/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/ServletHelper.java b/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/ServletHelper.java index 901e9e14f5..9c1c91873d 100644 --- a/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/ServletHelper.java +++ b/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/ServletHelper.java @@ -73,7 +73,7 @@ public static boolean isDebug(final HttpServletRequest request) { */ public static void addNoCacheResponseHeaders(final HttpServletResponse response) { response.setHeader(PRAGMA, "no-cache"); // HTTP/1.0 - //post-check/pre-check for IE + // post-check/pre-check for IE response.setHeader(CACHE_CONTROL, "no-cache, no-store, max-age=0, must-revalidate, post-check=0, pre-check=0"); // HTTP/1.1 response.setHeader(EXPIRES, "0"); // No caching on Proxies in between client and Nexus } diff --git a/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/package-info.java b/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/package-info.java index db3a5cf16e..bc1efe6594 100644 --- a/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/package-info.java +++ b/components/nexus-servlet/src/main/java/org/sonatype/nexus/servlet/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.servlet; \ No newline at end of file +package org.sonatype.nexus.servlet; diff --git a/components/nexus-servlet/src/test/java/org/sonatype/nexus/servlet/XFrameOptionsTest.java b/components/nexus-servlet/src/test/java/org/sonatype/nexus/servlet/XFrameOptionsTest.java index 7c5481abcc..dada2ba8dc 100644 --- a/components/nexus-servlet/src/test/java/org/sonatype/nexus/servlet/XFrameOptionsTest.java +++ b/components/nexus-servlet/src/test/java/org/sonatype/nexus/servlet/XFrameOptionsTest.java @@ -35,9 +35,10 @@ public class XFrameOptionsTest { @Parameters public static Collection data() { - return Arrays.asList(new Object[][] { { "/foo/", true, "DENY" }, { "/foo/", false, "SAMEORIGIN" }, - { "/swagger-ui/", true, "SAMEORIGIN" }, { "/COPYRIGHT.html", true, "SAMEORIGIN" }, - { "/OSS-LICENSE.html", true, "SAMEORIGIN" }, { "/PRO-LICENSE.html", true, "SAMEORIGIN" }, { "/static/healthcheck-tos.html", true, "SAMEORIGIN" } }); + return Arrays.asList(new Object[][]{{"/foo/", true, "DENY"}, {"/foo/", false, "SAMEORIGIN"}, + {"/swagger-ui/", true, "SAMEORIGIN"}, {"/COPYRIGHT.html", true, "SAMEORIGIN"}, + {"/OSS-LICENSE.html", true, "SAMEORIGIN"}, {"/PRO-LICENSE.html", true, "SAMEORIGIN"}, + {"/static/healthcheck-tos.html", true, "SAMEORIGIN"}}); } @Parameter diff --git a/components/nexus-siesta/pom.xml b/components/nexus-siesta/pom.xml index 9fd7acacc9..8beace7f53 100644 --- a/components/nexus-siesta/pom.xml +++ b/components/nexus-siesta/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-siesta diff --git a/components/nexus-ssl/pom.xml b/components/nexus-ssl/pom.xml index edc2d5230c..2d45aadb04 100644 --- a/components/nexus-ssl/pom.xml +++ b/components/nexus-ssl/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-ssl diff --git a/components/nexus-supportzip-api/pom.xml b/components/nexus-supportzip-api/pom.xml index 048bfdce1e..8f9c14afdf 100644 --- a/components/nexus-supportzip-api/pom.xml +++ b/components/nexus-supportzip-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-supportzip-api diff --git a/components/nexus-swagger/pom.xml b/components/nexus-swagger/pom.xml index c18dcfad12..7db9d98e83 100644 --- a/components/nexus-swagger/pom.xml +++ b/components/nexus-swagger/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-swagger diff --git a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/ParameterContributor.java b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/ParameterContributor.java index b2b5f0e71e..caa859228a 100644 --- a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/ParameterContributor.java +++ b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/ParameterContributor.java @@ -52,9 +52,10 @@ public abstract class ParameterContributor httpMethods, - final Collection paths, - final Collection params) + public ParameterContributor( + final Collection httpMethods, + final Collection paths, + final Collection params) { this.httpMethods = checkNotNull(httpMethods); this.paths = checkNotNull(paths); @@ -80,10 +81,11 @@ public void contribute(final Swagger swagger) { allContributed = contributed.entrySet().stream().allMatch(Entry::getValue); } - private boolean contributeGetParameters(final Swagger swagger, - final HttpMethod httpMethod, - final String path, - final Collection parameters) + private boolean contributeGetParameters( + final Swagger swagger, + final HttpMethod httpMethod, + final String path, + final Collection parameters) { boolean contrib = false; Optional operation = getOperation(swagger, httpMethod, path); @@ -104,7 +106,8 @@ private boolean contributeGetParameters(final Swagger swagger, private Optional getOperation(final Swagger swagger, final HttpMethod httpMethod, final String path) { return Optional.ofNullable(swagger.getPaths()) .orElseGet(Collections::emptyMap) - .entrySet().stream() + .entrySet() + .stream() .filter(e -> path.equals(e.getKey())) .findFirst() .map(Entry::getValue) diff --git a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/SwaggerContributor.java b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/SwaggerContributor.java index 4e6d00329b..86a453a206 100644 --- a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/SwaggerContributor.java +++ b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/SwaggerContributor.java @@ -23,6 +23,7 @@ public interface SwaggerContributor { /** * Call after JAX-RS resource has been scanned. + * * @param swagger the swagger definition */ void contribute(Swagger swagger); diff --git a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/ApiListingResource.java b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/ApiListingResource.java index ac92f25fd4..79bcd97f79 100644 --- a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/ApiListingResource.java +++ b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/ApiListingResource.java @@ -48,11 +48,12 @@ public ApiListingResource(final SwaggerModel swaggerModel) { // NOSONAR } @Override - protected Swagger process(final Application app, - final ServletContext servletContext, - final ServletConfig servletConfig, - final HttpHeaders httpHeaders, - final UriInfo uriInfo) + protected Swagger process( + final Application app, + final ServletContext servletContext, + final ServletConfig servletConfig, + final HttpHeaders httpHeaders, + final UriInfo uriInfo) { // update cached model to use base path calculated from incoming request return swaggerModel.getSwagger().basePath(uriInfo.getBaseUri().getPath()); diff --git a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/SwaggerModel.java b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/SwaggerModel.java index 46f3a487f3..91059beb85 100644 --- a/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/SwaggerModel.java +++ b/components/nexus-swagger/src/main/java/org/sonatype/nexus/swagger/internal/SwaggerModel.java @@ -56,8 +56,9 @@ public class SwaggerModel private final List contributors; @Inject - public SwaggerModel(final ApplicationVersion applicationVersion, - final List contributors) + public SwaggerModel( + final ApplicationVersion applicationVersion, + final List contributors) { this.applicationVersion = checkNotNull(applicationVersion); this.contributors = checkNotNull(contributors); @@ -91,9 +92,10 @@ private static class ModelFilter ); @Override - public Model resolve(final Type type, - final ModelConverterContext context, - final Iterator chain) + public Model resolve( + final Type type, + final ModelConverterContext context, + final Iterator chain) { if (!BANNED_TYPE_NAMES.contains(type.getTypeName()) && chain.hasNext()) { return chain.next().resolve(type, context, chain); @@ -102,10 +104,11 @@ public Model resolve(final Type type, } @Override - public Property resolveProperty(final Type type, - final ModelConverterContext context, - final Annotation[] annotations, - final Iterator chain) + public Property resolveProperty( + final Type type, + final ModelConverterContext context, + final Annotation[] annotations, + final Iterator chain) { if (!BANNED_TYPE_NAMES.contains(type.getTypeName()) && chain.hasNext()) { return chain.next().resolveProperty(type, context, annotations, chain); diff --git a/components/nexus-swagger/src/test/java/org/sonatype/nexus/swagger/ParameterContributorTest.java b/components/nexus-swagger/src/test/java/org/sonatype/nexus/swagger/ParameterContributorTest.java index b02e4e6bc2..939dc0ebdc 100644 --- a/components/nexus-swagger/src/test/java/org/sonatype/nexus/swagger/ParameterContributorTest.java +++ b/components/nexus-swagger/src/test/java/org/sonatype/nexus/swagger/ParameterContributorTest.java @@ -106,16 +106,16 @@ private void assertContributedMap(final boolean result) { hasEntry("GET-" + TEST_PATH_1, result), hasEntry("POST-" + TEST_PATH_1, result), hasEntry("GET-" + TEST_PATH_2, result), - hasEntry("POST-" + TEST_PATH_2, result) - )); + hasEntry("POST-" + TEST_PATH_2, result))); } private class TestParameterContributor extends ParameterContributor { - TestParameterContributor(final Collection httpMethods, - final Collection paths, - final Collection params) + TestParameterContributor( + final Collection httpMethods, + final Collection paths, + final Collection params) { super(httpMethods, paths, params); } diff --git a/components/nexus-task-logging/pom.xml b/components/nexus-task-logging/pom.xml index 4e82795049..8745be6cea 100644 --- a/components/nexus-task-logging/pom.xml +++ b/components/nexus-task-logging/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-task-logging diff --git a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressLogIntervalHelper.java b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressLogIntervalHelper.java index 1ed235f9e9..a4c6c20426 100644 --- a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressLogIntervalHelper.java +++ b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressLogIntervalHelper.java @@ -24,7 +24,7 @@ * Helper for logging progress messages, one per defined interval. */ public class ProgressLogIntervalHelper - implements AutoCloseable + implements AutoCloseable { private final Stopwatch elapsed; diff --git a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressTaskLogger.java b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressTaskLogger.java index 9d233b7dc1..3c2b764318 100644 --- a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressTaskLogger.java +++ b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ProgressTaskLogger.java @@ -64,10 +64,11 @@ public class ProgressTaskLogger this(log, INTERVAL_MINUTES, INTERVAL_MINUTES, MINUTES); } - ProgressTaskLogger(final Logger log, - final long initialDelay, - final long progressInterval, - final TimeUnit timeUnit) + ProgressTaskLogger( + final Logger log, + final long initialDelay, + final long progressInterval, + final TimeUnit timeUnit) { this.log = checkNotNull(log); this.initialDelay = initialDelay; diff --git a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ReplicationTaskLogger.java b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ReplicationTaskLogger.java index 6075109b28..3364549ed0 100644 --- a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ReplicationTaskLogger.java +++ b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/ReplicationTaskLogger.java @@ -45,7 +45,7 @@ public class ReplicationTaskLogger } private void logReplicationRunInfo() { - //show task details on replication log + // show task details on replication log log.info(TASK_LOG_ONLY, "Replication run info:"); log.info(TASK_LOG_ONLY, " Task ID: {}", taskLogInfo.getId()); log.info(TASK_LOG_ONLY, " Type: {}", taskLogInfo.getTypeId()); diff --git a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLogHome.java b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLogHome.java index 4d5d5c07bd..51d4659d82 100644 --- a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLogHome.java +++ b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLogHome.java @@ -36,7 +36,9 @@ public class TaskLogHome { private static final Logger log = LoggerFactory.getLogger(TaskLogHome.class); - private TaskLogHome() { throw new IllegalAccessError("Utility class"); } + private TaskLogHome() { + throw new IllegalAccessError("Utility class"); + } /** * Get the home (absolute path) of the task logs on disk diff --git a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLoggerFactory.java b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLoggerFactory.java index 880784b250..b2fb9d3597 100644 --- a/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLoggerFactory.java +++ b/components/nexus-task-logging/src/main/java/org/sonatype/nexus/logging/task/TaskLoggerFactory.java @@ -50,5 +50,7 @@ public static TaskLogger create(final Object taskObject, final Logger log, final } @TaskLogging(BOTH) - private static final class TaskLoggingDefault { } + private static final class TaskLoggingDefault + { + } } diff --git a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ProgressTaskLoggerMDCTest.java b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ProgressTaskLoggerMDCTest.java index c36211082b..ee8ca6519b 100644 --- a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ProgressTaskLoggerMDCTest.java +++ b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ProgressTaskLoggerMDCTest.java @@ -47,7 +47,8 @@ public void testMDCCopy() throws InterruptedException { // since we are testing with threads, we need to track that the inner thread ran through AtomicBoolean tested = new AtomicBoolean(false); - // create progress task logger with 1ms start delay (i.e. start immediately). Interval is not relevant for this test. + // create progress task logger with 1ms start delay (i.e. start immediately). Interval is not relevant for this + // test. ProgressTaskLogger progressTaskLogger = new ProgressTaskLogger(mockLogger, 1, 60000, TimeUnit.MILLISECONDS) { void logProgress() { diff --git a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ReplicationTaskLoggerTest.java b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ReplicationTaskLoggerTest.java index f55fa42a53..77725e8b90 100644 --- a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ReplicationTaskLoggerTest.java +++ b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/ReplicationTaskLoggerTest.java @@ -61,18 +61,18 @@ public void testPrintTaskDetails() { mockingTaskLogsHome(() -> { underTest.start(); - //details of run on replication log + // details of run on replication log verifyLogInfoCalled(TASK_LOG_ONLY, "Replication run info:"); verifyLogInfoCalled(TASK_LOG_ONLY, " Task ID: {}", taskLogInfo.getId()); verifyLogInfoCalled(TASK_LOG_ONLY, " Type: {}", taskLogInfo.getTypeId()); verifyLogInfoCalled(TASK_LOG_ONLY, " Name: {}", taskLogInfo.getName()); verifyLogInfoCalled(TASK_LOG_ONLY, " Description: {}", taskLogInfo.getMessage()); - //verify info log was printed on nexus log + // verify info log was printed on nexus log verify(mockLogger).info(NEXUS_LOG_ONLY, REPLICATION_LOG_LOCATION_PREFIX, "repositoryName", testPath + "/replication-repositoryName.log"); - //verify MDC has discriminator + // verify MDC has discriminator assertThat(MDC.get(REPLICATION_DISCRIMINATOR_ID), notNullValue()); assertThat(MDC.get(REPLICATION_DISCRIMINATOR_ID), is("repositoryName")); }); diff --git a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLogHomeTest.java b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLogHomeTest.java index 4f77a8a702..4541423134 100644 --- a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLogHomeTest.java +++ b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLogHomeTest.java @@ -51,7 +51,6 @@ public void getReplicationLogsHome() { assertFalse("temp file was not deleted", Files.exists(file)); } - /** * Tests that the task log appender is active after starting a task logger and using a temp appender to determine * the log path via {@link TaskLogHome#getTaskLogsHome()} @@ -91,7 +90,8 @@ public void testAppenderActiveAfterGetTaskLogHome() throws Exception { } private TaskLogInfo createTaskInfo(final String typeId) { - return new TaskLogInfo() { + return new TaskLogInfo() + { @Override public String getId() { return "id"; diff --git a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLoggerFactoryTest.java b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLoggerFactoryTest.java index 5065f743b1..87398bdc4d 100644 --- a/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLoggerFactoryTest.java +++ b/components/nexus-task-logging/src/test/java/org/sonatype/nexus/logging/task/TaskLoggerFactoryTest.java @@ -43,12 +43,15 @@ public void testTaskLogOnly() { @Test public void testReplicationLogging() { - TaskLogger taskLogger = TaskLoggerFactory.create(new ReplicationLogging(), mock(Logger.class), mock(TaskLogInfo.class)); + TaskLogger taskLogger = + TaskLoggerFactory.create(new ReplicationLogging(), mock(Logger.class), mock(TaskLogInfo.class)); assertThat(taskLogger, instanceOf(ReplicationTaskLogger.class)); } + @Test public void testTaskLogWithProgress() { - TaskLogger taskLogger = TaskLoggerFactory.create(new TaskLogWithProgress(), mock(Logger.class), mock(TaskLogInfo.class)); + TaskLogger taskLogger = + TaskLoggerFactory.create(new TaskLogWithProgress(), mock(Logger.class), mock(TaskLogInfo.class)); assertThat(taskLogger, instanceOf(TaskLogWithProgressLogger.class)); } @@ -65,17 +68,27 @@ public void testDefault() { } @TaskLogging(BOTH) - private static final class Both { } + private static final class Both + { + } @TaskLogging(TASK_LOG_ONLY) - private static final class TaskLogOnly { } + private static final class TaskLogOnly + { + } @TaskLogging(REPLICATION_LOGGING) - private static final class ReplicationLogging { } + private static final class ReplicationLogging + { + } @TaskLogging(TASK_LOG_ONLY_WITH_PROGRESS) - private static final class TaskLogWithProgress { } + private static final class TaskLogWithProgress + { + } @TaskLogging(NEXUS_LOG_ONLY) - private static final class NexusLogOnly { } + private static final class NexusLogOnly + { + } } diff --git a/components/nexus-test-common/pom.xml b/components/nexus-test-common/pom.xml index 126591afb5..8c49bb9297 100644 --- a/components/nexus-test-common/pom.xml +++ b/components/nexus-test-common/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-test-common diff --git a/components/nexus-test-common/src/main/java/org/sonatype/nexus/testcommon/matchers/NexusMatchers.java b/components/nexus-test-common/src/main/java/org/sonatype/nexus/testcommon/matchers/NexusMatchers.java index 98172fc115..7ca0e64021 100644 --- a/components/nexus-test-common/src/main/java/org/sonatype/nexus/testcommon/matchers/NexusMatchers.java +++ b/components/nexus-test-common/src/main/java/org/sonatype/nexus/testcommon/matchers/NexusMatchers.java @@ -73,7 +73,8 @@ public static Matcher> streamContains(final E... items) { List actual = new ArrayList<>(); Matcher> iterableMatcher = contains(items); - return new TypeSafeDiagnosingMatcher>(Stream.class) { + return new TypeSafeDiagnosingMatcher>(Stream.class) + { @Override public void describeTo(final Description description) { @@ -87,6 +88,7 @@ protected boolean matchesSafely(final Stream item, final Description mismatch } return iterableMatcher.matches(actual); - }}; + } + }; } } diff --git a/components/nexus-test-db/pom.xml b/components/nexus-test-db/pom.xml index db0ef169d0..ef53cdb429 100644 --- a/components/nexus-test-db/pom.xml +++ b/components/nexus-test-db/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-test-db diff --git a/components/nexus-test-db/src/main/java/org/sonatype/nexus/testdb/DataSessionRule.java b/components/nexus-test-db/src/main/java/org/sonatype/nexus/testdb/DataSessionRule.java index 514b8f5b7e..3a413cf95b 100644 --- a/components/nexus-test-db/src/main/java/org/sonatype/nexus/testdb/DataSessionRule.java +++ b/components/nexus-test-db/src/main/java/org/sonatype/nexus/testdb/DataSessionRule.java @@ -241,7 +241,7 @@ protected void after() { } protected String startPostgres() { - //11.9 is the minimum support version + // 11.9 is the minimum support version postgres = new PostgreSQLContainer<>(DockerImageName.parse("docker-all.repo.sonatype.com/postgres:11.9") .asCompatibleSubstituteFor("postgres")); diff --git a/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/DataSessionRuleTest.java b/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/DataSessionRuleTest.java index 73700caac9..6c462af02e 100644 --- a/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/DataSessionRuleTest.java +++ b/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/DataSessionRuleTest.java @@ -54,7 +54,7 @@ public class DataSessionRuleTest /** * Intercepts MyBatis commits so we can arbitrarily fail them. */ - @Intercepts({ @Signature(type = Executor.class, method = "commit", args = { boolean.class }) }) + @Intercepts({@Signature(type = Executor.class, method = "commit", args = {boolean.class})}) static class CommitInterceptor implements Interceptor { diff --git a/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/template/SprocketDAO.java b/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/template/SprocketDAO.java index 1ef057a717..a513e7fc3f 100644 --- a/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/template/SprocketDAO.java +++ b/components/nexus-test-db/src/test/java/org/sonatype/nexus/testdb/example/template/SprocketDAO.java @@ -16,7 +16,7 @@ import org.sonatype.nexus.datastore.api.Expects; import org.sonatype.nexus.datastore.api.SchemaTemplate; -@Expects({ SpindleDAO.class, WidgetDAO.class }) +@Expects({SpindleDAO.class, WidgetDAO.class}) @SchemaTemplate("material") public interface SprocketDAO extends DataAccess diff --git a/components/nexus-testsupport/pom.xml b/components/nexus-testsupport/pom.xml index 7a42ed657f..21aaf83e94 100644 --- a/components/nexus-testsupport/pom.xml +++ b/components/nexus-testsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-testsupport diff --git a/components/nexus-testsupport/src/main/java/org/sonatype/nexus/content/testsuite/groups/SQLTestGroup.java b/components/nexus-testsupport/src/main/java/org/sonatype/nexus/content/testsuite/groups/SQLTestGroup.java index 6bc4b6f874..a67cec5770 100644 --- a/components/nexus-testsupport/src/main/java/org/sonatype/nexus/content/testsuite/groups/SQLTestGroup.java +++ b/components/nexus-testsupport/src/main/java/org/sonatype/nexus/content/testsuite/groups/SQLTestGroup.java @@ -13,7 +13,8 @@ package org.sonatype.nexus.content.testsuite.groups; /** - * Marker interface to categorize an integration test which should only work when running on a SQL based data store such as + * Marker interface to categorize an integration test which should only work when running on a SQL based data store such + * as * H2 or PostgreSQL. */ public interface SQLTestGroup diff --git a/components/nexus-testsupport/src/main/java/org/sonatype/nexus/test/util/Whitebox.java b/components/nexus-testsupport/src/main/java/org/sonatype/nexus/test/util/Whitebox.java index 2f2b1e4a0e..ec7267f8e0 100644 --- a/components/nexus-testsupport/src/main/java/org/sonatype/nexus/test/util/Whitebox.java +++ b/components/nexus-testsupport/src/main/java/org/sonatype/nexus/test/util/Whitebox.java @@ -28,7 +28,7 @@ public static void setInternalState(final Object object, final String fieldName, try { Class clazz = object.getClass(); Field field = getDeclaredField(clazz, fieldName) - .orElseGet(() -> getField(clazz, fieldName)); + .orElseGet(() -> getField(clazz, fieldName)); field.setAccessible(true); field.set(object, value); } diff --git a/components/nexus-thread/pom.xml b/components/nexus-thread/pom.xml index 4fdad9fb3a..54373ee2c5 100644 --- a/components/nexus-thread/pom.xml +++ b/components/nexus-thread/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-thread diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/DatabaseStatusDelayedExecutor.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/DatabaseStatusDelayedExecutor.java index 5a37f36d49..097fc54332 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/DatabaseStatusDelayedExecutor.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/DatabaseStatusDelayedExecutor.java @@ -68,11 +68,11 @@ public class DatabaseStatusDelayedExecutor private ExecutorService executor; @Inject - public DatabaseStatusDelayedExecutor(final FreezeService freezeService, - @Named("${nexus.delayedExecutor.threadPoolSize:-1}") - final int delayedExecutorThreadPoolSize, - @Named("${nexus.delayedExecutor.sleepIntervalMs:-5000}") final int sleepInterval, - @Named("${nexus.delayedExecutor.maxRetries:-8640}") final int maxRetries) + public DatabaseStatusDelayedExecutor( + final FreezeService freezeService, + @Named("${nexus.delayedExecutor.threadPoolSize:-1}") final int delayedExecutorThreadPoolSize, + @Named("${nexus.delayedExecutor.sleepIntervalMs:-5000}") final int sleepInterval, + @Named("${nexus.delayedExecutor.maxRetries:-8640}") final int maxRetries) { this.freezeService = checkNotNull(freezeService); checkArgument(delayedExecutorThreadPoolSize > 0, delayedExecutorThreadPoolSize); @@ -190,26 +190,28 @@ public List> invokeAll(final Collection> tas @Override @Guarded(by = STARTED) - public List> invokeAll(final Collection> tasks, - final long timeout, - final TimeUnit unit) - throws InterruptedException + public List> invokeAll( + final Collection> tasks, + final long timeout, + final TimeUnit unit) throws InterruptedException { return executor.invokeAll(wrapAll(tasks), timeout, unit); } @Override @Guarded(by = STARTED) - public T invokeAny(final Collection> tasks) - throws InterruptedException, ExecutionException + public T invokeAny( + final Collection> tasks) throws InterruptedException, ExecutionException { return executor.invokeAny(wrapAll(tasks)); } @Override @Guarded(by = STARTED) - public T invokeAny(final Collection> tasks, final long timeout, final TimeUnit unit) - throws InterruptedException, ExecutionException, TimeoutException + public T invokeAny( + final Collection> tasks, + final long timeout, + final TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return executor.invokeAny(wrapAll(tasks), timeout, unit); } diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/ExceptionAwareThreadFactory.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/ExceptionAwareThreadFactory.java index aa158f3767..04e8e7c4df 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/ExceptionAwareThreadFactory.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/ExceptionAwareThreadFactory.java @@ -15,7 +15,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ExceptionAwareThreadFactory extends NexusThreadFactory +public class ExceptionAwareThreadFactory + extends NexusThreadFactory { private static final Logger log = LoggerFactory.getLogger(ExceptionAwareThreadFactory.class); @@ -41,9 +42,8 @@ public ExceptionAwareThreadFactory( public Thread newThread(final Runnable r) { Thread tr = super.newThread(r); tr.setUncaughtExceptionHandler((t, e) -> { - log.error("Uncaught Exception occurred on thread: {}, Exception message: {}",t.getName(), e.getMessage()); + log.error("Uncaught Exception occurred on thread: {}, Exception message: {}", t.getName(), e.getMessage()); }); return tr; } } - diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusForkJoinWorkerThreadFactory.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusForkJoinWorkerThreadFactory.java index 02515af15f..7e9ebebae7 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusForkJoinWorkerThreadFactory.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusForkJoinWorkerThreadFactory.java @@ -20,9 +20,11 @@ /** * Nexus {@link ForkJoinWorkerThreadFactory}. + * * @since 3.20 */ -public class NexusForkJoinWorkerThreadFactory implements ForkJoinWorkerThreadFactory +public class NexusForkJoinWorkerThreadFactory + implements ForkJoinWorkerThreadFactory { private final String jobPrefix; diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusScheduledExecutorService.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusScheduledExecutorService.java index 80ce97aa38..7a6880d152 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusScheduledExecutorService.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusScheduledExecutorService.java @@ -26,7 +26,8 @@ import static com.google.common.base.Preconditions.checkNotNull; /** - * A modification of Shiro's {@link SubjectAwareScheduledExecutorService} that in turn returns always the same, supplied {@link + * A modification of Shiro's {@link SubjectAwareScheduledExecutorService} that in turn returns always the same, supplied + * {@link * Subject} to bind threads with. * * @since 3.31 diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusThreadFactory.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusThreadFactory.java index a4940842ff..9d7a8b9096 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusThreadFactory.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/NexusThreadFactory.java @@ -41,10 +41,11 @@ public NexusThreadFactory(final String poolId, final String threadGroupName, fin this(poolId, threadGroupName, threadPriority, false); } - public NexusThreadFactory(final String poolId, - final String threadGroupName, - final int threadPriority, - final boolean daemonThread) + public NexusThreadFactory( + final String poolId, + final String threadGroupName, + final int threadPriority, + final boolean daemonThread) { int poolNum = poolNumber.getAndIncrement(); this.schedulerThreadGroup = new ThreadGroup(threadGroupName + " #" + poolNum); diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/internal/MDCUtils.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/internal/MDCUtils.java index 2b34046649..55589074e2 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/internal/MDCUtils.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/internal/MDCUtils.java @@ -36,7 +36,7 @@ public static Map getCopyOfContextMap() { final boolean inheritable = MDC.get(CONTEXT_NON_INHERITABLE_KEY) == null; Map result = null; if (inheritable) { - //noinspection unchecked + // noinspection unchecked result = MDC.getCopyOfContextMap(); } if (result == null) { diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/io/StreamCopier.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/io/StreamCopier.java index fd202d909a..8141547e5e 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/io/StreamCopier.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/io/StreamCopier.java @@ -74,9 +74,10 @@ public StreamCopier(final Consumer write, final Function write, - final Function read, - final ExecutorService service) + public StreamCopier( + final Consumer write, + final Function read, + final ExecutorService service) { this.write = checkNotNull(write); this.read = checkNotNull(read); @@ -101,8 +102,7 @@ public T read() { * @param timeoutMilliseconds - the maximum time to wait * @see #read() */ - public T read(final long timeoutMilliseconds) - { + public T read(final long timeoutMilliseconds) { try { return service.submit(() -> { diff --git a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/package-info.java b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/package-info.java index b8711ab77f..9c60080ac4 100644 --- a/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/package-info.java +++ b/components/nexus-thread/src/main/java/org/sonatype/nexus/thread/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.thread; \ No newline at end of file +package org.sonatype.nexus.thread; diff --git a/components/nexus-transaction/pom.xml b/components/nexus-transaction/pom.xml index a18d60d577..75ae41fa46 100644 --- a/components/nexus-transaction/pom.xml +++ b/components/nexus-transaction/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-transaction diff --git a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Operations.java b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Operations.java index 946f27724a..dc0585632a 100644 --- a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Operations.java +++ b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Operations.java @@ -190,9 +190,10 @@ protected Operations() { /** * Custom settings. */ - protected Operations(final Transactional spec, - @Nullable final Class throwing, - @Nullable final TransactionalStore store) + protected Operations( + final Transactional spec, + @Nullable final Class throwing, + @Nullable final TransactionalStore store) { this.spec = checkNotNull(spec); this.throwing = throwing; @@ -202,9 +203,10 @@ protected Operations(final Transactional spec, /** * Copies the given settings into a new fluent step. */ - protected Operations copy(final Transactional spec, - @Nullable final Class throwing, - @Nullable final TransactionalStore store) + protected Operations copy( + final Transactional spec, + @Nullable final Class throwing, + @Nullable final TransactionalStore store) { return new Operations<>(spec, throwing, store); } diff --git a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/RollingStats.java b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/RollingStats.java index c228ff7e15..9bae57fc99 100644 --- a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/RollingStats.java +++ b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/RollingStats.java @@ -78,7 +78,8 @@ private void maybeShiftWindow() { if (tick < newTick) { synchronized (this) { if (tick < newTick) { - // move round circular window: any elements after the last tick, up to and including current tick, is now stale + // move round circular window: any elements after the last tick, up to and including current tick, is now + // stale rangeClosed(tick + 1, newTick).limit(buckets.length()).mapToInt(this::index).forEach(i -> buckets.set(i, 0)); tick = newTick; } diff --git a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Transactional.java b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Transactional.java index 3caf3f3dc1..9257a1f479 100644 --- a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Transactional.java +++ b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/Transactional.java @@ -26,7 +26,7 @@ * @since 3.0 */ @Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE }) +@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE}) public @interface Transactional { String DEFAULT_REASON = "transaction"; diff --git a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalImpl.java b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalImpl.java index 2e871b7e09..2d0ec76891 100644 --- a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalImpl.java +++ b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalImpl.java @@ -20,7 +20,7 @@ * * @since 3.2 */ -@SuppressWarnings({ "rawtypes", "unchecked" }) +@SuppressWarnings({"rawtypes", "unchecked"}) final class TransactionalImpl implements Transactional { diff --git a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalStore.java b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalStore.java index 3e1d5e478c..1dcb91afec 100644 --- a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalStore.java +++ b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/TransactionalStore.java @@ -31,7 +31,7 @@ public interface TransactionalStore> * @param isolationLevel the isolation level to use for the transaction */ default S openSession(final TransactionIsolation isolationLevel) { - switch(isolationLevel) { + switch (isolationLevel) { case STANDARD: return openSession(); default: diff --git a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/package-info.java b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/package-info.java index 072158b515..0cc9f9c604 100644 --- a/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/package-info.java +++ b/components/nexus-transaction/src/main/java/org/sonatype/nexus/transaction/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.transaction; \ No newline at end of file +package org.sonatype.nexus.transaction; diff --git a/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/OperationsBuilderTest.java b/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/OperationsBuilderTest.java index 54c878a59a..1646beeb0b 100644 --- a/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/OperationsBuilderTest.java +++ b/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/OperationsBuilderTest.java @@ -43,17 +43,19 @@ private interface SampleAnnotations @Transactional(commitOn = IOException.class) void customCommitOn(); - @Transactional(retryOn = { InvocationTargetException.class, IllegalStateException.class }) + @Transactional(retryOn = {InvocationTargetException.class, IllegalStateException.class}) void customRetryOn(); - @Transactional(swallow = { RuntimeException.class, MalformedURLException.class }) + @Transactional(swallow = {RuntimeException.class, MalformedURLException.class}) void customSwallow(); - @Transactional(commitOn = IllegalStateException.class, retryOn = RuntimeException.class, swallow = IOException.class) + @Transactional(commitOn = IllegalStateException.class, retryOn = RuntimeException.class, + swallow = IOException.class) void customValues(); @Retention(RetentionPolicy.RUNTIME) - @Transactional(commitOn = IllegalStateException.class, retryOn = RuntimeException.class, swallow = IOException.class) + @Transactional(commitOn = IllegalStateException.class, retryOn = RuntimeException.class, + swallow = IOException.class) @interface Stereotype { // meta-annotated with @Transactional @@ -152,7 +154,9 @@ public void testBuilderAnnotionBehaviour() { sample("customSwallow")); assertBehaviour( - new Operations().commitOn(IllegalStateException.class).retryOn(RuntimeException.class).swallow(IOException.class).spec, + new Operations().commitOn(IllegalStateException.class) + .retryOn(RuntimeException.class) + .swallow(IOException.class).spec, sample("customValues")); assertBehaviour( diff --git a/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/RetryControllerTest.java b/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/RetryControllerTest.java index e23b25f090..a26fef9eb0 100644 --- a/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/RetryControllerTest.java +++ b/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/RetryControllerTest.java @@ -275,10 +275,11 @@ public void testStatsUnaffectedByNoisyException() throws Exception { assertThat(underTest.excessiveRetriesInLastHour(), is(2L)); // bump } - private void verifyBackoff(final int retriesSoFar, - final Exception cause, - final long minBackoff, - final long maxBackoff) + private void verifyBackoff( + final int retriesSoFar, + final Exception cause, + final long minBackoff, + final long maxBackoff) { underTest.allowRetry(retriesSoFar, cause); diff --git a/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/TransactionSupportTest.java b/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/TransactionSupportTest.java index e2e4648e61..e35570b88b 100644 --- a/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/TransactionSupportTest.java +++ b/components/nexus-transaction/src/test/java/org/sonatype/nexus/transaction/TransactionSupportTest.java @@ -57,9 +57,9 @@ public void setUp() { doNothing().when(tx).doRollback(); when(spec.reason()).thenReturn(DEFAULT_REASON); - when(spec.commitOn()).thenReturn(new Class[] {}); - when(spec.retryOn()).thenReturn(new Class[] { UncheckedIOException.class }); - when(spec.swallow()).thenReturn(new Class[] {}); + when(spec.commitOn()).thenReturn(new Class[]{}); + when(spec.retryOn()).thenReturn(new Class[]{UncheckedIOException.class}); + when(spec.swallow()).thenReturn(new Class[]{}); txWrapper = new TransactionalWrapper(spec, aspect); } diff --git a/components/nexus-ui-plugin/pom.xml b/components/nexus-ui-plugin/pom.xml index 4c94955af5..34aab6dbe2 100644 --- a/components/nexus-ui-plugin/pom.xml +++ b/components/nexus-ui-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-ui-plugin diff --git a/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptor.java b/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptor.java index 72c60a772c..04d324f2d6 100644 --- a/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptor.java +++ b/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptor.java @@ -17,7 +17,7 @@ /** * Rapture UI plugin descriptor. * - * Using component priority to determine inclusion order. Ordering is important to properly load the UI. + * Using component priority to determine inclusion order. Ordering is important to properly load the UI. * * @since 3.20 */ diff --git a/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptorSupport.java b/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptorSupport.java index ae2a978a1f..9b70b4eea3 100644 --- a/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptorSupport.java +++ b/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiPluginDescriptorSupport.java @@ -25,8 +25,8 @@ * @since 3.20 */ public abstract class UiPluginDescriptorSupport - extends ComponentSupport - implements UiPluginDescriptor + extends ComponentSupport + implements UiPluginDescriptor { private final String name; diff --git a/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiUtil.java b/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiUtil.java index 7cd5c725e8..bce112d114 100644 --- a/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiUtil.java +++ b/components/nexus-ui-plugin/src/main/java/org/sonatype/nexus/ui/UiUtil.java @@ -28,10 +28,7 @@ public class UiUtil * @return the path to the requested file */ public static String getPathForFile(final String filename, final ClassSpace space) { - for ( - Enumeration e = space.findEntries("static", filename, true); - e.hasMoreElements(); - ) { + for (Enumeration e = space.findEntries("static", filename, true); e.hasMoreElements();) { URL url = e.nextElement(); return url.getPath(); } diff --git a/components/nexus-upgrade/pom.xml b/components/nexus-upgrade/pom.xml index 76df46ea31..73122bc2ec 100644 --- a/components/nexus-upgrade/pom.xml +++ b/components/nexus-upgrade/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-upgrade diff --git a/components/nexus-validation/pom.xml b/components/nexus-validation/pom.xml index b5fd91e92d..3b44dec284 100644 --- a/components/nexus-validation/pom.xml +++ b/components/nexus-validation/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-validation diff --git a/components/nexus-webhooks/pom.xml b/components/nexus-webhooks/pom.xml index 15900bb743..0e86128431 100644 --- a/components/nexus-webhooks/pom.xml +++ b/components/nexus-webhooks/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-webhooks diff --git a/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/GlobalWebhook.java b/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/GlobalWebhook.java index f38424d64e..834afe1254 100644 --- a/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/GlobalWebhook.java +++ b/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/GlobalWebhook.java @@ -20,7 +20,9 @@ public abstract class GlobalWebhook extends Webhook { - public static final WebhookType TYPE = new WebhookType("global") {}; + public static final WebhookType TYPE = new WebhookType("global") + { + }; public final WebhookType getType() { return TYPE; diff --git a/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/Webhook.java b/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/Webhook.java index 9533912a24..ffaea8dfee 100644 --- a/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/Webhook.java +++ b/components/nexus-webhooks/src/main/java/org/sonatype/nexus/webhooks/Webhook.java @@ -130,7 +130,7 @@ public void unsubscribe(final WebhookSubscription subscription) { checkNotNull(subscription); synchronized (subscriptions) { - //noinspection SuspiciousMethodCalls + // noinspection SuspiciousMethodCalls subscriptions.remove(subscription); log.debug("Removed subscription: {}", subscription); diff --git a/components/nexus-webresources-api/pom.xml b/components/nexus-webresources-api/pom.xml index b840547370..0ae7f6e65c 100644 --- a/components/nexus-webresources-api/pom.xml +++ b/components/nexus-webresources-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-webresources-api diff --git a/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/DelegatingWebResource.java b/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/DelegatingWebResource.java index 765a97fa02..644b61ea43 100644 --- a/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/DelegatingWebResource.java +++ b/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/DelegatingWebResource.java @@ -25,7 +25,7 @@ * @since 2.8 */ public class DelegatingWebResource - implements WebResource + implements WebResource { private final WebResource delegate; diff --git a/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/package-info.java b/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/package-info.java index 6e668027be..037371935f 100644 --- a/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/package-info.java +++ b/components/nexus-webresources-api/src/main/java/org/sonatype/nexus/webresources/package-info.java @@ -16,4 +16,4 @@ * * @since 3.0 */ -package org.sonatype.nexus.webresources; \ No newline at end of file +package org.sonatype.nexus.webresources; diff --git a/components/nexus-webresources-api/src/test/java/org/sonatype/nexus/webresources/GeneratedWebResourceTest.java b/components/nexus-webresources-api/src/test/java/org/sonatype/nexus/webresources/GeneratedWebResourceTest.java index f7c1f11aa4..f54f18d94b 100644 --- a/components/nexus-webresources-api/src/test/java/org/sonatype/nexus/webresources/GeneratedWebResourceTest.java +++ b/components/nexus-webresources-api/src/test/java/org/sonatype/nexus/webresources/GeneratedWebResourceTest.java @@ -31,13 +31,14 @@ * Tests for {@link GeneratedWebResource}. */ public class GeneratedWebResourceTest - extends TestSupport + extends TestSupport { private GeneratedWebResource underTest; @Before public void setUp() throws Exception { - this.underTest = new GeneratedWebResource() { + this.underTest = new GeneratedWebResource() + { @Override protected byte[] generate() throws IOException { return "test".getBytes(); @@ -76,7 +77,7 @@ public void getSize_requiresPreperation() throws Exception { WebResource prepared = underTest.prepare(); assertThat(prepared, notNullValue()); - assertThat(prepared.getSize(), is((long)"test".getBytes().length)); + assertThat(prepared.getSize(), is((long) "test".getBytes().length)); } @Test diff --git a/components/pom.xml b/components/pom.xml index 47461975b2..9ca1e63436 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-components @@ -101,7 +101,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -109,7 +109,7 @@ org.sonatype.nexus.bundles nexus-thirdparty-bundles pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import diff --git a/nxrm.groovy b/nxrm.groovy index 85bb97230f..21cb1f6941 100644 --- a/nxrm.groovy +++ b/nxrm.groovy @@ -176,18 +176,22 @@ File searchUp(File directory) { def getChangedProjects() { def grgit = Grgit.open() - def changes = grgit.status().staged.getAllChanges() + grgit.status().unstaged.getAllChanges() - - // for all changes, search up for a pom.xml, and get artifactId out - MavenXpp3Reader reader = new MavenXpp3Reader() def projects = [] as Set - changes.each { - File pom = searchUp(new File(it).getParentFile()) - // note: this ignores files in the project root - if (pom) { - Model model = reader.read(new FileReader(pom)) - projects.add(":" + model.getArtifactId()) + try { + def changes = grgit.status().staged.getAllChanges() + grgit.status().unstaged.getAllChanges() + + // for all changes, search up for a pom.xml, and get artifactId out + MavenXpp3Reader reader = new MavenXpp3Reader() + changes.each { + File pom = searchUp(new File(it).getParentFile()) + // note: this ignores files in the project root + if (pom) { + Model model = reader.read(new FileReader(pom)) + projects.add(":" + model.getArtifactId()) + } } + } catch (e) { + debug("Unable to determine changed projects: ${e}") } return projects } diff --git a/plugins/nexus-audit-plugin/pom.xml b/plugins/nexus-audit-plugin/pom.xml index fdc2439910..1c373e53ff 100644 --- a/plugins/nexus-audit-plugin/pom.xml +++ b/plugins/nexus-audit-plugin/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-audit-plugin diff --git a/plugins/nexus-audit-plugin/src/main/java/org/sonatype/nexus/audit/internal/AuditRecorderImpl.java b/plugins/nexus-audit-plugin/src/main/java/org/sonatype/nexus/audit/internal/AuditRecorderImpl.java index a61154608d..dfe69ec456 100644 --- a/plugins/nexus-audit-plugin/src/main/java/org/sonatype/nexus/audit/internal/AuditRecorderImpl.java +++ b/plugins/nexus-audit-plugin/src/main/java/org/sonatype/nexus/audit/internal/AuditRecorderImpl.java @@ -55,9 +55,10 @@ public class AuditRecorderImpl private volatile boolean enabled = false; @Inject - public AuditRecorderImpl(final EventManager eventManager, - final NodeAccess nodeAccess, - final InitiatorProvider initiatorProvider) + public AuditRecorderImpl( + final EventManager eventManager, + final NodeAccess nodeAccess, + final InitiatorProvider initiatorProvider) { this.eventManager = eventManager; this.nodeAccess = nodeAccess; diff --git a/plugins/nexus-audit-plugin/src/test/java/org/sonatype/nexus/audit/internal/AuditDTOTest.java b/plugins/nexus-audit-plugin/src/test/java/org/sonatype/nexus/audit/internal/AuditDTOTest.java index 950e9b9be4..8155e1567f 100644 --- a/plugins/nexus-audit-plugin/src/test/java/org/sonatype/nexus/audit/internal/AuditDTOTest.java +++ b/plugins/nexus-audit-plugin/src/test/java/org/sonatype/nexus/audit/internal/AuditDTOTest.java @@ -42,7 +42,7 @@ public void testToString_noData() { @Test public void testToString_withData() { - //Setting Thread name is required because AuditData provides thread name for AuditDTO. + // Setting Thread name is required because AuditData provides thread name for AuditDTO. Thread.currentThread().setName("quartz-7-thread-1"); underTest = new AuditDTO(makeAuditData()); diff --git a/plugins/nexus-blobstore-s3/pom.xml b/plugins/nexus-blobstore-s3/pom.xml index 8e5402ecea..703d4f4587 100644 --- a/plugins/nexus-blobstore-s3/pom.xml +++ b/plugins/nexus-blobstore-s3/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-blobstore-s3 diff --git a/plugins/nexus-blobstore-s3/src/main/java/org/sonatype/nexus/blobstore/s3/internal/S3BlobStore.java b/plugins/nexus-blobstore-s3/src/main/java/org/sonatype/nexus/blobstore/s3/internal/S3BlobStore.java index 62c21d159e..49985b6276 100644 --- a/plugins/nexus-blobstore-s3/src/main/java/org/sonatype/nexus/blobstore/s3/internal/S3BlobStore.java +++ b/plugins/nexus-blobstore-s3/src/main/java/org/sonatype/nexus/blobstore/s3/internal/S3BlobStore.java @@ -18,12 +18,14 @@ import java.time.Duration; import java.time.OffsetDateTime; import java.time.ZoneOffset; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.locks.Lock; +import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nullable; import javax.inject.Inject; @@ -45,6 +47,7 @@ import org.sonatype.nexus.blobstore.api.BlobStoreMetrics; import org.sonatype.nexus.blobstore.api.OperationMetrics; import org.sonatype.nexus.blobstore.api.OperationType; +import org.sonatype.nexus.blobstore.api.PaginatedResult; import org.sonatype.nexus.blobstore.api.RawObjectAccess; import org.sonatype.nexus.blobstore.api.metrics.BlobStoreMetricsService; import org.sonatype.nexus.blobstore.metrics.MonitoringBlobStoreMetrics; @@ -61,6 +64,8 @@ import com.amazonaws.services.s3.model.AmazonS3Exception; import com.amazonaws.services.s3.model.GetObjectMetadataRequest; import com.amazonaws.services.s3.model.DeleteObjectsRequest; +import com.amazonaws.services.s3.model.ListObjectsV2Request; +import com.amazonaws.services.s3.model.ListObjectsV2Result; import com.amazonaws.services.s3.model.ObjectMetadata; import com.amazonaws.services.s3.model.ObjectTagging; import com.amazonaws.services.s3.model.S3Object; @@ -313,9 +318,10 @@ public Blob create(final Path sourceFile, final Map headers, fin } @Override - public void createBlobAttributes(final BlobId blobId, - final Map headers, - final BlobMetrics blobMetrics) + public void createBlobAttributes( + final BlobId blobId, + final Map headers, + final BlobMetrics blobMetrics) { String attributePath = attributePath(blobId); try { @@ -552,16 +558,14 @@ private SetObjectTaggingRequest tagAsDeleted(final String key) { return new SetObjectTaggingRequest( getConfiguredBucket(), key, - new ObjectTagging(singletonList(DELETED_TAG)) - ); + new ObjectTagging(singletonList(DELETED_TAG))); } private SetObjectTaggingRequest untagAsDeleted(final String key) { return new SetObjectTaggingRequest( getConfiguredBucket(), key, - new ObjectTagging(emptyList()) - ); + new ObjectTagging(emptyList())); } @Override @@ -651,7 +655,8 @@ protected void doInit(final BlobStoreConfiguration configuration) { bucketManager.setS3(s3); bucketManager.prepareStorageLocation(blobStoreConfiguration); S3BlobStoreConfigurationHelper.setConfiguredBucket(blobStoreConfiguration, getConfiguredBucket()); - rawObjectAccess = new S3RawObjectAccess(getConfiguredBucket(), getBucketPrefix(), s3, performanceLogger, uploader); + rawObjectAccess = + new S3RawObjectAccess(getConfiguredBucket(), getBucketPrefix(), s3, performanceLogger, uploader); } catch (AmazonS3Exception e) { throw buildException(e); @@ -789,9 +794,31 @@ public Stream getBlobIdUpdatedSinceStream(final Duration duration) { } @Override - public Stream getBlobIdUpdatedSinceStream(final String prefix, final OffsetDateTime fromDateTime) { + public PaginatedResult getBlobIdUpdatedSinceStream( + final String prefix, + final OffsetDateTime fromDateTime, + @Nullable final String continuationToken, + final int pageSize) + { String fullPrefix = getContentPrefix() + prefix; - return getBlobIdStream(fullPrefix, fromDateTime).distinct(); + ListObjectsV2Request request = new ListObjectsV2Request() + .withBucketName(getConfiguredBucket()) + .withPrefix(fullPrefix) + .withMaxKeys(pageSize) + .withContinuationToken(continuationToken); + ListObjectsV2Result result = s3.listObjectsV2(request); + List blobIds = result.getObjectSummaries() + .stream() + .filter(o -> o.getKey().endsWith(BLOB_FILE_ATTRIBUTES_SUFFIX) || o.getKey().endsWith(BLOB_FILE_CONTENT_SUFFIX)) + .filter(this::isNotTempBlob) + .filter(s3Obj -> s3Obj.getLastModified().toInstant().atOffset(ZoneOffset.UTC).isAfter(fromDateTime)) + .map(S3AttributesLocation::new) + .map(this::getBlobIdFromAttributeFilePath) + .filter(Objects::nonNull) + .distinct() + .collect(Collectors.toList()); + String nextContinuationToken = result.isTruncated() ? result.getNextContinuationToken() : null; + return new PaginatedResult<>(blobIds, nextContinuationToken); } private Stream getBlobIdStream(final String prefix, OffsetDateTime fromDateTime) { @@ -905,7 +932,7 @@ public boolean isStorageAvailable() { } /** - * This is a simple existence check resulting from NEXUS-16729. This allows clients to perform a simple check + * This is a simple existence check resulting from NEXUS-16729. This allows clients to perform a simple check * primarily intended for use in directpath scenarios. */ @Override @@ -959,7 +986,8 @@ private boolean isBlobZeroLength(final BlobId blobId) { public Future asyncDelete(final BlobId blobId) { if (preferAsyncCleanup) { return executorService.submit(() -> this.deleteHard(blobId)); - } else { + } + else { return CompletableFuture.completedFuture(this.deleteHard(blobId)); } } @@ -983,8 +1011,7 @@ private BlobId attributePathToDirectPathBlobId(final String s3Key) { // NOSONAR .substring((getBucketPrefix() + DIRECT_PATH_PREFIX).length() + 1); Map headers = ImmutableMap.of( BLOB_NAME_HEADER, blobName, - DIRECT_PATH_BLOB_HEADER, "true" - ); + DIRECT_PATH_BLOB_HEADER, "true"); return blobIdLocationResolver.fromHeaders(headers); } diff --git a/plugins/nexus-blobstore-tasks/pom.xml b/plugins/nexus-blobstore-tasks/pom.xml index 99a7d50739..663d0e3060 100644 --- a/plugins/nexus-blobstore-tasks/pom.xml +++ b/plugins/nexus-blobstore-tasks/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-blobstore-tasks diff --git a/plugins/nexus-coreui-plugin/package.json b/plugins/nexus-coreui-plugin/package.json index a822793cfe..8dac581e09 100644 --- a/plugins/nexus-coreui-plugin/package.json +++ b/plugins/nexus-coreui-plugin/package.json @@ -18,8 +18,8 @@ "@fortawesome/fontawesome-svg-core": "1.2.25", "@fortawesome/free-brands-svg-icons": "5.13.1", "@fortawesome/free-solid-svg-icons": "5.11.2", - "@nivo/core": "^0.79.0", - "@nivo/line": "^0.79.0", + "@nivo/core": "^0.85.0", + "@nivo/line": "^0.85.0", "@sonatype/react-shared-components": "13.1.6", "@xstate/react": "3.2.2", "axios": "1.6.4", @@ -28,7 +28,7 @@ "ramda": "0.28.0", "react": "17.0.2", "react-dom": "17.0.2", - "swagger-ui-react": "4.17.1", + "swagger-ui-react": "4.18.0", "xstate": "4.38.3" }, "devDependencies": { diff --git a/plugins/nexus-coreui-plugin/pom.xml b/plugins/nexus-coreui-plugin/pom.xml index c8056036fa..04b965f6f5 100644 --- a/plugins/nexus-coreui-plugin/pom.xml +++ b/plugins/nexus-coreui-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-coreui-plugin diff --git a/plugins/nexus-coreui-plugin/src/frontend/jest.config.js b/plugins/nexus-coreui-plugin/src/frontend/jest.config.js index a33a1c3562..3fcf2b4891 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/jest.config.js +++ b/plugins/nexus-coreui-plugin/src/frontend/jest.config.js @@ -192,7 +192,7 @@ module.exports = { // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation transformIgnorePatterns: [ - "/node_modules/(?!@sonatype\/react-shared-components|pretty-bytes|@react-hook)" + "/node_modules/(?!@sonatype\/react-shared-components|pretty-bytes|@react-hook|d3-.*|internmap)" ], // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.jsx b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.jsx index 103563d9a5..7b534ba892 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.jsx +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.jsx @@ -10,7 +10,7 @@ * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the * Eclipse Foundation. All other trademarks are the property of their respective owners. */ -import React from 'react'; +import React, {useEffect} from 'react'; import {useMachine} from "@xstate/react"; import { @@ -42,24 +42,33 @@ const { function MaliciousRiskOnDiskContent({user, props}) { const [state, send] = useMachine(MaliciousRiskOnDiskMachine, {devtools: true}); const {maliciousRiskOnDisk, loadError} = state.context; - const isLoading = state.matches('loading'); + const isLoading = state.matches('chooseInitialState') || state.matches('loading'); + const closeMalwareBanner = state.matches('close'); const isAdmin = user?.administrator; const isProEdition = ExtJS.isProEdition(); const riskOnDiskCount = maliciousRiskOnDisk?.totalCount ?? 0; - const showWarningAlert = riskOnDiskCount > 0; + const showWarningAlert = riskOnDiskCount > 0 && !closeMalwareBanner; - setTimeout(() => { - if (window.location.hash.includes('#browse/browse') || window.location.hash.includes('#browse/search')) { - props.rerender(riskOnDiskCount); - } - }, 100); + useEffect(() => { + const timer = setTimeout(() => { + if (window.location.hash.includes('#browse/browse') || window.location.hash.includes('#browse/search')) { + props.rerender(riskOnDiskCount, closeMalwareBanner); + } + }, 100); + + return () => clearTimeout(timer); + }, [riskOnDiskCount, closeMalwareBanner]); function retry() { send({type: 'RETRY'}); } + function dismiss() { + send({type: 'DISMISS'}); + } + function getFirewallContactSonatype() { return isProEdition ? CONTACT_SONATYPE.URL.PRO : CONTACT_SONATYPE.URL.OSS; } @@ -67,7 +76,7 @@ function MaliciousRiskOnDiskContent({user, props}) { return ( {showWarningAlert &&
    - +
    diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.test.jsx b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.test.jsx index 373393d1eb..ec668e331f 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.test.jsx +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDisk.test.jsx @@ -14,6 +14,7 @@ import React from "react"; import {when} from "jest-when"; import axios from "axios"; import {render, screen, waitForElementToBeRemoved} from "@testing-library/react"; +import userEvent from "@testing-library/user-event"; import {act} from "react-dom/test-utils"; import {APIConstants, ExtJS} from '@sonatype/nexus-ui-plugin'; @@ -173,6 +174,43 @@ describe('MaliciousRiskOnDisk', () => { showContactSonatypeBtn, isProEdition); }); + it.each(['maliciousRisk', 'welcome', 'browse', 'search']) + ('renders a close button and set the cookie when button clicked', async (page) => { + const isAdmin = true; + const isProEdition = true; + + const setCookie = jest.fn(); + Object.defineProperty(document, 'cookie', { + get: () => '', + set: setCookie, + configurable: true, + }); + + await renderView(isAdmin, isProEdition, page); + + const closeButton = selectors.queryButton('Close'); + expect(closeButton).toBeInTheDocument(); + + userEvent.click(closeButton); + expect(setCookie).toHaveBeenCalledWith('MALWARE_BANNER=close; path=/'); + }); + + it.each(['maliciousRisk', 'welcome', 'browse', 'search']) + ('does not render the banner if cookie "MALWARE_BANNER" is close', async (page) => { + const getCookie = jest.fn(() => 'MALWARE_BANNER=close'); + Object.defineProperty(document, 'cookie', { + get: getCookie, + set: jest.fn(), + configurable: true, + }); + + await act(async () => { + render(); + }); + expect(getCookie).toHaveBeenCalled(); + expect(selectors.queryAlert()).not.toBeInTheDocument(); + }); + async function expectAlertToRender(page, count, title, description, showContactSonatypeBtn, isProEdition) { expect(selectors.getHeading(count)).toBeInTheDocument(); expect(selectors.getHeading(title)).toBeInTheDocument(); diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDiskMachine.js b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDiskMachine.js index 44e011a8f4..a1a27fcee1 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDiskMachine.js +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/maliciousrisk/riskondisk/MaliciousRiskOnDiskMachine.js @@ -22,13 +22,24 @@ const {MALICIOUS_RISK_ON_DISK} = APIConstants.REST.PUBLIC; export default createMachine({ id: 'MaliciousRiskOnDiskMachine', - initial: 'loading', + initial: 'chooseInitialState', context: { maliciousRiskOnDisk: {} }, states: { + chooseInitialState: { + always: [ + { + cond: 'shouldOpenAndLoad', + target: 'loading' + }, + { + target: 'close' + } + ] + }, loading: { invoke: { src: 'fetchData', @@ -43,6 +54,7 @@ export default createMachine({ } }, loaded: {}, + close: {}, loadError: { on: { 'RETRY': { @@ -52,6 +64,12 @@ export default createMachine({ } } }, + on: { + DISMISS: { + target: 'close', + actions: 'setCookie' + } + }, }, { actions: { @@ -65,7 +83,12 @@ export default createMachine({ clearError: assign({ loadError: () => null - }) + }), + + setCookie: () => document.cookie = 'MALWARE_BANNER=close; path=/' + }, + guards: { + shouldOpenAndLoad: () => document.cookie.match(/MALWARE_BANNER=([^;]*)/)?.[1] !== 'close' }, services: { fetchData: () => Axios.get(MALICIOUS_RISK_ON_DISK) diff --git a/plugins/nexus-coreui-plugin/src/main/java/org/sonatype/nexus/coreui/internal/repository/conan/ConanV2StateContributor.java b/plugins/nexus-coreui-plugin/src/main/java/org/sonatype/nexus/coreui/internal/repository/conan/ConanV2StateContributor.java deleted file mode 100644 index 8aa1ded57e..0000000000 --- a/plugins/nexus-coreui-plugin/src/main/java/org/sonatype/nexus/coreui/internal/repository/conan/ConanV2StateContributor.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Sonatype Nexus (TM) Open Source Version - * Copyright (c) 2008-present Sonatype, Inc. - * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. - * - * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, - * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks - * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the - * Eclipse Foundation. All other trademarks are the property of their respective owners. - */ -package org.sonatype.nexus.coreui.internal.repository.conan; - -import java.util.Collections; -import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; - -import org.sonatype.goodies.common.ComponentSupport; -import org.sonatype.nexus.rapture.StateContributor; - -import static org.sonatype.nexus.common.app.FeatureFlags.CONAN_V2_ENABLED_NAMED; - -@Named -@Singleton -public class ConanV2StateContributor - extends ComponentSupport - implements StateContributor -{ - private final boolean conanV2Enabled; - - @Inject - public ConanV2StateContributor(@Named(CONAN_V2_ENABLED_NAMED) final boolean featureFlag) { - this.conanV2Enabled = featureFlag; - } - - @Override - public Map getState() { - return Collections.singletonMap("conanV2Enabled", conanV2Enabled); - } -} diff --git a/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/app/PluginStrings.js b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/app/PluginStrings.js index 3e370775ff..7fd258bc44 100644 --- a/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/app/PluginStrings.js +++ b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/app/PluginStrings.js @@ -380,6 +380,10 @@ Ext.define('NX.coreui.app.PluginStrings', { Repository_RepositoryFeature_HealthCheckEnable_Button: 'Enable HealthCheck', Repository_RepositoryFeature_InvalidateCache_Button: 'Invalidate cache', Repository_RepositorySettings_Title: 'Settings', + Repository_Facet_CargoRequire_Authentication_Title: 'Cargo Settings', + Repository_Facet_CargoRequire_Authentication_Enabled: 'Authentication Requirements:', + Repository_Facet_CargoRequire_Authentication_Help: 'Restrict repository content to authenticated users', + Repository_Facet_CargoRequire_Authentication_HelpText: 'Leaving this box unchecked only allows anonymous access to this repository if anonymous access is also enabled in your instance', Repository_Facet_DockerHostedFacet_V1_Title: 'Docker Registry API Support', Repository_Facet_DockerHostedFacet_V1_Enabled: 'Enable Docker V1 API', Repository_Facet_DockerHostedFacet_V1_Enabled_Help: 'Allow clients to use the V1 API to interact with this repository', diff --git a/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/facet/CargoRequireAuthenticationFacet.js b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/facet/CargoRequireAuthenticationFacet.js new file mode 100644 index 0000000000..ac03663990 --- /dev/null +++ b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/facet/CargoRequireAuthenticationFacet.js @@ -0,0 +1,73 @@ +/* + * Sonatype Nexus (TM) Open Source Version + * Copyright (c) 2008-present Sonatype, Inc. + * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. + * + * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, + * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Sonatype Nexus (TM) Open Source Version is distributed with Sencha Ext JS pursuant to a FLOSS Exception agreed upon + * between Sonatype, Inc. and Sencha Inc. Sencha Ext JS is licensed under GPL v3 and cannot be redistributed as part of a + * closed source work. + * + * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks + * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the + * Eclipse Foundation. All other trademarks are the property of their respective owners. + */ +/*global Ext, NX*/ + +/** + * Configuration for availability of Docker V1 api. + * + * @since 3.0 + */ +Ext.define('NX.coreui.view.repository.facet.CargoRequireAuthenticationFacet', { + extend: 'Ext.form.FieldContainer', + alias: 'widget.nx-coreui-repository-cargo-require-authentication-facet', + requires: [ + 'NX.I18n' + ], + + /** + * @override + */ + initComponent: function() { + const me = this; + + me.items = [ + { + xtype: 'fieldset', + itemId: 'cargoAuth', + cls: 'nx-form-section', + title: NX.I18n.get('Repository_Facet_CargoRequire_Authentication_Title'), + items: [ + { + xtype: 'label', + text: NX.I18n.get('Repository_Facet_CargoRequire_Authentication_Enabled'), + style: { + fontWeight: 'bold', + display: 'block', + } + }, + { + xtype: 'label', + text: NX.I18n.get('Repository_Facet_CargoRequire_Authentication_HelpText'), + style: { + fontStyle: 'italic' + } + }, + { + xtype: 'checkbox', + name: 'attributes.cargo.requireAuthentication', + itemId: 'authrequired', + helpText: NX.I18n.get('Repository_Facet_CargoRequire_Authentication_Help'), + value: false + } + ] + } + ]; + + me.callParent(); + } + +}); diff --git a/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoGroup.js b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoGroup.js index edb3fee3a7..c6c2fe4959 100644 --- a/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoGroup.js +++ b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoGroup.js @@ -26,7 +26,8 @@ Ext.define('NX.coreui.view.repository.recipe.CargoGroup', { alias: 'widget.nx-coreui-repository-cargo-group', requires: [ 'NX.coreui.view.repository.facet.StorageFacet', - 'NX.coreui.view.repository.facet.GroupFacet' + 'NX.coreui.view.repository.facet.GroupFacet', + 'NX.coreui.view.repository.facet.CargoRequireAuthenticationFacet' ], /** @@ -36,6 +37,7 @@ Ext.define('NX.coreui.view.repository.recipe.CargoGroup', { var me = this; me.items = [ + {xtype: 'nx-coreui-repository-cargo-require-authentication-facet'}, {xtype: 'nx-coreui-repository-storage-facet'}, {xtype: 'nx-coreui-repository-group-facet', format: 'cargo'} ]; diff --git a/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoProxy.js b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoProxy.js index 3bf646b524..ee56456955 100644 --- a/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoProxy.js +++ b/plugins/nexus-coreui-plugin/src/main/resources/static/rapture/NX/coreui/view/repository/recipe/CargoProxy.js @@ -30,7 +30,8 @@ Ext.define('NX.coreui.view.repository.recipe.CargoProxy', { 'NX.coreui.view.repository.facet.RoutingRuleFacet', 'NX.coreui.view.repository.facet.BearerHttpClientFacet', 'NX.coreui.view.repository.facet.NegativeCacheFacet', - 'NX.coreui.view.repository.facet.CleanupPolicyFacet' + 'NX.coreui.view.repository.facet.CleanupPolicyFacet', + 'NX.coreui.view.repository.facet.CargoRequireAuthenticationFacet' ], /** @@ -40,6 +41,7 @@ Ext.define('NX.coreui.view.repository.recipe.CargoProxy', { var me = this; me.items = [ + {xtype: 'nx-coreui-repository-cargo-require-authentication-facet'}, {xtype: 'nx-coreui-repository-proxy-facet'}, {xtype: 'nx-coreui-repository-storage-facet'}, {xtype: 'nx-coreui-repository-routing-rule-facet'}, diff --git a/plugins/nexus-default-role-plugin/pom.xml b/plugins/nexus-default-role-plugin/pom.xml index b4ee5cdc3c..420e32fda8 100644 --- a/plugins/nexus-default-role-plugin/pom.xml +++ b/plugins/nexus-default-role-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-default-role-plugin diff --git a/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityDescriptor.java b/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityDescriptor.java index 56e33a1bb0..8169838060 100644 --- a/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityDescriptor.java +++ b/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityDescriptor.java @@ -69,8 +69,7 @@ public DefaultRoleCapabilityDescriptor() { P_ROLE, messages.roleLabel(), messages.roleHelp(), - FormField.MANDATORY - ).withStoreApi("coreui_Role.read"); + FormField.MANDATORY).withStoreApi("coreui_Role.read"); } @Override diff --git a/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleHealthCheck.java b/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleHealthCheck.java index e7a2a48a36..f93e8e5313 100644 --- a/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleHealthCheck.java +++ b/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleHealthCheck.java @@ -63,8 +63,11 @@ protected Result check() throws Exception { return Result.unhealthy("Default Role Realm is enabled but not configured."); } - Role matched = securitySystem.listRoles(DEFAULT_SOURCE).stream() - .filter(role -> role.getRoleId().equals(defaultRoleRealm.getRole())).findFirst().orElse(null); + Role matched = securitySystem.listRoles(DEFAULT_SOURCE) + .stream() + .filter(role -> role.getRoleId().equals(defaultRoleRealm.getRole())) + .findFirst() + .orElse(null); if (matched == null) { return Result diff --git a/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleStateContributor.java b/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleStateContributor.java index b76dc78a64..959f6bde54 100644 --- a/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleStateContributor.java +++ b/plugins/nexus-default-role-plugin/src/main/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleStateContributor.java @@ -59,15 +59,20 @@ public DefaultRoleStateContributor( @Override public Map getState() { Subject subject = SecurityUtils.getSubject(); - if (realmManager.isRealmEnabled(DefaultRoleRealm.NAME) && subject != null && (subject.isAuthenticated() || subject.isRemembered())) { + if (realmManager.isRealmEnabled(DefaultRoleRealm.NAME) && subject != null + && (subject.isAuthenticated() || subject.isRemembered())) { try { Map defaultRole = new HashMap<>(2); - Role matched = securitySystem.listRoles(DEFAULT_SOURCE).stream() - .filter(role -> role.getRoleId().equals(defaultRoleRealm.getRole())).findFirst().orElse(null); + Role matched = securitySystem.listRoles(DEFAULT_SOURCE) + .stream() + .filter(role -> role.getRoleId().equals(defaultRoleRealm.getRole())) + .findFirst() + .orElse(null); defaultRole.put("id", matched.getRoleId()); defaultRole.put("name", matched.getName()); return Collections.singletonMap("defaultRole", defaultRole); - } catch (Exception e) { + } + catch (Exception e) { log.debug("Unable to fetch default role configuration", e); } } diff --git a/plugins/nexus-default-role-plugin/src/test/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityTest.java b/plugins/nexus-default-role-plugin/src/test/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityTest.java index 063a9511f6..54fe1dd35e 100644 --- a/plugins/nexus-default-role-plugin/src/test/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityTest.java +++ b/plugins/nexus-default-role-plugin/src/test/java/org/sonatype/nexus/plugins/defaultrole/internal/DefaultRoleCapabilityTest.java @@ -25,7 +25,8 @@ import org.mockito.junit.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) -public class DefaultRoleCapabilityTest extends TestSupport +public class DefaultRoleCapabilityTest + extends TestSupport { private DefaultRoleCapability underTest; diff --git a/plugins/nexus-example-content/pom.xml b/plugins/nexus-example-content/pom.xml index ba73217b1e..e2139009e9 100644 --- a/plugins/nexus-example-content/pom.xml +++ b/plugins/nexus-example-content/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-example-content diff --git a/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/recipe/ExampleSecurityFacet.java b/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/recipe/ExampleSecurityFacet.java index be9a057b32..55a0fe24aa 100644 --- a/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/recipe/ExampleSecurityFacet.java +++ b/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/recipe/ExampleSecurityFacet.java @@ -29,9 +29,10 @@ public class ExampleSecurityFacet extends SecurityFacetSupport { @Inject - public ExampleSecurityFacet(final ExampleFormatSecurityContributor securityContributor, - @Named("simple") final VariableResolverAdapter variableResolverAdapter, - final ContentPermissionChecker contentPermissionChecker) + public ExampleSecurityFacet( + final ExampleFormatSecurityContributor securityContributor, + @Named("simple") final VariableResolverAdapter variableResolverAdapter, + final ContentPermissionChecker contentPermissionChecker) { super(securityContributor, variableResolverAdapter, contentPermissionChecker); } diff --git a/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/store/ExampleStoreModule.java b/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/store/ExampleStoreModule.java index 8f2a94a208..f3a3775fb6 100644 --- a/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/store/ExampleStoreModule.java +++ b/plugins/nexus-example-content/src/main/java/org/sonatype/nexus/content/example/internal/store/ExampleStoreModule.java @@ -24,10 +24,7 @@ */ @Named(ExampleFormat.NAME) public class ExampleStoreModule - extends FormatStoreModule + extends FormatStoreModule { // nothing to add... } diff --git a/plugins/nexus-onboarding-plugin/pom.xml b/plugins/nexus-onboarding-plugin/pom.xml index 2fadac5711..dfa155c0cd 100644 --- a/plugins/nexus-onboarding-plugin/pom.xml +++ b/plugins/nexus-onboarding-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-onboarding-plugin diff --git a/plugins/nexus-repository-apt/pom.xml b/plugins/nexus-repository-apt/pom.xml index a293439876..7c8c8c9050 100644 --- a/plugins/nexus-repository-apt/pom.xml +++ b/plugins/nexus-repository-apt/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT diff --git a/plugins/nexus-repository-httpbridge/pom.xml b/plugins/nexus-repository-httpbridge/pom.xml index 5e6d802e9c..c7baac7e45 100644 --- a/plugins/nexus-repository-httpbridge/pom.xml +++ b/plugins/nexus-repository-httpbridge/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-httpbridge diff --git a/plugins/nexus-repository-maven/pom.xml b/plugins/nexus-repository-maven/pom.xml index db58e3ebf2..42c63e0c41 100644 --- a/plugins/nexus-repository-maven/pom.xml +++ b/plugins/nexus-repository-maven/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-maven diff --git a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenAttributes.java b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenAttributes.java index c3b969b84d..51f50d6ee1 100644 --- a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenAttributes.java +++ b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenAttributes.java @@ -15,7 +15,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; + import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.Pattern; /** * REST API model for describing maven specific repository properties. @@ -28,17 +30,19 @@ public class MavenAttributes allowableValues = "RELEASE,SNAPSHOT,MIXED", example = "MIXED") @NotEmpty + @Pattern(regexp = "RELEASE|SNAPSHOT|MIXED", message = "must be one of RELEASE, SNAPSHOT, MIXED") protected final String versionPolicy; @ApiModelProperty(value = "Validate that all paths are maven artifact or metadata paths", allowableValues = "STRICT,PERMISSIVE", example = "STRICT") @NotEmpty + @Pattern(regexp = "STRICT|PERMISSIVE", message = "must be one of STRICT, PERMISSIVE") protected final String layoutPolicy; @ApiModelProperty(value = "Content Disposition", allowableValues = "INLINE,ATTACHMENT", example = "ATTACHMENT") - @NotEmpty + @Pattern(regexp = "INLINE|ATTACHMENT", message = "must be one of INLINE, ATTACHMENT") private final String contentDisposition; @JsonCreator diff --git a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenHostedApiRepository.java b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenHostedApiRepository.java index 8d94b30339..87f2db201e 100644 --- a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenHostedApiRepository.java +++ b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenHostedApiRepository.java @@ -12,6 +12,7 @@ */ package org.sonatype.nexus.repository.maven.api; +import javax.validation.Valid; import javax.validation.constraints.NotNull; import org.sonatype.nexus.repository.maven.internal.Maven2Format; @@ -33,6 +34,7 @@ public class MavenHostedApiRepository extends SimpleApiHostedRepository { + @Valid @NotNull protected final MavenAttributes maven; diff --git a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenProxyApiRepository.java b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenProxyApiRepository.java index 1d83f72a32..bc1fc76dc4 100644 --- a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenProxyApiRepository.java +++ b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/api/MavenProxyApiRepository.java @@ -12,6 +12,7 @@ */ package org.sonatype.nexus.repository.maven.api; +import javax.validation.Valid; import javax.validation.constraints.NotNull; import org.sonatype.nexus.repository.maven.internal.Maven2Format; @@ -38,6 +39,7 @@ public class MavenProxyApiRepository extends SimpleApiProxyRepository { + @Valid @NotNull protected final MavenAttributes maven; @@ -54,7 +56,7 @@ public MavenProxyApiRepository( @JsonProperty("httpClient") final HttpClientAttributesWithPreemptiveAuth httpClient, @JsonProperty("routingRuleName") final String routingRuleName, @JsonProperty("maven") final MavenAttributes maven, - @JsonProperty("replication") @JsonInclude(value= Include.NON_EMPTY, content=Include.NON_NULL) + @JsonProperty("replication") @JsonInclude(value = Include.NON_EMPTY, content = Include.NON_NULL) final ReplicationAttributes replication) { diff --git a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenHostedRepositoryApiRequest.java b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenHostedRepositoryApiRequest.java index d6d4186508..234bf3b846 100644 --- a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenHostedRepositoryApiRequest.java +++ b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenHostedRepositoryApiRequest.java @@ -12,6 +12,7 @@ */ package org.sonatype.nexus.repository.maven.rest; +import javax.validation.Valid; import javax.validation.constraints.NotNull; import org.sonatype.nexus.repository.maven.api.MavenAttributes; @@ -32,6 +33,7 @@ public class MavenHostedRepositoryApiRequest extends HostedRepositoryApiRequest { + @Valid @NotNull protected final MavenAttributes maven; diff --git a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenProxyRepositoryApiRequest.java b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenProxyRepositoryApiRequest.java index b7b31bc1d0..557f0ccb4b 100644 --- a/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenProxyRepositoryApiRequest.java +++ b/plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/rest/MavenProxyRepositoryApiRequest.java @@ -37,11 +37,12 @@ public class MavenProxyRepositoryApiRequest extends ProxyRepositoryApiRequest { + @Valid @NotNull protected final MavenAttributes maven; - @NotNull @Valid + @NotNull protected final HttpClientAttributesWithPreemptiveAuth httpClient; @JsonCreator(mode = JsonCreator.Mode.PROPERTIES) @@ -56,10 +57,11 @@ public MavenProxyRepositoryApiRequest( @JsonProperty("httpClient") final HttpClientAttributesWithPreemptiveAuth httpClient, @JsonProperty("routingRule") final String routingRule, @JsonProperty("maven") final MavenAttributes maven, - @JsonProperty("replication") @JsonInclude(value= Include.NON_EMPTY, content=Include.NON_NULL) + @JsonProperty("replication") @JsonInclude(value = Include.NON_EMPTY, content = Include.NON_NULL) final ReplicationAttributes replication) { - super(name, Maven2Format.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule, replication); + super(name, Maven2Format.NAME, online, storage, cleanup, proxy, negativeCache, httpClient, routingRule, + replication); this.maven = maven; this.httpClient = httpClient; } diff --git a/plugins/nexus-repository-maven/src/test/java/org/sonatype/nexus/repository/maven/api/MavenAttributesTest.java b/plugins/nexus-repository-maven/src/test/java/org/sonatype/nexus/repository/maven/api/MavenAttributesTest.java new file mode 100644 index 0000000000..a0ce548e4f --- /dev/null +++ b/plugins/nexus-repository-maven/src/test/java/org/sonatype/nexus/repository/maven/api/MavenAttributesTest.java @@ -0,0 +1,181 @@ +/* + * Sonatype Nexus (TM) Open Source Version + * Copyright (c) 2008-present Sonatype, Inc. + * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. + * + * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, + * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. + * + * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks + * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the + * Eclipse Foundation. All other trademarks are the property of their respective owners. + */ +package org.sonatype.nexus.repository.maven.api; + +import java.util.Arrays; +import java.util.Set; + +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.*; + +import javax.validation.ConstraintViolation; +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; + +import org.sonatype.nexus.repository.maven.ContentDisposition; +import org.sonatype.nexus.repository.maven.LayoutPolicy; +import org.sonatype.nexus.repository.maven.VersionPolicy; + +public class MavenAttributesTest +{ + private Validator validator; + + private static final String[] VALID_VERSION_POLICIES = Arrays.stream(VersionPolicy.values()) + .map(Enum::toString) + .toArray(String[]::new); + + private static final String[] VALID_LAYOUT_POLICIES = Arrays.stream(LayoutPolicy.values()) + .map(Enum::toString) + .toArray(String[]::new); + + private static final String[] VALID_CONTENT_DISPOSITIONS = Arrays.stream(ContentDisposition.values()) + .map(Enum::toString) + .toArray(String[]::new); + + private static final String VERSION_POLICY_ERROR_MSG = "must be one of RELEASE, SNAPSHOT, MIXED"; + + private static final String LAYOUT_POLICY_ERROR_MSG = "must be one of STRICT, PERMISSIVE"; + + private static final String CONTENT_DISPOSITION_ERROR_MSG = "must be one of INLINE, ATTACHMENT"; + + private static final String EMPTY_ERROR_MSG = "must not be empty"; + + @Before + public void setUp() { + try (ValidatorFactory factory = Validation.buildDefaultValidatorFactory()) { + validator = factory.getValidator(); + } + } + + @Test + public void testConstructorAndGetters() { + String versionPolicy = VALID_VERSION_POLICIES[0]; + String layoutPolicy = VALID_LAYOUT_POLICIES[0]; + String contentDisposition = VALID_CONTENT_DISPOSITIONS[0]; + + MavenAttributes mavenAttributes = new MavenAttributes(versionPolicy, layoutPolicy, contentDisposition); + + assertEquals(versionPolicy, mavenAttributes.getVersionPolicy()); + assertEquals(layoutPolicy, mavenAttributes.getLayoutPolicy()); + assertEquals(contentDisposition, mavenAttributes.getContentDisposition()); + } + + @Test + public void testValidVersionPolicy() { + for (String validVersionPolicy : VALID_VERSION_POLICIES) { + MavenAttributes attributes = + new MavenAttributes(validVersionPolicy, VALID_LAYOUT_POLICIES[0], VALID_CONTENT_DISPOSITIONS[0]); + assertTrue(isValid(attributes)); + } + } + + @Test + public void testValidLayoutPolicy() { + for (String validLayoutPolicy : VALID_LAYOUT_POLICIES) { + MavenAttributes attributes = + new MavenAttributes(VALID_VERSION_POLICIES[0], validLayoutPolicy, VALID_CONTENT_DISPOSITIONS[0]); + assertTrue(isValid(attributes)); + } + } + + @Test + public void testValidContentDisposition() { + for (String validContentDisposition : VALID_CONTENT_DISPOSITIONS) { + MavenAttributes attributes = + new MavenAttributes(VALID_VERSION_POLICIES[0], VALID_LAYOUT_POLICIES[0], validContentDisposition); + assertTrue(isValid(attributes)); + } + } + + @Test + public void testInvalidVersionPolicy() { + MavenAttributes attributes = + new MavenAttributes("invalid", VALID_LAYOUT_POLICIES[0], VALID_CONTENT_DISPOSITIONS[0]); + assertFalse(isValid(attributes)); + assertTrue(hasMessage(attributes, VERSION_POLICY_ERROR_MSG)); + } + + @Test + public void testInvalidLayoutPolicy() { + MavenAttributes attributes = + new MavenAttributes(VALID_VERSION_POLICIES[0], "invalid", VALID_CONTENT_DISPOSITIONS[0]); + assertFalse(isValid(attributes)); + assertTrue(hasMessage(attributes, LAYOUT_POLICY_ERROR_MSG)); + } + + @Test + public void testInvalidContentDisposition() { + MavenAttributes attributes = + new MavenAttributes(VALID_VERSION_POLICIES[0], VALID_LAYOUT_POLICIES[0], "invalid"); + assertFalse(isValid(attributes)); + assertTrue(hasMessage(attributes, CONTENT_DISPOSITION_ERROR_MSG)); + } + + @Test + public void testEmptyVersionPolicy() { + MavenAttributes attributes = new MavenAttributes("", VALID_LAYOUT_POLICIES[0], VALID_CONTENT_DISPOSITIONS[0]); + assertFalse(isValid(attributes)); + assertTrue(hasMessage(attributes, EMPTY_ERROR_MSG)); + } + + @Test + public void testEmptyLayoutPolicy() { + MavenAttributes attributes = new MavenAttributes(VALID_VERSION_POLICIES[0], "", VALID_CONTENT_DISPOSITIONS[0]); + assertFalse(isValid(attributes)); + assertTrue(hasMessage(attributes, EMPTY_ERROR_MSG)); + } + + @Test + public void testEmptyContentDisposition() { + MavenAttributes attributes = new MavenAttributes(VALID_VERSION_POLICIES[0], VALID_LAYOUT_POLICIES[0], ""); + assertFalse(isValid(attributes)); + } + + @Test + public void testNullVersionPolicy() { + MavenAttributes attributes = new MavenAttributes(null, VALID_LAYOUT_POLICIES[0], VALID_CONTENT_DISPOSITIONS[0]); + assertFalse(isValid(attributes)); + assertTrue(hasMessage(attributes, EMPTY_ERROR_MSG)); + } + + @Test + public void testNullLayoutPolicy() { + MavenAttributes attributes = new MavenAttributes(VALID_VERSION_POLICIES[0], null, VALID_CONTENT_DISPOSITIONS[0]); + assertFalse(isValid(attributes)); + assertTrue(hasMessage(attributes, EMPTY_ERROR_MSG)); + } + + @Test + public void testNullContentDisposition() { + MavenAttributes attributes = new MavenAttributes(VALID_VERSION_POLICIES[0], VALID_LAYOUT_POLICIES[0], null); + assertTrue(isValid(attributes)); + } + + private boolean isValid(final MavenAttributes attributes) { + Set> violations = validator.validate(attributes); + return violations.isEmpty(); + } + + private boolean hasMessage(final MavenAttributes attributes, String errorMessage) { + Set> violations = validator.validate(attributes); + for (ConstraintViolation violation : violations) { + if (violation.getMessage().equals(errorMessage)) { + return true; + } + } + return false; + } +} diff --git a/plugins/nexus-repository-raw/pom.xml b/plugins/nexus-repository-raw/pom.xml index 24ee85f793..06e4749b92 100644 --- a/plugins/nexus-repository-raw/pom.xml +++ b/plugins/nexus-repository-raw/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-raw diff --git a/plugins/nexus-script-plugin/pom.xml b/plugins/nexus-script-plugin/pom.xml index ef4b563e52..501b171793 100644 --- a/plugins/nexus-script-plugin/pom.xml +++ b/plugins/nexus-script-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-script-plugin diff --git a/plugins/nexus-ssl-plugin/pom.xml b/plugins/nexus-ssl-plugin/pom.xml index ee75366710..84ddd8a883 100644 --- a/plugins/nexus-ssl-plugin/pom.xml +++ b/plugins/nexus-ssl-plugin/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-ssl-plugin diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/TrustStoreImpl.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/TrustStoreImpl.java index 8c28eda572..a267c91dd8 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/TrustStoreImpl.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/TrustStoreImpl.java @@ -83,9 +83,10 @@ public class TrustStoreImpl private volatile SSLContext sslcontext; @Inject - public TrustStoreImpl(final EventManager eventManager, - @Named("ssl") final KeyStoreManager keyStoreManager, - final FreezeService freezeService) throws Exception + public TrustStoreImpl( + final EventManager eventManager, + @Named("ssl") final KeyStoreManager keyStoreManager, + final FreezeService freezeService) throws Exception { this.eventManager = checkNotNull(eventManager); this.keyStoreManager = checkNotNull(keyStoreManager); @@ -95,8 +96,9 @@ public TrustStoreImpl(final EventManager eventManager, } @Override - public Certificate importTrustCertificate(final Certificate certificate, final String alias) - throws KeystoreException + public Certificate importTrustCertificate( + final Certificate certificate, + final String alias) throws KeystoreException { freezeService.checkWritable("Unable to import a certificate while database is frozen."); @@ -114,8 +116,9 @@ public Certificate importTrustCertificate(final Certificate certificate, final S } @Override - public Certificate importTrustCertificate(final String certificateInPEM, final String alias) - throws KeystoreException, CertificateException + public Certificate importTrustCertificate( + final String certificateInPEM, + final String alias) throws KeystoreException, CertificateException { final Certificate certificate = decodePEMFormattedCertificate(certificateInPEM); @@ -209,8 +212,8 @@ private TrustManager[] getTrustManagers() throws Exception { return null; } - private static X509TrustManager getManagedTrustManager(final KeyStoreManager keyStoreManager) - throws KeystoreException + private static X509TrustManager getManagedTrustManager( + final KeyStoreManager keyStoreManager) throws KeystoreException { final TrustManager[] managedTrustManagers = keyStoreManager.getTrustManagers(); if (managedTrustManagers != null) { @@ -342,7 +345,9 @@ private String getCertificateSha1(final Certificate certificate) { * Wraps an {@link X509TrustManager} with one that falls back on the * managed trust manager when checking if a certificate is trusted. */ - private class FallbackOnManagedX509TrustManager implements X509TrustManager { + private class FallbackOnManagedX509TrustManager + implements X509TrustManager + { private final X509TrustManager primary; @@ -351,14 +356,12 @@ private class FallbackOnManagedX509TrustManager implements X509TrustManager { } @Override - public void checkClientTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { + public void checkClientTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { primary.checkClientTrusted(chain, authType); } @Override - public void checkServerTrusted(final X509Certificate[] chain, final String authType) - throws CertificateException { + public void checkServerTrusted(final X509Certificate[] chain, final String authType) throws CertificateException { try { primary.checkServerTrusted(chain, authType); } diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerConfigurationImpl.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerConfigurationImpl.java index 6b53dcb346..672143e815 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerConfigurationImpl.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerConfigurationImpl.java @@ -34,13 +34,16 @@ public class KeyStoreManagerConfigurationImpl // Using terse names for password constants for a little more security by obscurity private static final char[] PKSP /* PRIVATE_KEY_STORE_PASSWORD */ = "QePgCbrDbQiNdT6X".toCharArray(); - // unobfuscate(new long[]{0xC83937B59BD4E1B3L, 0xE67FF6D75DDC56E6L, 0xAD210BF881D932F2L}).toCharArray(); /* => "QePgCbrDbQiNdT6X" */ + // unobfuscate(new long[]{0xC83937B59BD4E1B3L, 0xE67FF6D75DDC56E6L, 0xAD210BF881D932F2L}).toCharArray(); /* => + // "QePgCbrDbQiNdT6X" */ private static final char[] TKSP /* TRUSTED_KEY_STORE_PASSWORD */ = "xfWHLzWxDF14OUW6".toCharArray(); - // unobfuscate(new long[]{0xC23B2AC13724F4EAL, 0xF9510B04CA4340EEL, 0x98D2647891CB6F66L}).toCharArray(); /* => "xfWHLzWxDF14OUW6" */ + // unobfuscate(new long[]{0xC23B2AC13724F4EAL, 0xF9510B04CA4340EEL, 0x98D2647891CB6F66L}).toCharArray(); /* => + // "xfWHLzWxDF14OUW6" */ private static final char[] PKP /* PRIVATE_KEY_PASSWORD */ = "Xw5JCuS5aDZ14oZG".toCharArray(); - // unobfuscate(new long[]{0xD39F439CFB22319FL, 0xE48AAB6E5D073A6BL, 0xA14EE96195DA105AL}).toCharArray(); /* => "Xw5JCuS5aDZ14oZG" */ + // unobfuscate(new long[]{0xD39F439CFB22319FL, 0xE48AAB6E5D073A6BL, 0xA14EE96195DA105AL}).toCharArray(); /* => + // "Xw5JCuS5aDZ14oZG" */ @Inject public KeyStoreManagerConfigurationImpl( diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerImpl.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerImpl.java index aa9a04a74e..f1c56f36cd 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerImpl.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreManagerImpl.java @@ -33,9 +33,10 @@ public class KeyStoreManagerImpl public static final String NAME = "ssl"; @Inject - public KeyStoreManagerImpl(final CryptoHelper crypto, - @Named(NAME) final KeyStoreStorageManager storageManager, - @Named(NAME) final KeyStoreManagerConfiguration config) + public KeyStoreManagerImpl( + final CryptoHelper crypto, + @Named(NAME) final KeyStoreStorageManager storageManager, + @Named(NAME) final KeyStoreManagerConfiguration config) { super(crypto, storageManager, config); } diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreStorageImpl.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreStorageImpl.java index 25268ff207..480518b090 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreStorageImpl.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/keystore/KeyStoreStorageImpl.java @@ -52,8 +52,9 @@ public boolean modified() { } @Override - public void load(final KeyStore keyStore, final char[] password) - throws NoSuchAlgorithmException, CertificateException, IOException + public void load( + final KeyStore keyStore, + final char[] password) throws NoSuchAlgorithmException, CertificateException, IOException { try (ByteArrayInputStream in = storage.load(keyStoreName)) { keyStore.load(in, password); @@ -61,8 +62,9 @@ public void load(final KeyStore keyStore, final char[] password) } @Override - public void save(final KeyStore keyStore, final char[] password) - throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException + public void save( + final KeyStore keyStore, + final char[] password) throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { try (ByteArrayOutputStream out = new ByteArrayOutputStream(16 * 1024)) { keyStore.store(out, password); diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResource.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResource.java index 7e512ac446..79166d44de 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResource.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResource.java @@ -116,7 +116,10 @@ public ApiCertificate retrieveCertificate( @RequiresPermissions("nexus:ssl-truststore:read") public List getTrustStoreCertificates() { try { - return trustStore.getTrustedCertificates().stream().map(this::convertOrNull).filter(Objects::nonNull) + return trustStore.getTrustedCertificates() + .stream() + .map(this::convertOrNull) + .filter(Objects::nonNull) .collect(Collectors.toList()); } catch (KeystoreException e) { diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResourceDoc.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResourceDoc.java index 7feedfbe72..d21f4bc5fd 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResourceDoc.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/rest/CertificateApiResourceDoc.java @@ -57,7 +57,8 @@ ApiCertificate retrieveCertificate( @ApiOperation("Add a certificate to the trust store.") @ApiResponses(value = { - @ApiResponse(code = SC_CREATED, message = "The certificate was successfully added.", response = ApiCertificate.class), + @ApiResponse(code = SC_CREATED, message = "The certificate was successfully added.", + response = ApiCertificate.class), @ApiResponse(code = SC_CONFLICT, message = "The certificate already exists in the system."), @ApiResponse(code = SC_FORBIDDEN, message = "Insufficient permissions to add certificate to the trust store.")}) diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateComponent.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateComponent.java index 2fea428310..d0a32b31cc 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateComponent.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateComponent.java @@ -66,8 +66,8 @@ public CertificateComponent(final TrustStore trustStore, final CertificateRetrie /** * Retrieves certificate given a host/port. * - * @param host to get certificate from - * @param port the port + * @param host to get certificate from + * @param port the port * @param protocolHint the protocol hint * @return certificate */ diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateXO.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateXO.java index c3dabe63af..760eb07b33 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateXO.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/internal/ui/CertificateXO.java @@ -23,17 +23,29 @@ public class CertificateXO { private final String id; + private final String fingerprint; + private final String pem; + private String serialNumber; + private String subjectCommonName; + private String subjectOrganization; + private String subjectOrganizationalUnit; + private String issuerCommonName; + private String issuerOrganization; + private String issuerOrganizationalUnit; + private long issuedOn; + private long expiresOn; + private boolean inTrustStore; public CertificateXO( diff --git a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/spi/CapabilityManager.java b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/spi/CapabilityManager.java index 9ce40063f7..1ee9b3f14e 100644 --- a/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/spi/CapabilityManager.java +++ b/plugins/nexus-ssl-plugin/src/main/java/com/sonatype/nexus/ssl/plugin/spi/CapabilityManager.java @@ -24,7 +24,6 @@ public interface CapabilityManager CapabilityReference get(String id); - CapabilityReference enable(String id, boolean enabled) - throws Exception; + CapabilityReference enable(String id, boolean enabled) throws Exception; } diff --git a/plugins/nexus-task-log-cleanup/pom.xml b/plugins/nexus-task-log-cleanup/pom.xml index ac04a00a4e..949870b574 100644 --- a/plugins/nexus-task-log-cleanup/pom.xml +++ b/plugins/nexus-task-log-cleanup/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-task-log-cleanup diff --git a/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanup.java b/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanup.java index 4a4e5abb15..d5239a2c33 100644 --- a/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanup.java +++ b/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanup.java @@ -12,7 +12,6 @@ */ package org.sonatype.nexus.tasklog; - import java.io.File; import java.io.IOException; import java.time.LocalDate; @@ -36,6 +35,7 @@ /** * Cleanup the task log files based on how old in days they are + * * @since 3.5 */ @Named @@ -70,15 +70,14 @@ void cleanup() { AgeFileFilter ageFileFilter = new AgeFileFilter(thresholdDate); Iterator filesToDelete = iterateFiles(logFilesHome, ageFileFilter, ageFileFilter); filesToDelete.forEachRemaining(f -> { - try { - forceDelete(f); - log.info("Removed task log file {}", f.toString()); - } - catch (IOException e) { // NOSONAR - log.error("Unable to delete task file {}. Message was {}.", f.toString(), e.getMessage()); - } - } - ); + try { + forceDelete(f); + log.info("Removed task log file {}", f.toString()); + } + catch (IOException e) { // NOSONAR + log.error("Unable to delete task file {}. Message was {}.", f.toString(), e.getMessage()); + } + }); } @VisibleForTesting diff --git a/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanupQuartz.java b/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanupQuartz.java index 8d52c66238..e85f67448a 100644 --- a/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanupQuartz.java +++ b/plugins/nexus-task-log-cleanup/src/main/java/org/sonatype/nexus/tasklog/TaskLogCleanupQuartz.java @@ -29,6 +29,7 @@ /** * Adds the {@link TaskLogCleanupTask} to the quartz cron definition in the database + * * @since 3.5 */ @Named @@ -42,8 +43,9 @@ public class TaskLogCleanupQuartz private final String taskLogCleanupCron; @Inject - public TaskLogCleanupQuartz(final TaskScheduler taskScheduler, - @Named("${nexus.tasks.log.cleanup.cron:-0 0 0 * * ?}") final String taskLogCleanupCron) + public TaskLogCleanupQuartz( + final TaskScheduler taskScheduler, + @Named("${nexus.tasks.log.cleanup.cron:-0 0 0 * * ?}") final String taskLogCleanupCron) { this.taskScheduler = checkNotNull(taskScheduler); this.taskLogCleanupCron = checkNotNull(taskLogCleanupCron); @@ -51,7 +53,8 @@ public TaskLogCleanupQuartz(final TaskScheduler taskScheduler, @Override protected void doStart() throws Exception { - if (!taskScheduler.listsTasks().stream() + if (!taskScheduler.listsTasks() + .stream() .anyMatch((info) -> TaskLogCleanupTaskDescriptor.TYPE_ID.equals(info.getConfiguration().getTypeId()))) { TaskConfiguration configuration = taskScheduler.createTaskConfigurationInstance( TaskLogCleanupTaskDescriptor.TYPE_ID); diff --git a/plugins/pom.xml b/plugins/pom.xml index 1205814344..8f5877b0d1 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins @@ -54,7 +54,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -65,13 +65,13 @@ org.sonatype.nexus.plugins nexus-audit-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-audit-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -81,13 +81,13 @@ org.sonatype.nexus.plugins nexus-blobstore-tasks - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-blobstore-tasks - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -97,13 +97,13 @@ org.sonatype.nexus.plugins nexus-coreui-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-coreui-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -112,7 +112,7 @@ org.sonatype.nexus.plugins nexus-coreui-plugin sources - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT @@ -120,13 +120,13 @@ org.sonatype.nexus.plugins nexus-repository-httpbridge - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-httpbridge - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -136,13 +136,13 @@ org.sonatype.nexus.plugins nexus-repository-maven - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-maven - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -152,13 +152,13 @@ org.sonatype.nexus.plugins nexus-repository-apt - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-apt - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -169,13 +169,13 @@ org.sonatype.nexus.plugins nexus-repository-raw - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-raw - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -185,13 +185,13 @@ org.sonatype.nexus.plugins nexus-ssl-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-ssl-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -201,13 +201,13 @@ org.sonatype.nexus.plugins nexus-script-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-script-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -217,13 +217,13 @@ org.sonatype.nexus.plugins nexus-task-log-cleanup - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-task-log-cleanup - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -233,13 +233,13 @@ org.sonatype.nexus.plugins nexus-blobstore-s3 - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-blobstore-s3 - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -249,13 +249,13 @@ org.sonatype.nexus.plugins nexus-onboarding-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-onboarding-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -265,13 +265,13 @@ org.sonatype.nexus.plugins nexus-default-role-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-default-role-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -281,13 +281,13 @@ org.sonatype.nexus.plugins nexus-example-content - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.plugins nexus-example-content - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml diff --git a/pom.xml b/pom.xml index 4b235c7e4a..3893f250ca 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ ${project.groupId}:${project.artifactId} pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT 2008 http://nexus.sonatype.org/ @@ -62,7 +62,7 @@ Define nexus versions. The 'nexus.version' property always refers to the version of the current project. These values must always be constants; 'nexus.version' will get update automatically by set-version. --> - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT 2.15.1-02 4.3.9 @@ -141,103 +141,103 @@ org.sonatype.nexus nexus-audit - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-base - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-blobstore - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-blobstore-api - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-blobstore-file - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-bootstrap - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-capability - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-cleanup - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-cleanup-config - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-commands - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-common - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-core - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-crypto - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-datastore - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-datastore-api - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-datastore-mybatis - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-datastore-mybatis - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -245,97 +245,97 @@ org.sonatype.nexus nexus-distributed-event-service-api - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-cache - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-elasticsearch - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-email - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-extdirect - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-extender - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-features - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-httpclient - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-jmx - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-scheduling - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-formfields - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-guice-servlet - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-main - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-mime - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-oss-edition - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-oss-edition - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -343,170 +343,170 @@ org.sonatype.nexus nexus-pax-logging - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-plugin-api - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-quartz - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-rapture - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-rapture - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT sources org.sonatype.nexus nexus-repository-config - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-repository-content - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-repository-services - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-repository-view - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-rest - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-rest-client - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-rest-jackson2 - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-script - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-security - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-selector - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-servlet - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-siesta - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-ssl - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-supportzip-api - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-swagger - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-task-logging - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-thread - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-transaction - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-ui-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-upgrade - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-validation - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-webhooks - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-webresources-api - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT @@ -514,25 +514,25 @@ org.sonatype.nexus nexus-pax-exam - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-test-common - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-test-db - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus nexus-testsupport - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT @@ -540,7 +540,7 @@ org.sonatype.nexus.assemblies nexus-startup-feature - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -548,7 +548,7 @@ org.sonatype.nexus.assemblies nexus-boot-feature - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -556,7 +556,7 @@ org.sonatype.nexus.assemblies nexus-base-feature - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -564,7 +564,7 @@ org.sonatype.nexus.assemblies nexus-core-feature - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT features xml @@ -572,14 +572,14 @@ org.sonatype.nexus.assemblies nexus-base-overlay - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT zip org.sonatype.nexus.assemblies nexus-base-template - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT zip @@ -820,7 +820,7 @@ org.sonatype.nexus.buildsupport extjs-maven-plugin - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT diff --git a/revision.txt b/revision.txt index 109c1d837a..4321d04558 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -b=main,r=5621a56f8bab5584a863eac5fb01fa9c98aa43b3,t=2024-11-15-1342-47707 \ No newline at end of file +b=main,r=c8a3e4cc117ccfab5a6e16dceb19f69c64ce90f1,t=2024-11-22-1342-38744 \ No newline at end of file diff --git a/sonatype-config/sonatype-eclipse.xml b/sonatype-config/sonatype-eclipse.xml index 9069d38a08..291bbadf4d 100644 --- a/sonatype-config/sonatype-eclipse.xml +++ b/sonatype-config/sonatype-eclipse.xml @@ -256,7 +256,7 @@ - + diff --git a/testsuite/nexus-content-suite/pom.xml b/testsuite/nexus-content-suite/pom.xml index cc240b591a..f97df14ea9 100644 --- a/testsuite/nexus-content-suite/pom.xml +++ b/testsuite/nexus-content-suite/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-content-suite diff --git a/testsuite/nexus-content-suite/src/test/java/org/sonatype/nexus/content/testsuite/PurgeUnusedIT.java b/testsuite/nexus-content-suite/src/test/java/org/sonatype/nexus/content/testsuite/PurgeUnusedIT.java index d422a68a6c..be909b04d0 100644 --- a/testsuite/nexus-content-suite/src/test/java/org/sonatype/nexus/content/testsuite/PurgeUnusedIT.java +++ b/testsuite/nexus-content-suite/src/test/java/org/sonatype/nexus/content/testsuite/PurgeUnusedIT.java @@ -108,8 +108,7 @@ public void shouldPurgeUnusedAssets() { assertThat(assets, hasItems( path(equalTo("/0day")), - path(equalTo("/1day")) - )); + path(equalTo("/1day")))); } @Test @@ -130,16 +129,14 @@ public void shouldPurgeUnusedComponents() { assertThat(components, hasItems( name(equalTo("/0day")), - name(equalTo("/1day")) - )); + name(equalTo("/1day")))); Continuation assets = browseAssets(); assertThat(assets, iterableWithSize(2)); assertThat(assets, hasItems( path(equalTo("/0day0")), - path(equalTo("/1day0")) - )); + path(equalTo("/1day0")))); } @Test @@ -163,8 +160,7 @@ public void shouldPurgeComponentsBasedOnMostRecentlyDownloadedAsset() { assertThat(assets, hasItems( path(equalTo("/0day-3days0")), - path(equalTo("/0day-3days1")) - )); + path(equalTo("/0day-3days1")))); } private Continuation browseAssets() { diff --git a/testsuite/nexus-docker-testsupport/pom.xml b/testsuite/nexus-docker-testsupport/pom.xml index 419d194903..2754a4ca4b 100644 --- a/testsuite/nexus-docker-testsupport/pom.xml +++ b/testsuite/nexus-docker-testsupport/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-docker-testsupport diff --git a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/CommandLine.java b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/CommandLine.java index f4a034d229..bbcbee39c8 100644 --- a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/CommandLine.java +++ b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/CommandLine.java @@ -33,7 +33,7 @@ public interface CommandLine * Download a file from the container. * * @param fromContainerPath the file to download in the container. - * @param toLocal {@link File} host path to download to + * @param toLocal {@link File} host path to download to */ void download(String fromContainerPath, File toLocal); diff --git a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/ContainerCommandLineITSupport.java b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/ContainerCommandLineITSupport.java index cac9ea7d7e..0763550e09 100644 --- a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/ContainerCommandLineITSupport.java +++ b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/ContainerCommandLineITSupport.java @@ -51,7 +51,7 @@ protected ContainerCommandLineITSupport(final String image) { * Constructor that creates and run the container with the corresponding commands based on provided configuration. * * @param dockerContainerConfig parameters to run a container. - * @param commands to be run for docker container. + * @param commands to be run for docker container. */ protected ContainerCommandLineITSupport(final DockerContainerConfig dockerContainerConfig, final String commands) { dockerContainerClient = new DockerContainerClient(dockerContainerConfig); diff --git a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/conda/CondaCommandLineITSupport.java b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/conda/CondaCommandLineITSupport.java index fa0a8b934f..7d8ec7ed4e 100644 --- a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/conda/CondaCommandLineITSupport.java +++ b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/conda/CondaCommandLineITSupport.java @@ -74,8 +74,7 @@ public List listInstalled() { * * @return List of {@link String} of output from execution */ - public List condaSearchPackages(final String name) - { + public List condaSearchPackages(final String name) { return clearTerminalOutputHeader(condaExec("search " + name)); } @@ -85,16 +84,14 @@ public List condaSearchPackages(final String name) * @param name name of the package * @return terminal output */ - public List removePackage(final String name) - { + public List removePackage(final String name) { return condaExec("remove -y --name " + name); } /** * Clean Conda client cache */ - public List clearClientCache() - { + public List clearClientCache() { return condaExec("clean -a -y"); // -a = all ; -y - do not ask accept } diff --git a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/framework/DockerContainerConfig.java b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/framework/DockerContainerConfig.java index 0b9416366a..1af3da4480 100644 --- a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/framework/DockerContainerConfig.java +++ b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/framework/DockerContainerConfig.java @@ -50,7 +50,7 @@ public class DockerContainerConfig private DockerContainerConfig(@Nullable final String image, @Nullable final Path dockerfile) { checkArgument(!(image == null && dockerfile == null), "Image name or Dockerfile should be presented"); - checkArgument(!(image !=null && dockerfile != null), "Image name and Dockerfile should not be presented both"); + checkArgument(!(image != null && dockerfile != null), "Image name and Dockerfile should not be presented both"); this.image = image; this.dockerfile = dockerfile; } diff --git a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/maven/MavenCommandLineITSupport.java b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/maven/MavenCommandLineITSupport.java index df857da4f1..a8a9d5d462 100644 --- a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/maven/MavenCommandLineITSupport.java +++ b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/maven/MavenCommandLineITSupport.java @@ -37,39 +37,43 @@ public MavenCommandLineITSupport(final DockerContainerConfig dockerContainerConf super(dockerContainerConfig); } - public Optional> cleanInstall(final String directory, - final String url) + public Optional> cleanInstall( + final String directory, + final String url) { return cleanInstall(directory, url, randomUUID().toString(), randomUUID().toString(), "1.0.0"); } - public Optional> cleanInstall(final String directory, - final String repositoryUrl, - final String groupId, - final String artifactId, - final String version) + public Optional> cleanInstall( + final String directory, + final String repositoryUrl, + final String groupId, + final String artifactId, + final String version) { updatePom(directory, repositoryUrl, groupId, artifactId, version); return exec(CD + directory + " && " + MVN + "clean install"); } - public Optional> deploy(final String directory, - final String repositoryUrl, - final String groupId, - final String artifactId, - final String version) + public Optional> deploy( + final String directory, + final String repositoryUrl, + final String groupId, + final String artifactId, + final String version) { updatePom(directory, repositoryUrl, groupId, artifactId, version); return exec(CD + directory + " && " + MVN + "clean deploy -Dmaven.test.skip=true"); } - private void updatePom(final String directory, - final String repositoryUrl, - final String groupId, - final String artifactId, - final String version) + private void updatePom( + final String directory, + final String repositoryUrl, + final String groupId, + final String artifactId, + final String version) { String pomTemplate = directory + "/pom-template.xml"; String pom = directory + "/pom.xml"; diff --git a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/IdpCommandLineITSupport.java b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/IdpCommandLineITSupport.java index 0a26fd84f6..afdab10600 100644 --- a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/IdpCommandLineITSupport.java +++ b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/IdpCommandLineITSupport.java @@ -59,7 +59,7 @@ private boolean isIdpServerAvailable() { connection.getInputStream(); return true; } - catch (Exception ignore) { //NOSONAR + catch (Exception ignore) { // NOSONAR return false; } finally { diff --git a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/SamlIdpITConfigFactory.java b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/SamlIdpITConfigFactory.java index b4588a1cff..08b69f8191 100644 --- a/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/SamlIdpITConfigFactory.java +++ b/testsuite/nexus-docker-testsupport/src/main/java/com/sonatype/nexus/docker/testsupport/saml/idp/SamlIdpITConfigFactory.java @@ -18,7 +18,8 @@ public class SamlIdpITConfigFactory { - private SamlIdpITConfigFactory() { } + private SamlIdpITConfigFactory() { + } public static DockerContainerConfig createKeycloakConfig( final String image, diff --git a/testsuite/nexus-it-suite-data/pom.xml b/testsuite/nexus-it-suite-data/pom.xml index 454d76d6d2..c8a10716f1 100644 --- a/testsuite/nexus-it-suite-data/pom.xml +++ b/testsuite/nexus-it-suite-data/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-it-suite-data diff --git a/testsuite/nexus-it-suite/pom.xml b/testsuite/nexus-it-suite/pom.xml index 0fbec8ede9..7050eb1233 100644 --- a/testsuite/nexus-it-suite/pom.xml +++ b/testsuite/nexus-it-suite/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-it-suite diff --git a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawGroupIT.java b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawGroupIT.java index 599c04be35..cd4422cec3 100644 --- a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawGroupIT.java +++ b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawGroupIT.java @@ -79,7 +79,7 @@ public void memberContentIsFound() throws Exception { File testFile = resolveTestFile(TEST_CONTENT); hosted1.put(TEST_PATH, ContentType.TEXT_PLAIN, testFile); - assertThat(string(groupClient.get(TEST_PATH)), is(new String(Files.readAllBytes(testFile.toPath())))); + assertThat(string(groupClient.get(TEST_PATH)), is(new String(Files.readAllBytes(testFile.toPath())))); } /** @@ -91,7 +91,7 @@ public void firstSuccessfulResponseWins() throws Exception { hosted1.put(TEST_PATH, ContentType.TEXT_PLAIN, testFile); hosted2.put(TEST_PATH, ContentType.TEXT_PLAIN, resolveTestFile(TEST_CONTENT2)); - assertThat(string(groupClient.get(TEST_PATH)), is(new String(Files.readAllBytes(testFile.toPath())))); + assertThat(string(groupClient.get(TEST_PATH)), is(new String(Files.readAllBytes(testFile.toPath())))); } /** diff --git a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawHostedIT.java b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawHostedIT.java index 5810f45d06..e6a7310598 100644 --- a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawHostedIT.java +++ b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawHostedIT.java @@ -128,7 +128,8 @@ public void lastDownloadedIsNotUpdatedWhenFrequencyNotExceeded() throws Exceptio @Test public void inlineContentDispositionSetsHeader() throws Exception { Configuration configuration = repos.createHosted(testName.getMethodName(), "raw-hosted", "ALLOW_ONCE", true); - configuration.attributes("raw").set(ContentDispositionHandler.CONTENT_DISPOSITION_CONFIG_KEY, ContentDisposition.INLINE.name()); + configuration.attributes("raw") + .set(ContentDispositionHandler.CONTENT_DISPOSITION_CONFIG_KEY, ContentDisposition.INLINE.name()); Repository repository = repos.createRepository(configuration); @@ -146,7 +147,8 @@ public void inlineContentDispositionSetsHeader() throws Exception { @Test public void attachmentContentDispositionSetsHeader() throws Exception { Configuration configuration = repos.createHosted(testName.getMethodName(), "raw-hosted", "ALLOW_ONCE", true); - configuration.attributes("raw").set(ContentDispositionHandler.CONTENT_DISPOSITION_CONFIG_KEY, ContentDisposition.ATTACHMENT.name()); + configuration.attributes("raw") + .set(ContentDispositionHandler.CONTENT_DISPOSITION_CONFIG_KEY, ContentDisposition.ATTACHMENT.name()); Repository repository = repos.createRepository(configuration); diff --git a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawMavenSiteIT.java b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawMavenSiteIT.java index ac041ec0f0..c879376b28 100644 --- a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawMavenSiteIT.java +++ b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawMavenSiteIT.java @@ -39,6 +39,7 @@ public class RawMavenSiteIT extends RawITSupport { private static String INDEX_HTML = "index.html"; + private Repository repository; private RawClient client; @@ -90,7 +91,7 @@ public void setLastDownloadOnGet_IndexHtmlForwardHandler() throws Exception { assertThat(getLastDownloadedTime(repository, INDEX_HTML), is(equalTo(null))); - //This forces a path through the IndexHtmlForwardHandler + // This forces a path through the IndexHtmlForwardHandler final HttpResponse index = client.get(""); assertThat(status(index), is(HttpStatus.OK)); @@ -109,10 +110,10 @@ private void runMavenSite() throws Exception { mavenDeployment.setProjectTemplateDir(resolveTestFile(project)); mavenDeployment.setProjectDir(resolveBaseFile("target/raw-mvn-site/" + project).getAbsoluteFile()); mavenDeployment.setProxyUrl(new URL(nexusUrl, "/repository/maven-public")); - mavenDeployment.setDeployUrl(siteUrl); // dummy deployUrl since we only run the site + mavenDeployment.setDeployUrl(siteUrl); // dummy deployUrl since we only run the site mavenDeployment.setSiteUrl(siteUrl); mavenDeployment.init(); - new MavenRunner().run(mavenDeployment, "clean", "site:site", "site:deploy"); + new MavenRunner().run(mavenDeployment, "clean", "site:site", "site:deploy"); } } diff --git a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawProxyOfHostedIT.java b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawProxyOfHostedIT.java index aa74fcaf1e..80754ebd86 100644 --- a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawProxyOfHostedIT.java +++ b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawProxyOfHostedIT.java @@ -168,7 +168,8 @@ public void status503ViaProxyProduces503() throws Exception { @Test public void remoteHasNoContent() throws Exception { Server server = Server.withPort(PortAllocator.nextFreePort()) - .serve("/*").withBehaviours(Behaviours.error(HttpStatus.NOT_FOUND)) + .serve("/*") + .withBehaviours(Behaviours.error(HttpStatus.NOT_FOUND)) .start(); try { proxyClient = rawClient(repos.createRawProxy(testName.getMethodName(), server.getUrl().toExternalForm())); @@ -210,7 +211,9 @@ public void rootShouldServeRemoteIndexHtmContentIfPresent() throws Exception { private void responseViaProxyProduces(final int upstreamStatus, final int downstreamStatus) throws Exception { Server server = - Server.withPort(PortAllocator.nextFreePort()).serve("/*").withBehaviours(Behaviours.error(upstreamStatus)) + Server.withPort(PortAllocator.nextFreePort()) + .serve("/*") + .withBehaviours(Behaviours.error(upstreamStatus)) .start(); try { proxyClient = rawClient(repos.createRawProxy("raw-test-proxy-" + upstreamStatus + "-" + downstreamStatus, @@ -249,7 +252,8 @@ public void status503ViaGroupProduces404() throws Exception { @Test public void retrieveRawWhenRemoteOffline() throws Exception { - Server server = Server.withPort(PortAllocator.nextFreePort()).serve("/*") + Server server = Server.withPort(PortAllocator.nextFreePort()) + .serve("/*") .withBehaviours(content("Response")) .start(); try { @@ -270,60 +274,52 @@ public void proxyNarrowNoBreakSpaceNNBSP() { "/repository/" + hostedRepo.getName() + "/some/folder/begin\u202Fend.txt", "content", "admin", - "admin123" - ).getStatus(), - is(201) - ); + "admin123") + .getStatus(), + is(201)); assertThat( componentAssetTestHelper.countComponents(proxyRepo), - is(0) - ); + is(0)); assertThat( componentAssetTestHelper.countAssets(proxyRepo), - is(0) - ); + is(0)); assertThat( componentAssetTestHelper.countComponents(hostedRepo), - is(1) - ); + is(1)); assertThat( componentAssetTestHelper.countAssets(hostedRepo), - is(1) - ); + is(1)); assertThat( restTestHelper .get( "/repository/" + proxyRepo.getName() + "/some/folder/begin\u202Fend.txt", "admin", - "admin123" - ).getStatus(), - is(200) - ); + "admin123") + .getStatus(), + is(200)); assertThat( componentAssetTestHelper.countComponents(proxyRepo), - is(1) - ); + is(1)); assertThat( componentAssetTestHelper.countAssets(proxyRepo), - is(1) - ); + is(1)); assertThat( componentAssetTestHelper.componentExists( proxyRepo, "/some/folder", "/some/folder/begin\u202Fend.txt", - "" - ), - is(true) - ); + ""), + is(true)); } private void responseViaGroupProduces(final int upstreamStatus, final int downstreamStatus) throws Exception { Server server = - Server.withPort(PortAllocator.nextFreePort()).serve("/*").withBehaviours(Behaviours.error(upstreamStatus)) + Server.withPort(PortAllocator.nextFreePort()) + .serve("/*") + .withBehaviours(Behaviours.error(upstreamStatus)) .start(); try { Repository proxy = repos.createRawProxy("raw-test-proxy-" + upstreamStatus + "-" + downstreamStatus, diff --git a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawRestoreBlobIT.java b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawRestoreBlobIT.java index a07c70b433..730f5d9f0b 100644 --- a/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawRestoreBlobIT.java +++ b/testsuite/nexus-it-suite/src/test/java/org/sonatype/nexus/testsuite/raw/RawRestoreBlobIT.java @@ -70,21 +70,27 @@ public void setup() throws Exception { testData.addDirectory(resolveBaseFile("target/it-resources/raw")); blobStoreName = testName.getMethodName(); nexus.blobStores().create(blobStoreName); - hostedRepository = nexus.repositories().raw().hosted(repoName("hosted")) + hostedRepository = nexus.repositories() + .raw() + .hosted(repoName("hosted")) .withBlobstore(blobStoreName) .create(); proxyServer = Server.withPort(PortAllocator.nextFreePort()).start(); proxyServer.serve("/" + TEST_CONTENT).withBehaviours(resolveFile(TEST_CONTENT)); - proxyRepository = nexus.repositories().raw().proxy(repoName("proxy")) + proxyRepository = nexus.repositories() + .raw() + .proxy(repoName("proxy")) .withRemoteUrl("http://localhost:" + proxyServer.getPort() + "/") .withBlobstore(blobStoreName) .create(); File testFile = resolveTestFile(TEST_CONTENT); - assertThat(nexus.rest().put(path(hostedRepository, TEST_CONTENT), - FileUtils.readFileToString(testFile, StandardCharsets.UTF_8), "admin", "admin123"), hasStatus(HttpStatus.CREATED)); + assertThat(nexus.rest() + .put(path(hostedRepository, TEST_CONTENT), + FileUtils.readFileToString(testFile, StandardCharsets.UTF_8), "admin", "admin123"), + hasStatus(HttpStatus.CREATED)); assertThat(nexus.rest().get(path(proxyRepository, TEST_CONTENT)), hasStatus(OK)); @@ -110,7 +116,7 @@ public void testMetadataRestoreWhenOnlyAssetsAreMissing() throws Exception { public void testRestoresMostRecentAsset() throws Exception { // We can't guarantee the order blobs will be processed, so for the test we want to create enough assets that // there is a low chance that the last blob is processed last which would mean our test verifies nothing. - for (int i=0; i<20; i++) { + for (int i = 0; i < 20; i++) { assertThat(nexus.rest().put(path(hostedRepository, TEST_CONTENT), "test" + i, "admin", "admin123"), hasStatus(HttpStatus.CREATED)); } @@ -131,8 +137,7 @@ public void testRestoreFromOtherDatabase() throws Exception { } @Test - public void testDryRunRestore() - { + public void testDryRunRestore() { assertTrue(componentAssetTestHelper.assetExists(proxyRepository, TEST_CONTENT)); restoreTestHelper.simulateComponentAndAssetMetadataLoss(); assertFalse(componentAssetTestHelper.assetExists(proxyRepository, TEST_CONTENT)); @@ -141,8 +146,7 @@ public void testDryRunRestore() } @Test - public void testNotDryRunRestore() - { + public void testNotDryRunRestore() { assertTrue(componentAssetTestHelper.assetExists(proxyRepository, TEST_CONTENT)); restoreTestHelper.simulateComponentAndAssetMetadataLoss(); assertFalse(componentAssetTestHelper.assetExists(proxyRepository, TEST_CONTENT)); @@ -186,9 +190,15 @@ private boolean componentExists(final Repository repository, final String name) || componentAssetTestHelper.componentExists(repository, prependIfMissing(name, "/")); } - private boolean assetWithComponentExists(final Repository repository, final String path, final String group, final String name) { + private boolean assetWithComponentExists( + final Repository repository, + final String path, + final String group, + final String name) + { return componentAssetTestHelper.assetWithComponentExists(repository, path, group, name) - || componentAssetTestHelper.assetWithComponentExists(hostedRepository, prependIfMissing(path, "/"), group, prependIfMissing(name, "/")); + || componentAssetTestHelper.assetWithComponentExists(hostedRepository, prependIfMissing(path, "/"), group, + prependIfMissing(name, "/")); } private Content resolveFile(final String filename) { diff --git a/testsuite/nexus-repository-content-testsupport/pom.xml b/testsuite/nexus-repository-content-testsupport/pom.xml index 81408a6437..a29b589960 100644 --- a/testsuite/nexus-repository-content-testsupport/pom.xml +++ b/testsuite/nexus-repository-content-testsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-content-testsupport diff --git a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/FormatClientSupport.java b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/FormatClientSupport.java index 1f54c7ba78..4af7e6176f 100644 --- a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/FormatClientSupport.java +++ b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/FormatClientSupport.java @@ -58,8 +58,10 @@ public class FormatClientSupport protected final URI repositoryBaseUri; - public FormatClientSupport(final CloseableHttpClient httpClient, final HttpClientContext httpClientContext, - final URI repositoryBaseUri) + public FormatClientSupport( + final CloseableHttpClient httpClient, + final HttpClientContext httpClientContext, + final URI repositoryBaseUri) { this.httpClient = checkNotNull(httpClient); this.httpClientContext = checkNotNull(httpClientContext); @@ -113,8 +115,10 @@ protected CloseableHttpResponse execute(final HttpUriRequest request, HttpContex return response; } - protected CloseableHttpResponse execute(final HttpUriRequest request, String username, String password) - throws IOException + protected CloseableHttpResponse execute( + final HttpUriRequest request, + String username, + String password) throws IOException { log.debug("Authorizing request for {} using credentials provided for username: {}", request.getURI(), username); diff --git a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawClient.java b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawClient.java index 9230afb62a..5dff2260c8 100644 --- a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawClient.java +++ b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawClient.java @@ -38,9 +38,10 @@ public class RawClient extends FormatClientSupport { - public RawClient(final CloseableHttpClient httpClient, - final HttpClientContext httpClientContext, - final URI repositoryBaseUri) + public RawClient( + final CloseableHttpClient httpClient, + final HttpClientContext httpClientContext, + final URI repositoryBaseUri) { super(httpClient, httpClientContext, repositoryBaseUri); } @@ -72,7 +73,8 @@ public CloseableHttpResponse delete(final String path) throws Exception { public CloseableHttpResponse mkcol(final String path) throws Exception { HttpUriRequest mkcolRequest = RequestBuilder.create(HttpMethods.MKCOL) - .setUri(resolve(path)).build(); + .setUri(resolve(path)) + .build(); return execute(mkcolRequest); } } diff --git a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawITSupport.java b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawITSupport.java index 950e9d0104..fe74a833f2 100644 --- a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawITSupport.java +++ b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/raw/RawITSupport.java @@ -64,12 +64,12 @@ protected RawClient rawClient(final Repository repository) throws Exception { checkNotNull(repository); return rawClient(repositoryBaseUrl(repository)); } + protected RawClient rawClient(final URL repositoryUrl) throws Exception { return new RawClient( clientBuilder(repositoryUrl).build(), clientContext(), - repositoryUrl.toURI() - ); + repositoryUrl.toURI()); } protected void uploadAndDownload(final RawClient rawClient, final String file) throws Exception { @@ -81,6 +81,7 @@ protected void uploadAndDownload(final RawClient rawClient, final String file) t MatcherAssert.assertThat(FormatClientSupport.status(rawClient.delete(file)), Matchers.is(HttpStatus.NO_CONTENT)); - assertThat("content should be deleted", FormatClientSupport.status(rawClient.get(file)), Matchers.is(HttpStatus.NOT_FOUND)); + assertThat("content should be deleted", FormatClientSupport.status(rawClient.get(file)), + Matchers.is(HttpStatus.NOT_FOUND)); } } diff --git a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/rest/TestSuiteObjectMapperResolver.java b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/rest/TestSuiteObjectMapperResolver.java index 5d1d2f0fdd..a1bb6fa5a5 100644 --- a/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/rest/TestSuiteObjectMapperResolver.java +++ b/testsuite/nexus-repository-content-testsupport/src/main/java/org/sonatype/nexus/content/testsupport/rest/TestSuiteObjectMapperResolver.java @@ -12,7 +12,6 @@ */ package org.sonatype.nexus.content.testsupport.rest; - import java.util.Set; import javax.inject.Inject; @@ -46,8 +45,9 @@ public class TestSuiteObjectMapperResolver private final ObjectMapper objectMapper; @Inject - public TestSuiteObjectMapperResolver(final ComponentXOFactory componentXOFactory, - final Set componentXODeserializerExtensions) + public TestSuiteObjectMapperResolver( + final ComponentXOFactory componentXOFactory, + final Set componentXODeserializerExtensions) { this.objectMapper = new ObjectMapper(); @@ -57,8 +57,7 @@ public TestSuiteObjectMapperResolver(final ComponentXOFactory componentXOFactory this.objectMapper.registerModule(new SimpleModule() // add the deserializer for the ComponentXO class .addDeserializer(ComponentXO.class, new ComponentXODeserializer(componentXOFactory, objectMapper, - componentXODeserializerExtensions)) - ); + componentXODeserializerExtensions))); } @Override diff --git a/testsuite/nexus-repository-testsupport/pom.xml b/testsuite/nexus-repository-testsupport/pom.xml index 565afe4444..6c8e0b0fcf 100644 --- a/testsuite/nexus-repository-testsupport/pom.xml +++ b/testsuite/nexus-repository-testsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT nexus-repository-testsupport diff --git a/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelper.java b/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelper.java index 2dea7383f4..25032f22ee 100644 --- a/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelper.java +++ b/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelper.java @@ -12,12 +12,14 @@ */ package org.sonatype.nexus.testsuite.testsupport.blobstore.restore; +import java.util.List; import java.util.Map; import java.util.function.Predicate; import javax.annotation.Nullable; import org.sonatype.nexus.blobstore.api.BlobId; +import org.sonatype.nexus.blobstore.api.BlobStore; import org.sonatype.nexus.repository.Repository; /** @@ -38,6 +40,80 @@ public interface BlobstoreRestoreTestHelper String DRY_RUN = "dryRun"; + String PLAN_RECONCILE_TYPE_ID = "blobstore.planReconciliation"; + + String EXECUTE_RECONCILE_TYPE_ID = "blobstore.executeReconciliationPlan"; + + /** + * Get the blob ids of the assets + */ + List getAssetBlobId(); + + /** + * Deletes asset blob + * + * @param repository the name of the repository + * @param blobStore blobStore where blob is stored + * @param blobId blobId to delete + */ + void deleteAssetBlob(Repository repository, BlobStore blobStore, BlobId blobId); + + /** + * Verifies existence of asset blob + * + * @param repository the name of the blobstore + * @param blobStore blobStore where blob is stored + * @param blobId blobId to read + * + * @return {@code true} if the asset blob exists + */ + boolean assetBlobExists(Repository repository, BlobStore blobStore, BlobId blobId); + + /** + * Clean tables from previous data + */ + void truncateTables(); + + /** + * Deletes the file with specified extension + * + * @param blobStorageName the name of the blobstore + * @param extension extension of the file to delete + */ + void simulateFileLoss(String blobStorageName, String extension); + + /** + * Asserts that the reconcile plan exists with specific type and action + * + * @param type the type of the plan + * @param action the action of the plan + */ + boolean assertReconcilePlanExists(String type, String action); + + /** + * Asserts that the reconcile plan exists with specific set of parameters + * + * @param type the type of the plan + * @param action the action of the plan + * @param blobIds list of blob ids to check + */ + boolean assertReconcilePlanExists(String type, String action, List blobIds); + + /** + * Asserts that the property files exist for the specified blobstore + * + * @param blobStorageName the name of the blobstore + */ + boolean assertPropertyFilesExist(String blobStorageName); + + /** + * Run the reconcile task with the specified wait for task timeout + * + * @param blobstoreName the name of the blobstore + * @param timeout the timeout to wait for the task to complete + */ + void runReconcileTaskWithTimeout(final String blobstoreName, final long timeout); + void simulateComponentAndAssetMetadataLoss(); void simulateAssetMetadataLoss(); @@ -56,7 +132,7 @@ default void runRestoreMetadataTask(final String blobstoreName) { /** * Run the restore (reconcile) task with the default wait for task timeout and the specified dry run flag * - * @param blobstoreName the name of the blobstore + * @param blobStoreName the name of the blobstore * @param isDryRun when true set dryrun on the task which does not restore assets */ default void runRestoreMetadataTask(final String blobStoreName, final boolean isDryRun) { @@ -68,7 +144,7 @@ default void runRestoreMetadataTask(final String blobStoreName, final boolean is * * @param blobstoreName the name of the blobstore * @param timeout the timeout to wait for the task to complete - * @param isDryRun when true set dryrun on the task which does not restore assets + * @param dryRun when true set dryrun on the task which does not restore assets */ void runRestoreMetadataTaskWithTimeout(final String blobstoreName, final long timeout, final boolean dryRun); @@ -98,8 +174,8 @@ void assertAssetAssociatedWithComponent( String... paths); /** - * Rewrites all the blob names either adding a leading slash, or removing a leading slash to simulate blobs - * which were written by the other database. + * Rewrites all the blob names either adding a leading slash, or removing a leading slash to simulate blobs which were + * written by the other database. */ void rewriteBlobNames(); @@ -107,7 +183,6 @@ void assertAssetAssociatedWithComponent( * Retrieve the map of path->blobId for all assets in the provided repository. * * @param pathFilter a predicate which returns true if the asset path should be included in the result. - * */ Map getAssetToBlobIds(Repository repo, Predicate pathFilter); diff --git a/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelperSupport.java b/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelperSupport.java index 32bc131035..26ee443573 100644 --- a/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelperSupport.java +++ b/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/BlobstoreRestoreTestHelperSupport.java @@ -39,7 +39,24 @@ public void runRestoreMetadataTaskWithTimeout(final String blobstoreName, final config.setBoolean(UNDELETE_BLOBS, false); config.setBoolean(INTEGRITY_CHECK, false); TaskInfo taskInfo = taskScheduler.submit(config); - await().atMost(timeout, SECONDS).until(() -> - taskInfo.getLastRunState() != null && taskInfo.getLastRunState().getEndState().equals(OK)); + await().atMost(timeout, SECONDS) + .until(() -> taskInfo.getLastRunState() != null && taskInfo.getLastRunState().getEndState().equals(OK)); + } + + @Override + public void runReconcileTaskWithTimeout(final String blobstoreName, final long timeout) { + TaskConfiguration planingConfig = taskScheduler.createTaskConfigurationInstance(PLAN_RECONCILE_TYPE_ID); + planingConfig.setString(BLOB_STORE_NAME_FIELD_ID, blobstoreName); + TaskInfo plabningTaskInfo = taskScheduler.submit(planingConfig); + await().atMost(timeout, SECONDS) + .until(() -> plabningTaskInfo.getLastRunState() != null + && plabningTaskInfo.getLastRunState().getEndState().equals(OK)); + + TaskConfiguration executeConfig = taskScheduler.createTaskConfigurationInstance(EXECUTE_RECONCILE_TYPE_ID); + executeConfig.setString(BLOB_STORE_NAME_FIELD_ID, blobstoreName); + TaskInfo executeTaskInfo = taskScheduler.submit(executeConfig); + await().atMost(timeout, SECONDS) + .until(() -> executeTaskInfo.getLastRunState() != null + && executeTaskInfo.getLastRunState().getEndState().equals(OK)); } } diff --git a/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/DatastoreBlobstoreRestoreTestHelper.java b/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/DatastoreBlobstoreRestoreTestHelper.java index 83e66d8ed8..d8475ef125 100644 --- a/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/DatastoreBlobstoreRestoreTestHelper.java +++ b/testsuite/nexus-repository-testsupport/src/main/java/org/sonatype/nexus/testsuite/testsupport/blobstore/restore/DatastoreBlobstoreRestoreTestHelper.java @@ -12,13 +12,21 @@ */ package org.sonatype.nexus.testsuite.testsupport.blobstore.restore; +import java.io.File; import java.io.IOException; import java.io.UncheckedIOException; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import java.util.Optional; import java.util.function.Predicate; +import java.util.regex.Pattern; import java.util.stream.Collectors; - import javax.annotation.Nullable; import javax.inject.Inject; import javax.inject.Named; @@ -29,8 +37,10 @@ import org.sonatype.nexus.blobstore.api.BlobRef; import org.sonatype.nexus.blobstore.api.BlobStore; import org.sonatype.nexus.blobstore.api.BlobStoreManager; +import org.sonatype.nexus.blobstore.file.FileBlobStore; import org.sonatype.nexus.common.app.FeatureFlag; import org.sonatype.nexus.common.collect.NestedAttributesMap; +import org.sonatype.nexus.datastore.api.DataSessionSupplier; import org.sonatype.nexus.repository.Repository; import org.sonatype.nexus.repository.content.Asset; import org.sonatype.nexus.repository.content.AssetBlob; @@ -41,6 +51,7 @@ import org.sonatype.nexus.repository.content.fluent.FluentComponent; import org.sonatype.nexus.repository.content.fluent.FluentComponentBuilder; import org.sonatype.nexus.repository.content.fluent.FluentComponents; +import org.sonatype.nexus.repository.content.store.AssetBlobStore; import org.sonatype.nexus.repository.content.store.AssetStore; import org.sonatype.nexus.repository.content.store.ComponentStore; import org.sonatype.nexus.repository.content.store.FormatStoreManager; @@ -58,6 +69,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import static org.sonatype.nexus.blobstore.api.BlobRef.DATE_TIME_PATH_FORMATTER; import static org.sonatype.nexus.blobstore.api.BlobStore.BLOB_NAME_HEADER; import static org.sonatype.nexus.blobstore.api.BlobStore.REPO_NAME_HEADER; import static org.sonatype.nexus.common.app.FeatureFlags.DATASTORE_ENABLED; @@ -82,6 +94,9 @@ public class DatastoreBlobstoreRestoreTestHelper @Inject private BlobStoreManager blobstoreManager; + @Inject + private DataSessionSupplier sessionSupplier; + @Override public void simulateComponentAndAssetMetadataLoss() { simulateAssetMetadataLoss(); @@ -110,6 +125,36 @@ public Map getAssetToBlobIds(final Repository repo, final Predic .collect(Collectors.toMap(Asset::path, DatastoreBlobstoreRestoreTestHelper::toBlobId)); } + @Override + public void deleteAssetBlob(final Repository repository, final BlobStore blobStore, final BlobId blobId) { + AssetBlobStore assetBlobStore = getAssetBlobStore(repository); + assetBlobStore.deleteAssetBlobWithAsset(createBlobRef(blobStore, repository, blobId)); + } + + @Override + public boolean assetBlobExists( + final Repository repository, + final BlobStore blobStore, + final BlobId blobId) + { + AssetBlobStore assetBlobStore = getAssetBlobStore(repository); + return assetBlobStore.readAssetBlob(createBlobRef(blobStore, repository, blobId)).isPresent(); + } + + private BlobRef createBlobRef(final BlobStore blobStore, final Repository repository, final BlobId blobId) { + ContentFacetSupport contentFacetSupport = (ContentFacetSupport) repository.facet(ContentFacet.class); + String blobStoreName = blobStore.getBlobStoreConfiguration().getName(); + return new BlobRef( + contentFacetSupport.nodeName(), + blobStoreName, + blobId.asUniqueString(), + blobId.getBlobCreatedRef()); + } + + private AssetBlobStore getAssetBlobStore(final Repository repository) { + return storeManagers.get(repository.getFormat().getValue()).assetBlobStore(getContentStore(repository)); + } + private static BlobId toBlobId(final Asset asset) { return asset.blob() .map(AssetBlob::blobRef) @@ -120,8 +165,10 @@ private static BlobId toBlobId(final Asset asset) { @Override public void simulateAssetMetadataLoss() { manager.browse().forEach(repo -> { - repo.facet(ContentFacet.class).assets().browse(Integer.MAX_VALUE, null) - .forEach(asset -> asset.delete()); + repo.facet(ContentFacet.class) + .assets() + .browse(Integer.MAX_VALUE, null) + .forEach(asset -> asset.delete()); }); } @@ -142,7 +189,8 @@ private int getContentRepositoryId(final Repository repo) { @Override public void assertAssetMatchesBlob(final Repository repo, final String... paths) { stream(paths) - .map(path -> assets(repo).path(prependIfMissing(path, "/")).find() + .map(path -> assets(repo).path(prependIfMissing(path, "/")) + .find() .orElseThrow(() -> new AssertionError("Missing asset: " + path))) .forEach(a -> assetMatch(a, getBlobStore(repo))); } @@ -185,7 +233,7 @@ public void assertComponentInRepository( .version(version) .namespace(namespace) .find(); - assertThat("Missing component " + namespace +":" + name + ":" + version, component.isPresent(), is(true)); + assertThat("Missing component " + namespace + ":" + name + ":" + version, component.isPresent(), is(true)); } @Override @@ -224,7 +272,7 @@ public void assertAssetAssociatedWithComponent( componentBuilder = componentBuilder.namespace(namespace); } Optional component = componentBuilder.find(); - assertThat("Missing component " + namespace +":" + name + ":" + version, component.isPresent(), is(true)); + assertThat("Missing component " + namespace + ":" + name + ":" + version, component.isPresent(), is(true)); for (String path : paths) { Optional asset = component.get().asset(prependIfMissing(path, "/")).find(); @@ -239,7 +287,9 @@ public void rewriteBlobNames() { return; } ContentFacet content = repo.facet(ContentFacet.class); - content.assets().browse(Integer.MAX_VALUE, null).stream() + content.assets() + .browse(Integer.MAX_VALUE, null) + .stream() .map(Asset::blob) .filter(Optional::isPresent) .map(Optional::get) @@ -258,12 +308,169 @@ public void rewriteBlobNames() { } } else { - fail("Found missing name or unexpected name: " + name + " in repository: " + headers.get(REPO_NAME_HEADER)); + fail("Found missing name or unexpected name: " + name + " in repository: " + + headers.get(REPO_NAME_HEADER)); } }); }); } + @Override + public boolean assertReconcilePlanExists(String type, String action) { + List blobIds = getAssetBlobId(); + for (BlobId blobId : blobIds) { + if (!assertReconcilePlanExistWithParameterForProvidedBlobIds(blobId.asUniqueString(), type, action)) { + return false; + } + } + return true; + } + + @Override + public void simulateFileLoss(String blobStorageName, String extension) { + try { + BlobStore blobstore = blobstoreManager.get(blobStorageName); + String absoluteBlobDir = String.valueOf(((FileBlobStore) blobstore).getAbsoluteBlobDir()); + List blobIds = getAssetBlobId(); + blobIds.forEach(blobId -> { + String filePath = getFileAbsolutePathForBlobIdRef(blobId, extension, absoluteBlobDir); + deleteFile(filePath); + }); + } + catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public boolean assertReconcilePlanExists(String type, String action, List blobIds) { + for (BlobId blobId : blobIds) { + if (!assertReconcilePlanExistWithParameterForProvidedBlobIds(blobId.asUniqueString(), type, action)) { + return false; + } + } + return true; + } + + @Override + public boolean assertPropertyFilesExist(String blobStorageName) { + try { + BlobStore blobstore = blobstoreManager.get(blobStorageName); + String absoluteBlobDir = String.valueOf(((FileBlobStore) blobstore).getAbsoluteBlobDir()); + List blobIds = getAssetBlobId(); + for (BlobId blobId : blobIds) { + String filePath = getFileAbsolutePathForBlobIdRef(blobId, ".properties", absoluteBlobDir); + if (!isFileExist(filePath)) { + return false; + } + } + return true; + } + catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public List getAssetBlobId() { + List blobIds = new ArrayList<>(); + manager.browse().forEach(repo -> { + repo.facet(ContentFacet.class) + .assets() + .browse(Integer.MAX_VALUE, null) + .forEach(asset -> { + BlobId blobId = toBlobId(asset); + blobIds.add(blobId); + }); + }); + return blobIds; + } + + @Override + public void truncateTables() { + try (Connection connection = sessionSupplier.openConnection(DEFAULT_DATASTORE_NAME)) { + connection.setAutoCommit(false); + + try ( + PreparedStatement ps1 = connection.prepareStatement("TRUNCATE TABLE reconcile_plan CASCADE;"); + PreparedStatement ps2 = connection.prepareStatement("TRUNCATE TABLE reconcile_plan_details CASCADE;"); + PreparedStatement ps3 = connection.prepareStatement("TRUNCATE TABLE raw_asset CASCADE;"); + PreparedStatement ps4 = connection.prepareStatement("TRUNCATE TABLE raw_asset_blob CASCADE;"); + PreparedStatement ps5 = connection.prepareStatement("TRUNCATE TABLE raw_component CASCADE;")) { + ps1.executeUpdate(); + ps2.executeUpdate(); + ps3.executeUpdate(); + ps4.executeUpdate(); + ps5.executeUpdate(); + + connection.commit(); + } + catch (SQLException e) { + throw new RuntimeException(e); + } + } + catch (SQLException e) { + throw new RuntimeException("Error managing the connection: " + e.getMessage(), e); + } + } + + private boolean isFileExist(String filePath) { + File file = new File(filePath); + return file.exists() && file.isFile(); + } + + private void deleteFile(String filePath) { + File file = new File(filePath); + if (file.exists() && file.isFile()) { + if (!file.delete()) { + throw new RuntimeException("Failed to delete file: " + filePath); + } + } + } + + private String getFileAbsolutePathForBlobIdRef(BlobId blobId, String extension, String absolutePath) { + OffsetDateTime blobCreationTime = blobId.getBlobCreatedRef(); + String datePath = blobCreationTime.format(DATE_TIME_PATH_FORMATTER); + String pathInContentDirectory = + datePath + "/" + Pattern.compile("[.\\\\:/]").matcher(blobId.asUniqueString()).replaceAll("-"); + return absolutePath + "/content/" + pathInContentDirectory + extension; + } + + private boolean assertReconcilePlanExistWithParameterForProvidedBlobIds(String blobId, String type, String action) { + try { + PreparedStatement ps = null; + try (Connection connection = sessionSupplier.openConnection(DEFAULT_DATASTORE_NAME)) { + String sql = "SELECT rpd.* FROM reconcile_plan_details rpd \n" + + "join reconcile_plan rp on rp.id = rpd.plan_id \n" + + "WHERE rpd.blob_id = ? \n" + + "order by rp.started desc limit 1;"; + + ps = connection.prepareStatement(sql); + ps.setString(1, blobId); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + assertThat(rs.getString("type"), equalTo(type)); + assertThat(rs.getString("action"), equalTo(action)); + assertThat(rs.getString("state"), equalTo("EXECUTED")); + return true; + } + else { + return false; + } + } + catch (SQLException e) { + throw new RuntimeException(e); + } + finally { + ps.close(); + } + } + catch (SQLException ex) { + throw new RuntimeException("Script generation failed", ex); + } + } + private FluentAssets assets(final Repository repo) { return repo.facet(ContentFacet.class).assets(); } diff --git a/testsuite/pom.xml b/testsuite/pom.xml index a043231475..61cbef6f42 100644 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.testsuite diff --git a/thirdparty-bundles/elasticsearch/pom.xml b/thirdparty-bundles/elasticsearch/pom.xml index daf4c4d5d0..325d4f3882 100644 --- a/thirdparty-bundles/elasticsearch/pom.xml +++ b/thirdparty-bundles/elasticsearch/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.bundles nexus-thirdparty-bundles - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.bundles.elasticsearch diff --git a/thirdparty-bundles/pom.xml b/thirdparty-bundles/pom.xml index da77680280..10da8f39fe 100644 --- a/thirdparty-bundles/pom.xml +++ b/thirdparty-bundles/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT org.sonatype.nexus.bundles @@ -41,7 +41,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT import @@ -50,7 +50,7 @@ org.sonatype.nexus.bundles org.sonatype.nexus.bundles.elasticsearch - 3.75.0-SNAPSHOT + 3.76.0-SNAPSHOT diff --git a/yarn.lock b/yarn.lock index 107faa8555..7b0660dd82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1438,12 +1438,12 @@ __metadata: linkType: hard "@babel/runtime-corejs3@npm:^7.18.9": - version: 7.24.4 - resolution: "@babel/runtime-corejs3@npm:7.24.4" + version: 7.26.0 + resolution: "@babel/runtime-corejs3@npm:7.26.0" dependencies: core-js-pure: ^3.30.2 regenerator-runtime: ^0.14.0 - checksum: 0c2e7c477de3dbf5cc6f2434cee3d78a34d87e8f1e2ea65840eb948d00f7d6968e0ef055449adf372a39d6214f8b9b2532506149b9d0e7ea3d09b1b84678ae6c + checksum: c6c5adac03e33aa4b5bb636a677aa2a6e400b91d91aac5674448d20af4100b80a8bedfb742338e4236e22c092d3edeb27210efdf48bd13ec353bd899f097ff41 languageName: node linkType: hard @@ -1456,7 +1456,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.23.6 resolution: "@babel/runtime@npm:7.23.6" dependencies: @@ -1465,6 +1465,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.12.1": + version: 7.26.0 + resolution: "@babel/runtime@npm:7.26.0" + dependencies: + regenerator-runtime: ^0.14.0 + checksum: c8e2c0504ab271b3467a261a8f119bf2603eb857a0d71e37791f4e3fae00f681365073cc79f141ddaa90c6077c60ba56448004ad5429d07ac73532be9f7cf28a + languageName: node + linkType: hard + "@babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.23.6": version: 7.23.8 resolution: "@babel/runtime@npm:7.23.8" @@ -2344,150 +2353,174 @@ __metadata: languageName: node linkType: hard -"@nivo/annotations@npm:0.79.1": - version: 0.79.1 - resolution: "@nivo/annotations@npm:0.79.1" +"@nivo/annotations@npm:0.85.1": + version: 0.85.1 + resolution: "@nivo/annotations@npm:0.85.1" dependencies: - "@nivo/colors": 0.79.1 - "@react-spring/web": 9.3.1 + "@nivo/colors": 0.85.1 + "@nivo/core": 0.85.1 + "@react-spring/web": 9.4.5 || ^9.7.2 + "@types/prop-types": ^15.7.2 lodash: ^4.17.21 + prop-types: ^15.7.2 peerDependencies: - "@nivo/core": 0.79.0 - react: ">= 16.14.0 < 18.0.0" - checksum: 36b94fc65d82af3657967f8ba0a30ff888f1780e0cd17f39b3b00d5bc042bf9a66d78671baafa139c0caf804ac3c6fd8c6da41a61a0cb3f8cb0952eddb55605b + react: ">= 16.14.0 < 19.0.0" + checksum: 819fc7f6c5ace78446d616b4abf5989e228696584e72446633eb9ff4ae35fa3783810984756aeb3eac0a8cda024d274535487927cbaf5f14d5864d453cf999fc languageName: node linkType: hard -"@nivo/axes@npm:0.79.0": - version: 0.79.0 - resolution: "@nivo/axes@npm:0.79.0" +"@nivo/axes@npm:0.85.1": + version: 0.85.1 + resolution: "@nivo/axes@npm:0.85.1" dependencies: - "@nivo/scales": 0.79.0 - "@react-spring/web": 9.3.1 + "@nivo/core": 0.85.1 + "@nivo/scales": 0.85.1 + "@react-spring/web": 9.4.5 || ^9.7.2 + "@types/d3-format": ^1.4.1 + "@types/d3-time-format": ^2.3.1 + "@types/prop-types": ^15.7.2 d3-format: ^1.4.4 d3-time-format: ^3.0.0 + prop-types: ^15.7.2 peerDependencies: - "@nivo/core": 0.79.0 - prop-types: ">= 15.5.10 < 16.0.0" - react: ">= 16.14.0 < 18.0.0" - checksum: 8f83a1b5623289c5e901e99b708c8326d758fcc64a8687954c95930c6f584599b0c76f8c5b5579e7208348c096a6c12a73736b0d7cb7cb8140107f0f210749ca + react: ">= 16.14.0 < 19.0.0" + checksum: 87ef575cb946326d6af6319eb3e4d4017dd728e199626a20658be6c76272dca3f20bb79db693a29cf1e4844a57af6b4fc59f34b1bb8880b6e8ce408de9960461 languageName: node linkType: hard -"@nivo/colors@npm:0.79.1": - version: 0.79.1 - resolution: "@nivo/colors@npm:0.79.1" +"@nivo/colors@npm:0.85.1": + version: 0.85.1 + resolution: "@nivo/colors@npm:0.85.1" dependencies: - d3-color: ^2.0.0 - d3-scale: ^3.2.3 - d3-scale-chromatic: ^2.0.0 + "@nivo/core": 0.85.1 + "@types/d3-color": ^3.0.0 + "@types/d3-scale": ^4.0.8 + "@types/d3-scale-chromatic": ^3.0.0 + "@types/prop-types": ^15.7.2 + d3-color: ^3.1.0 + d3-scale: ^4.0.2 + d3-scale-chromatic: ^3.0.0 lodash: ^4.17.21 + prop-types: ^15.7.2 peerDependencies: - "@nivo/core": 0.79.0 - prop-types: ">= 15.5.10 < 16.0.0" - react: ">= 16.14.0 < 18.0.0" - checksum: a6ed80b2d8e03ccc1b1a5d16d6bb06150067c01b259e7cf077638cf6bffb543ae2aadd6077add84aa62d6428d48259f52e816d63a34d2c7847cc7dc12317e271 + react: ">= 16.14.0 < 19.0.0" + checksum: e0874d1905a61ddced2195590200ad2afc49e8a4198480c9aa33aae7460f7c9907a57a5585e65db8a99baaaaa7fb8c380059646f3f189bde51f888258a57fcba languageName: node linkType: hard -"@nivo/core@npm:^0.79.0": - version: 0.79.0 - resolution: "@nivo/core@npm:0.79.0" +"@nivo/core@npm:0.85.1, @nivo/core@npm:^0.85.0": + version: 0.85.1 + resolution: "@nivo/core@npm:0.85.1" dependencies: - "@nivo/recompose": 0.79.0 - "@react-spring/web": 9.3.1 - d3-color: ^2.0.0 + "@nivo/recompose": 0.85.0 + "@nivo/tooltip": 0.85.1 + "@react-spring/web": 9.4.5 || ^9.7.2 + "@types/d3-shape": ^2.0.0 + d3-color: ^3.1.0 d3-format: ^1.4.4 - d3-interpolate: ^2.0.1 - d3-scale: ^3.2.3 - d3-scale-chromatic: ^2.0.0 + d3-interpolate: ^3.0.1 + d3-scale: ^4.0.2 + d3-scale-chromatic: ^3.0.0 d3-shape: ^1.3.5 d3-time-format: ^3.0.0 lodash: ^4.17.21 + prop-types: ^15.7.2 peerDependencies: - "@nivo/tooltip": 0.79.0 - prop-types: ">= 15.5.10 < 16.0.0" - react: ">= 16.14.0 < 18.0.0" - checksum: 371fa0fd897cf1722e7705e6f58154d5e8efad1f68df2b577c6b26c9261a9f4e02afd506a77bc9041bceec539911f9dad764a8dfdd792ba694785687cd6ad1bd + react: ">= 16.14.0 < 19.0.0" + checksum: 67e4c301d53b4d090d307803a3f805f4b45e719574c14b939272d46442cc8b1d7a45c431e5fdb872345a08fe2213df50f7d286d848f7c33d68c2e61ee889ebc8 languageName: node linkType: hard -"@nivo/legends@npm:0.79.1": - version: 0.79.1 - resolution: "@nivo/legends@npm:0.79.1" +"@nivo/legends@npm:0.85.1": + version: 0.85.1 + resolution: "@nivo/legends@npm:0.85.1" + dependencies: + "@nivo/colors": 0.85.1 + "@nivo/core": 0.85.1 + "@types/d3-scale": ^4.0.8 + "@types/prop-types": ^15.7.2 + d3-scale: ^4.0.2 + prop-types: ^15.7.2 peerDependencies: - "@nivo/core": 0.79.0 - prop-types: ">= 15.5.10 < 16.0.0" - react: ">= 16.14.0 < 18.0.0" - checksum: 1f4bb8da28352d81771d50ce6d5929c9fefe1de9f682cd537e4a718c39828aba3df0c8a50887467571d79a36e329e41b0699c1cd9e14fd6e98f0d5771e887b8b + react: ">= 16.14.0 < 19.0.0" + checksum: b25fb671dde493ae74606a4f6e96ae7435c97597e8ce4f0807e29a09417ccffbdeb3a9ebf2e869e7f16ea984eb8e94a9cd1842663b17c7c739a540251eb0af97 languageName: node linkType: hard -"@nivo/line@npm:^0.79.0": - version: 0.79.1 - resolution: "@nivo/line@npm:0.79.1" +"@nivo/line@npm:^0.85.0": + version: 0.85.1 + resolution: "@nivo/line@npm:0.85.1" dependencies: - "@nivo/annotations": 0.79.1 - "@nivo/axes": 0.79.0 - "@nivo/colors": 0.79.1 - "@nivo/legends": 0.79.1 - "@nivo/scales": 0.79.0 - "@nivo/tooltip": 0.79.0 - "@nivo/voronoi": 0.79.0 - "@react-spring/web": 9.3.1 + "@nivo/annotations": 0.85.1 + "@nivo/axes": 0.85.1 + "@nivo/colors": 0.85.1 + "@nivo/core": 0.85.1 + "@nivo/legends": 0.85.1 + "@nivo/scales": 0.85.1 + "@nivo/tooltip": 0.85.1 + "@nivo/voronoi": 0.85.1 + "@react-spring/web": 9.4.5 || ^9.7.2 d3-shape: ^1.3.5 + prop-types: ^15.7.2 peerDependencies: - "@nivo/core": 0.79.0 - prop-types: ">= 15.5.10 < 16.0.0" - react: ">= 16.14.0 < 18.0.0" - checksum: 3341c70df08d275c57d47e8f7f2eb89c0b584e45971188289e0d5c5a38988650c0fc4e22b2ca51ae4f1ddc4083b718f038a12f2becad7185b79b2fc1cc72a100 + react: ">= 16.14.0 < 19.0.0" + checksum: 8921cf31422c925e5e39ecce75ab91ac2e3e5c3a212f672ac8998931aa34e21eb0ac83fbb54bfc4a3e86ed0b5372999bdbf5ef9b4686a3d95d1640e2015dffbc languageName: node linkType: hard -"@nivo/recompose@npm:0.79.0": - version: 0.79.0 - resolution: "@nivo/recompose@npm:0.79.0" +"@nivo/recompose@npm:0.85.0": + version: 0.85.0 + resolution: "@nivo/recompose@npm:0.85.0" dependencies: + "@types/prop-types": ^15.7.2 + "@types/react-lifecycles-compat": ^3.0.1 + prop-types: ^15.7.2 react-lifecycles-compat: ^3.0.4 peerDependencies: - react: ">= 16.14.0 < 18.0.0" - checksum: acc0dc5bde0b67cdf8e5970cbec7788fbc91e3567b7fbeb5f470e8e0b706aeb5acae885d9413d14d845fc11032611ad1011e3a9fc4055acbc55a2baecd9e16ff + react: ">= 16.14.0 < 19.0.0" + checksum: b5181eb02bae9dcd8090fbe6c8666b0a3773e28feb101f0d5d151ee818302c3085e9bbff27d524173cbb195e05a4d661cc1d8d961b18ed39bdf837bbc8e2a43b languageName: node linkType: hard -"@nivo/scales@npm:0.79.0": - version: 0.79.0 - resolution: "@nivo/scales@npm:0.79.0" +"@nivo/scales@npm:0.85.1": + version: 0.85.1 + resolution: "@nivo/scales@npm:0.85.1" dependencies: - d3-scale: ^3.2.3 + "@types/d3-scale": ^4.0.8 + "@types/d3-time": ^1.1.1 + "@types/d3-time-format": ^3.0.0 + d3-scale: ^4.0.2 d3-time: ^1.0.11 d3-time-format: ^3.0.0 lodash: ^4.17.21 - checksum: 4b63b85f842fd21b90252cb1a848aa9772f6a035c2f1b3541d4df795b12db44ca4ac15f59b3cca19c45b5a27042508d32ba491142a517169a580b0d5f397d20b + checksum: 7e04d9ae5efe642ad8f60370f43ecd9ff626fdc5f6d212dc25b5f86dc67cf1654c1736c90088aeef6c411875b05365a4fd1187b0b77249331e0f966dafaa417d languageName: node linkType: hard -"@nivo/tooltip@npm:0.79.0": - version: 0.79.0 - resolution: "@nivo/tooltip@npm:0.79.0" +"@nivo/tooltip@npm:0.85.1": + version: 0.85.1 + resolution: "@nivo/tooltip@npm:0.85.1" dependencies: - "@react-spring/web": 9.3.1 + "@nivo/core": 0.85.1 + "@react-spring/web": 9.4.5 || ^9.7.2 peerDependencies: - "@nivo/core": 0.79.0 - checksum: ae74abebd077f5e77d041d0845340f1ffcbd2461e55112b8ac81fbf68f58a6d475ae30dc314ca11b99a4b85bbeaa5aecbe39191cc6ce55beddf83f43d1edab8b + react: ">= 16.14.0 < 19.0.0" + checksum: 13d00cf4d4a5c5252d2606b2be41f1a2162ff630c90b82557c0e20f0202698380a919721558f579aa2b6cb02e7d8bb22f786957e9b0cb27f656ae83e4944fa4f languageName: node linkType: hard -"@nivo/voronoi@npm:0.79.0": - version: 0.79.0 - resolution: "@nivo/voronoi@npm:0.79.0" +"@nivo/voronoi@npm:0.85.1": + version: 0.85.1 + resolution: "@nivo/voronoi@npm:0.85.1" dependencies: + "@nivo/core": 0.85.1 + "@types/d3-delaunay": ^5.3.0 + "@types/d3-scale": ^4.0.8 d3-delaunay: ^5.3.0 - d3-scale: ^3.2.3 + d3-scale: ^4.0.2 peerDependencies: - "@nivo/core": 0.79.0 - react: ">= 16.14.0 < 18.0.0" - checksum: d479051850a519c328ce8dd6fbbc5998575cb2fc16351e7e516593be5ad21de0f7effe18ad09a2d596abcd90c055a560a21e125b7c8b2a859a309e7737d028e1 + react: ">= 16.14.0 < 19.0.0" + checksum: bcf5178311a9f7db7f484af955378781a8048dbc71a820079bfd47a4c0873a990e39f51f582eb690cea6fe83e674dca7a35dd9d3cac20ca92b0fbd29a52eaa01 languageName: node linkType: hard @@ -2598,69 +2631,69 @@ __metadata: languageName: node linkType: hard -"@react-spring/animated@npm:~9.3.0": - version: 9.3.2 - resolution: "@react-spring/animated@npm:9.3.2" +"@react-spring/animated@npm:~9.7.5": + version: 9.7.5 + resolution: "@react-spring/animated@npm:9.7.5" dependencies: - "@react-spring/shared": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/shared": ~9.7.5 + "@react-spring/types": ~9.7.5 peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: e42fd174403a692d20f9cdc2511f5f4b1eed6282b4160d1eb0d8421ccce0524f4eaee968712f4e5f9b907a9f941ae3dd037ad35f13eacef8860fcfb90243a4fc + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: e28662a659933ceab30849dd6574f7c06554a76996bad03fabdbc145cef2a3242495695cfec5b9c9cac049ff72d2917dfd61304c2d17ff899cbdefb09f53bbeb languageName: node linkType: hard -"@react-spring/core@npm:~9.3.0": - version: 9.3.2 - resolution: "@react-spring/core@npm:9.3.2" +"@react-spring/core@npm:~9.7.5": + version: 9.7.5 + resolution: "@react-spring/core@npm:9.7.5" dependencies: - "@react-spring/animated": ~9.3.0 - "@react-spring/shared": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/animated": ~9.7.5 + "@react-spring/shared": ~9.7.5 + "@react-spring/types": ~9.7.5 peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: 1504143b9446d32c3877c8224c3fee3b6d18c0218b04b6766de7164ed645932808066ef12af63b06123a3da168f6bbc0fdf325c337b17d7f13d8a09f4a37f608 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 60c0151547073edf35e0de0e066983096aefff7a5ecf83bf54c7a9a9807220c4212f0ccdf353ef63131652667105ba70cd7188dc31de32aab30e3cc095663a38 languageName: node linkType: hard -"@react-spring/rafz@npm:~9.3.0": - version: 9.3.2 - resolution: "@react-spring/rafz@npm:9.3.2" - checksum: 8213d4940f23f93057dc2e7dc1e4aeca22622bfcfc9b42ab60d783e82f7ffe067e9537e7a397cfcb5634ea7e46d8ea55d06ffe4bd67a99f09ce06dde5e13957a +"@react-spring/rafz@npm:~9.7.5": + version: 9.7.5 + resolution: "@react-spring/rafz@npm:9.7.5" + checksum: adbffdf25942a66802363f979f07e04c81abf19b49c55e62336220450f393d57ebe1c906694485d6d89e85a13fd223da3bdea22a955307eaecefaf59ea7ec7f9 languageName: node linkType: hard -"@react-spring/shared@npm:~9.3.0": - version: 9.3.2 - resolution: "@react-spring/shared@npm:9.3.2" +"@react-spring/shared@npm:~9.7.5": + version: 9.7.5 + resolution: "@react-spring/shared@npm:9.7.5" dependencies: - "@react-spring/rafz": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/rafz": ~9.7.5 + "@react-spring/types": ~9.7.5 peerDependencies: - react: ^16.8.0 || ^17.0.0 - checksum: b04dc19fc6a8d585f38af74149e94fbf12b2a9ae9af6254abb02f105a7f77ce6a1e987ff7aaf4bb013786cd0959e41fca45709c4d57094abfca7b12db507a243 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 374ee7bece09895b1102c68acd0d47cf0d6f6201f77956aeac5eba7a3ee3190f509172990febfdde1bd91f79dabbaa42d3adc31c221511746575b23dadda038d languageName: node linkType: hard -"@react-spring/types@npm:~9.3.0": - version: 9.3.2 - resolution: "@react-spring/types@npm:9.3.2" - checksum: 29fb2be7cd44c3de534d6b0d914b1c51fdc6ea354098727e605218b0e733c3c0ab01f54670f1b8b9b1949d984e399ce3ec153640ae9c590aee9622f33900d16b +"@react-spring/types@npm:~9.7.5": + version: 9.7.5 + resolution: "@react-spring/types@npm:9.7.5" + checksum: f9d2dea0ea6afb6d81dc0275cf2554b20d7eef8bafac99fc0de5b728f1ad5a5c02438932dc70a360686b34166124b13900788ece09af3cee96ce585ba168480e languageName: node linkType: hard -"@react-spring/web@npm:9.3.1": - version: 9.3.1 - resolution: "@react-spring/web@npm:9.3.1" +"@react-spring/web@npm:9.4.5 || ^9.7.2": + version: 9.7.5 + resolution: "@react-spring/web@npm:9.7.5" dependencies: - "@react-spring/animated": ~9.3.0 - "@react-spring/core": ~9.3.0 - "@react-spring/shared": ~9.3.0 - "@react-spring/types": ~9.3.0 + "@react-spring/animated": ~9.7.5 + "@react-spring/core": ~9.7.5 + "@react-spring/shared": ~9.7.5 + "@react-spring/types": ~9.7.5 peerDependencies: - react: ^16.8.0 || ^17.0.0 - react-dom: ^16.8.0 || ^17.0.0 - checksum: 223ce3f849df23a7c4f630ea1e5be91a12257e35e2c8c10b939568302176d3881c1037d50daca4238a6383ddaa477cdc4971163a9da181b790abe91cae4b8c50 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + checksum: 4da57c7d2bf4cf76cedd1c57986ba85e839aaec45e247f75b7d12d777f6054fe77446e95a18080db5e714b0a5386a07e617c36592506554abfd2c301c50e66cc languageName: node linkType: hard @@ -2673,6 +2706,13 @@ __metadata: languageName: node linkType: hard +"@scarf/scarf@npm:=1.4.0": + version: 1.4.0 + resolution: "@scarf/scarf@npm:1.4.0" + checksum: def62aa403f7e63165ccb219efd2c420fc0b7357b0ba43397f635e4aa813ace1cdf3855a93fc559b4619bcc0469ae4767b8cb72af30ea5c0522bf4a2ecb18198 + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -2712,8 +2752,8 @@ __metadata: "@fortawesome/fontawesome-svg-core": 1.2.25 "@fortawesome/free-brands-svg-icons": 5.13.1 "@fortawesome/free-solid-svg-icons": 5.11.2 - "@nivo/core": ^0.79.0 - "@nivo/line": ^0.79.0 + "@nivo/core": ^0.85.0 + "@nivo/line": ^0.85.0 "@sonatype/nexus-ui-plugin": "workspace:*" "@sonatype/react-shared-components": 13.1.6 "@testing-library/jest-dom": 5.14.1 @@ -2741,7 +2781,7 @@ __metadata: react-dom: 17.0.2 sass: 1.38.0 sass-loader: 12.6.0 - swagger-ui-react: 4.17.1 + swagger-ui-react: 4.18.0 terser-webpack-plugin: 5.3.1 webpack: 5.69.1 webpack-cli: 4.9.2 @@ -2859,453 +2899,453 @@ __metadata: languageName: node linkType: hard -"@swagger-api/apidom-ast@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ast@npm:0.99.1" +"@swagger-api/apidom-ast@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ast@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-error": ^0.99.0 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 unraw: ^3.0.0 - checksum: 48288eb46edb03040e9afec47762d826d8c343ee6a3216d54d65f21ad3e62daade6c8edf228d1ab9bff8f23163841f9ce8170951cf211bf1a2c08e52137293b0 + checksum: c66835eb81f02bf2ec3a0c98888090857c4d13372711e0c5fdab2d8bef322f024cf73a0243fa2958baa32cc138259167b17af75d3b7b87d54aae61c6fda6a5b9 languageName: node linkType: hard -"@swagger-api/apidom-core@npm:>=0.99.1 <1.0.0, @swagger-api/apidom-core@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-core@npm:0.99.1" +"@swagger-api/apidom-core@npm:>=1.0.0-alpha.9 <1.0.0-beta.0, @swagger-api/apidom-core@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-core@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-ast": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@types/ramda": ~0.29.6 + "@swagger-api/apidom-ast": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 minim: ~0.23.8 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 short-unique-id: ^5.0.2 - stampit: ^4.3.2 - checksum: f4313d6971e65feeaa6581a82dc3e720af87358e470c6dde0d11d8ae5b7d251cc430a2f70a88eebd251dd6c454a5708b61b9daf9f5d00fcbb1ce9d280874d5cc + ts-mixer: ^6.0.3 + checksum: aa21d777be2871564946df5d5c9a07716a58e7fa864af8cc06c4a5cf4dba664c8aa949df1f2ba0a940dcec6fcc9c95307c2f19e212b5dcce5066cec4b401a627 languageName: node linkType: hard -"@swagger-api/apidom-error@npm:>=0.99.0 <1.0.0, @swagger-api/apidom-error@npm:^0.99.0": - version: 0.99.0 - resolution: "@swagger-api/apidom-error@npm:0.99.0" +"@swagger-api/apidom-error@npm:>=1.0.0-alpha.9 <1.0.0-beta.0, @swagger-api/apidom-error@npm:^1.0.0-alpha.1, @swagger-api/apidom-error@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-error@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - checksum: 06d3da38ff9501376d2de3240d1a5023110482e053766c389f734a587dfd4c10b6ba695268edc58ce649284fd8e04a1f57484ae49dba210dcc5764df33fd52a0 + checksum: 1a70b5186bc2dc7738ec91c6037676d358b5a134071758114b38f43286a431b83e0bea23f725b08633e66ce6a93d00bfb3221df69cbd197634851d99d6e5ab15 languageName: node linkType: hard -"@swagger-api/apidom-json-pointer@npm:>=0.99.1 <1.0.0, @swagger-api/apidom-json-pointer@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-json-pointer@npm:0.99.1" +"@swagger-api/apidom-json-pointer@npm:>=1.0.0-alpha.9 <1.0.0-beta.0, @swagger-api/apidom-json-pointer@npm:^1.0.0-alpha.1, @swagger-api/apidom-json-pointer@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-json-pointer@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: d566f7410d3600766f7130a23da811b4c7a3a1542ab173f2b0b6578b01dcb531c61d1d43da5e944ef1d4059c47b6f472ee3ad55da625e672c1c1dd7315941689 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 92e8b40921a739e257d84f8b1b1df4eb9954f16a4523350d5bf50611c12ecf9d2a75401c30a3bb91af9351a93002e7339042ea095a04a59097a53a1107944833 languageName: node linkType: hard -"@swagger-api/apidom-ns-api-design-systems@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-api-design-systems@npm:0.99.1" +"@swagger-api/apidom-ns-api-design-systems@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-api-design-systems@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@swagger-api/apidom-ns-openapi-3-1": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-3-1": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 ts-mixer: ^6.0.3 - checksum: 22ce1af89437b104005158ded9b8237511f1d6dae9f564fb1c336e6f842898fde9dca8549aa94dc0724c03df51b4a33b7e081f79b5c44e68ab625d76a4589d47 + checksum: 6a614a550ac1d1fe9fd11300304d3ceeadf361e921388bd3f918a5eb49a54907776edc925357d132b12e38c161bfe62ef0d64b287f804447c4b43f9fa2ced8f0 languageName: node linkType: hard -"@swagger-api/apidom-ns-asyncapi-2@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-asyncapi-2@npm:0.99.1" +"@swagger-api/apidom-ns-asyncapi-2@npm:^1.0.0-alpha.1, @swagger-api/apidom-ns-asyncapi-2@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-asyncapi-2@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-json-schema-draft-7": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-json-schema-draft-7": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 ts-mixer: ^6.0.3 - checksum: d1759ca24f238ae833a34128e8672f972f8cca61ddbd9660e277bc8ad3d78b835e1b7406a97e8eed4946e526ce7ec8ed1debd79edaaf504fae86c92534cb0875 + checksum: 99016bc4e1e43214372c85d079e279788eee2cce105ae9014a215f3fb9699589488d9847917c6beeea98eb7d749aef15d80c157a3ae1525dc268b297673dced0 languageName: node linkType: hard -"@swagger-api/apidom-ns-json-schema-draft-4@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-json-schema-draft-4@npm:0.99.1" +"@swagger-api/apidom-ns-json-schema-draft-4@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-json-schema-draft-4@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-ast": ^0.99.1 - "@swagger-api/apidom-core": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 - stampit: ^4.3.2 - checksum: 1b6c034e94287de0bea11a5f1c62de7b833436918cf961f38a12d877cf6de3caf3080fd38f0244905ea3b2fe8bb178a26c29ec631b4638ac46b597b992c7640a + "@swagger-api/apidom-ast": ^1.0.0-alpha.10 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + ts-mixer: ^6.0.4 + checksum: 162c3db6ded4ad458c4e8ec5e2c60fd5779096fd68929571396dabf6f1bf2d03c92d53ae45f62363360ea90448af90d224e32c67bc2288e86a60a0afba6f4c86 languageName: node linkType: hard -"@swagger-api/apidom-ns-json-schema-draft-6@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-json-schema-draft-6@npm:0.99.1" +"@swagger-api/apidom-ns-json-schema-draft-6@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-json-schema-draft-6@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@swagger-api/apidom-ns-json-schema-draft-4": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 - stampit: ^4.3.2 - checksum: e521ac3aec57f4239cce89641c7dc3555b2986ef23c6e9a15462d0b3015e54d89b0802546c313f5a91a2e5f94c8c570c417fe22034da57049bf49c61fc4e3592 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-json-schema-draft-4": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + ts-mixer: ^6.0.4 + checksum: d872e0fd2579dcfb6276916b49e080dd434f40002c5d5224f3f9c4335441d7f7f8756ef60b9ec6f505b0b434a52c31ec3dba4d566956c8051cf12ed41ab48f06 languageName: node linkType: hard -"@swagger-api/apidom-ns-json-schema-draft-7@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-json-schema-draft-7@npm:0.99.1" +"@swagger-api/apidom-ns-json-schema-draft-7@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-json-schema-draft-7@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@swagger-api/apidom-ns-json-schema-draft-6": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 - stampit: ^4.3.2 - checksum: 791df6981518d239fdee2ae76bd9abf2542322e36785d2153fe2d4dcc1e6b2fdbb430ac9becb55734fc7968f77570895d5c9113f5aa59f0cc3c59ed3ed604b41 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-json-schema-draft-6": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + ts-mixer: ^6.0.4 + checksum: 114a6a7af12dd00822f5bb157a9adc594649b25de2a771eb21025a5bcb3a7098e9e26360704d5516b41037020a3754e25818c3a98344423fde5e64a92fe4a531 languageName: node linkType: hard -"@swagger-api/apidom-ns-openapi-2@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-openapi-2@npm:0.99.1" +"@swagger-api/apidom-ns-openapi-2@npm:^1.0.0-alpha.1, @swagger-api/apidom-ns-openapi-2@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-openapi-2@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@swagger-api/apidom-ns-json-schema-draft-4": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-json-schema-draft-4": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 ts-mixer: ^6.0.3 - checksum: 8222aaffa9d1472ca2f876a361bbb888bc39b888d4600d9bd06ada7d9b516104391fbba9f51305ea0f522d0ae44370134631fc9492461483fad3cf757fa70b75 + checksum: 4ebda43138b589c069dff56de453ecd9f9f852967b69da226a7cda83aecd660118f679504ceb436266da3ce91469e6e2dadc2db282e26f0beb0cefa5bf663af9 languageName: node linkType: hard -"@swagger-api/apidom-ns-openapi-3-0@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-openapi-3-0@npm:0.99.1" +"@swagger-api/apidom-ns-openapi-3-0@npm:^1.0.0-alpha.1, @swagger-api/apidom-ns-openapi-3-0@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-openapi-3-0@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@swagger-api/apidom-ns-json-schema-draft-4": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-json-schema-draft-4": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 ts-mixer: ^6.0.3 - checksum: 8b5150e317e79795bc73a4a0c53860de4ab50e9e8fd9895d21d4a204e6ecee626477107e06df51aaef0e3651fdb2e48f197b5c8a0c33464b38d74abdffda0b60 + checksum: cd4928005a9f2892c9af08d3900e6842c5980bc497ebe37c1276f479d5339ae5dcbfa64e43dc3ea8075291bae7c5d5e9a935a788ac41d90d08fc04356bdb4cb5 languageName: node linkType: hard -"@swagger-api/apidom-ns-openapi-3-1@npm:>=0.99.1 <1.0.0, @swagger-api/apidom-ns-openapi-3-1@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-openapi-3-1@npm:0.99.1" +"@swagger-api/apidom-ns-openapi-3-1@npm:>=1.0.0-alpha.9 <1.0.0-beta.0, @swagger-api/apidom-ns-openapi-3-1@npm:^1.0.0-alpha.1, @swagger-api/apidom-ns-openapi-3-1@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-openapi-3-1@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-ast": ^0.99.1 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-0": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + "@swagger-api/apidom-ast": ^1.0.0-alpha.10 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-json-pointer": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-3-0": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 ts-mixer: ^6.0.3 - checksum: 64d97f6569c68982af5e2933e52060a5b404a270ad45689209f57e049776a4d3e2062f89474eb26a2689bc08014a6d69d45c6d48c496e67b2664e7bf80356232 + checksum: e7587720a2aff8b887897591fe77bbecbfa6e67d4f1d1f29f96c74ccc8ef5793d74f3f517c38d5d9cbbf6e5ee855c1a0e97edebe41a54ac47d590a63e43ef196 languageName: node linkType: hard -"@swagger-api/apidom-ns-workflows-1@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-ns-workflows-1@npm:0.99.1" +"@swagger-api/apidom-ns-workflows-1@npm:^1.0.0-alpha.1, @swagger-api/apidom-ns-workflows-1@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-ns-workflows-1@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-1": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-3-1": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 ts-mixer: ^6.0.3 - checksum: 53ab8bd15d382648c701bb1e374d0ccc8e9d90a1aeb0106631d77846b765e3dd282e7b3d7f2b748f2eaccaf0d16ec02a49e3319078e298b1c228d22625934e1b + checksum: e4f2ba400aa38d0ac18928100a1d9e2915078f1c4aac14ca74ab59e8c823f743f30ee5273326af86e61e56d343ebe2de3ba2e22f87c51301197d9fd830e517be languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-api-design-systems-json@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-api-design-systems-json@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-api-design-systems-json@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-api-design-systems-json@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-api-design-systems": ^0.99.1 - "@swagger-api/apidom-parser-adapter-json": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 406e4168c09e8907ac8983aecdc18429cded4db2b9793d2eb56a8e8494cae96d4309787c6316e3b584ad9c71434c0b31a933ee91d5b610b6fac72880692cfa3a + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-api-design-systems": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-json": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: a6c9212721dac7adfd859c0af11e3814814d09d2120ce71e93617126e20ac3c0600a43ea488b283233245995edcc82d227f1c401ac7bad89e2d8e4cb312bf9e6 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-api-design-systems-yaml@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-api-design-systems-yaml@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-api-design-systems-yaml@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-api-design-systems-yaml@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-api-design-systems": ^0.99.1 - "@swagger-api/apidom-parser-adapter-yaml-1-2": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 899d2181efd0afdfda5eb9d678b7ae4e1f4710b2d56a05272751aec86510c0e48d681d8cb16388b8e88f225fbb63c9a0b49aa79b94589a82c1bdb41d66d77012 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-api-design-systems": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-yaml-1-2": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: e05e706f3c4769bce8b13bd31a3e1fead2285de445056062cd878983e1f4f265f8d992256f2acc2816fb9aae997acf538cfce21a5b06b4ff61c859d4ff840826 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-asyncapi-json-2@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-asyncapi-json-2@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-asyncapi-json-2@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-asyncapi-json-2@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-asyncapi-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-json": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: e2b2d38769a11ad5c578a501acb8a015c8c359f7623ad37226d14845c96efd8d50d8d0bda417789402e74d52cbaf75c5e659936380b444f26dcfa5bb8c5df2df + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-asyncapi-2": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-json": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 5b5979a5980e300cab37b6a99f61ef4c9d5e39d3e989738ff7c76f55e36cf91916f341e1e8f59767aa026eba6ac713cb4ea16df28e3c395babe5e58cc767b171 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-asyncapi-yaml-2@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-asyncapi-yaml-2@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-asyncapi-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-yaml-1-2": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 27f8e1486f41074b679dd0016fd8b764ba2ec11fd589438e10f6c712f9d816b9b45edb3de02315fe43dcbbafdd68f392e217855109919b9b75d5065885691e7e + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-asyncapi-2": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-yaml-1-2": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: bda96502331466e1ef879e430ef04b2e1c0c53c84035e919d4185c3e49c86a8c3ee2e62fff25c877c398be0493089b37e2563269f40e33ddf216603fcc77029c languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-json@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-json@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-json@npm:^1.0.0-alpha.1, @swagger-api/apidom-parser-adapter-json@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-json@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-ast": ^0.99.1 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@types/ramda": ~0.29.6 + "@swagger-api/apidom-ast": ^1.0.0-alpha.10 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 node-gyp: latest - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 tree-sitter: =0.20.4 tree-sitter-json: =0.20.2 web-tree-sitter: =0.20.3 - checksum: eb8383965c866a60b06ea3da8f7a25a18fde35ae0455df8ce2a5a537b95424fba01cb3dd4f403869a3ba14d685388dc6f0b1362e5cf95ad6cdd1c65bd31dfa49 + checksum: af41b171c8038e6f1215e1aee0196ed56d6a1520f78cc522b7637a317e630b0daf9bfa740f752b23efb2a09e669fa24f69a1589d43510ec4a8048b1242ac8ee8 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-openapi-json-2@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-openapi-json-2@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-openapi-json-2@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-openapi-json-2@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-json": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 4711cc0c42c7e31c82a45e15c118ddec5a8c0da628e1bc43c8096b849f2f56ff45e96d9ae32efb3f6d586b094cba1e068a5c42ff4bb99ffeba99389d4d865458 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-2": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-json": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 6d4a13a6813ac9f55eb23cd1f6e7b9b89f7d17f03909036d63871b54ae31bb180d55f082bda6e963d5ba1ecdab88715a5f78c16ec78f284ed01f9950fd4e9ba5 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-openapi-json-3-0@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-openapi-json-3-0@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-openapi-json-3-0@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-openapi-json-3-0@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-0": ^0.99.1 - "@swagger-api/apidom-parser-adapter-json": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 0e5146fcd49c5aae257b148420358bd136863df7261cfb5a338bb12bd86503c71bcb12cb510e5bff9a3dd84783ce8ed6776ac9300bc0c4e795c1ecb45fac91d0 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-3-0": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-json": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 5fe449d3e27266e0e79b117709ae3ebc4ffa346c250b54ecfe8f8db691d86b0684ccaf22f3a47237b9d396ec2fe683e2d03d95c7669c79c95b07f56cfdceef3d languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-openapi-json-3-1@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-openapi-json-3-1@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-openapi-json-3-1@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-openapi-json-3-1@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-json": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: e36e808ce1d79279cc495327e0223922071be3856603a485980f9a237af37dc3488c96e20b0b0d4f364b8a0247574185d61be1b6d536f06e49a8e91a3b262a1e + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-3-1": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-json": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 224cd4dee5c92f82fcd517840e6bc18e11dee51f245e9d38904bea785fd1701eb422c9b0c00984618c04360d028013b08cda8e29a6c03d98d89c4174cc8fc5a8 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-openapi-yaml-2@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-openapi-yaml-2@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-openapi-yaml-2@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-openapi-yaml-2@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-yaml-1-2": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: ec0156285810a76148f16bcb525ac8267ea99bc7c7a3ded7bb5dfdef987ab11c5d9fe20f5e1d43e35e0de777b68a0fd38633247bbe2ee66d05d76753f25f61e9 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-2": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-yaml-1-2": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 3644200c28af665df9522ad27a353433d789cfb349039eeaa6f70a08abe033bdd6320d6060df753d77830e0a45a2c2cf476a7a9380e12095ea5c0382a0f5b863 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-openapi-yaml-3-0@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-openapi-yaml-3-0@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-0": ^0.99.1 - "@swagger-api/apidom-parser-adapter-yaml-1-2": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 397cf17638246ce6b4b4a7ddb315d78dfa50c565b399ff73f929ed64c6d8d991f3a4e38aa2b0ae70af6e5fa6fef06bae9205e9547649a957f3b5e4696ff0a050 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-3-0": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-yaml-1-2": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 75cab13af722f8556c23ebe6a686d68361cf9574caf16fe4826773a015bdbdf041401cb44ae6899e6428b111c8253072cdcdc0336812aa0a9cc8d11d42cc17f5 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-openapi-yaml-3-1@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-openapi-yaml-3-1@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-yaml-1-2": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 186f37d84758adcd02ba2d7734b5c99cc97f57dd102d1f2c82991bb7b68380a1a9d632656389262dfd20b53234a55ca8fa17e800c0401544abb90ace174bf1cf + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-openapi-3-1": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-yaml-1-2": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: f89f871895a037b448cb64a3ebc7418ec55994d7cdd5e840415139c83028f63b05494229efebc51b11c3b6a9f3bf48ce4af4cb23588a2b1b7cdc6343c8469d47 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-workflows-json-1@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-workflows-json-1@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-workflows-json-1@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-workflows-json-1@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-workflows-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-json": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 3a2e928be611461a9533eb69eebabd8bf59381e82507725c938e36dd77fead3c260d27cd287d92f884323928683e518c47361889c52720a58294c0b3eb2a7b55 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-workflows-1": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-json": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 6e64f443ffaeb3a0b594133085650f261ccb4682c0ee587b6dccc328722865566ceaf9800cdc3b8b7df1bf36a96afd3efee2607759efe900fe4866ce056a9aa9 languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-workflows-yaml-1@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-workflows-yaml-1@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-workflows-yaml-1@npm:^1.0.0-alpha.1": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-workflows-yaml-1@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-ns-workflows-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-yaml-1-2": ^0.99.1 - "@types/ramda": ~0.29.6 - ramda: ~0.29.1 - ramda-adjunct: ^4.0.0 - checksum: 7869ba27343a8936ff2def5570b41b9abb2618afa8ee0fbecbb0a0213031dbbc28bb5692e486350748099fadd22578928f8d5a420f11769247044a026c8138e5 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-ns-workflows-1": ^1.0.0-alpha.10 + "@swagger-api/apidom-parser-adapter-yaml-1-2": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 + checksum: 3c28119ec79460965f1ed2588f16254ec60a3f8e01835240d876946e8c9863e77ae185eb666d404559cca4a3df354afdcf7a5931e06eb1524b33e3eddd3e8baa languageName: node linkType: hard -"@swagger-api/apidom-parser-adapter-yaml-1-2@npm:^0.99.1": - version: 0.99.1 - resolution: "@swagger-api/apidom-parser-adapter-yaml-1-2@npm:0.99.1" +"@swagger-api/apidom-parser-adapter-yaml-1-2@npm:^1.0.0-alpha.1, @swagger-api/apidom-parser-adapter-yaml-1-2@npm:^1.0.0-alpha.10": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-parser-adapter-yaml-1-2@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-ast": ^0.99.1 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@types/ramda": ~0.29.6 + "@swagger-api/apidom-ast": ^1.0.0-alpha.10 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.10 + "@types/ramda": ~0.30.0 node-gyp: latest - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 tree-sitter: =0.20.4 tree-sitter-yaml: =0.5.0 web-tree-sitter: =0.20.3 - checksum: c10237864c4a99a319f5b19bb6c4234e32b422c03fc358350e9c9106a8612839abcc68e3e06e58ee2f9b450e1d7ab0288f8b89ee8b5338735170af1b48b2112a + checksum: 9e00a19e871b0b1058067e92e4fb928fc1130634140ce233a4a1d5ffb4010a0cc0364eb2b3fef4d06ea90ed9b45c891c991d6a33804666add40bed5945795dca languageName: node linkType: hard -"@swagger-api/apidom-reference@npm:>=0.99.1 <1.0.0": - version: 0.99.1 - resolution: "@swagger-api/apidom-reference@npm:0.99.1" +"@swagger-api/apidom-reference@npm:>=1.0.0-alpha.9 <1.0.0-beta.0": + version: 1.0.0-alpha.10 + resolution: "@swagger-api/apidom-reference@npm:1.0.0-alpha.10" dependencies: "@babel/runtime-corejs3": ^7.20.7 - "@swagger-api/apidom-core": ^0.99.1 - "@swagger-api/apidom-error": ^0.99.0 - "@swagger-api/apidom-json-pointer": ^0.99.1 - "@swagger-api/apidom-ns-asyncapi-2": ^0.99.1 - "@swagger-api/apidom-ns-openapi-2": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-0": ^0.99.1 - "@swagger-api/apidom-ns-openapi-3-1": ^0.99.1 - "@swagger-api/apidom-ns-workflows-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-api-design-systems-json": ^0.99.1 - "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": ^0.99.1 - "@swagger-api/apidom-parser-adapter-asyncapi-json-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-json": ^0.99.1 - "@swagger-api/apidom-parser-adapter-openapi-json-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-openapi-json-3-0": ^0.99.1 - "@swagger-api/apidom-parser-adapter-openapi-json-3-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-openapi-yaml-2": ^0.99.1 - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": ^0.99.1 - "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-workflows-json-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-workflows-yaml-1": ^0.99.1 - "@swagger-api/apidom-parser-adapter-yaml-1-2": ^0.99.1 - "@types/ramda": ~0.29.6 - axios: ^1.4.0 + "@swagger-api/apidom-core": ^1.0.0-alpha.10 + "@swagger-api/apidom-error": ^1.0.0-alpha.1 + "@swagger-api/apidom-json-pointer": ^1.0.0-alpha.1 + "@swagger-api/apidom-ns-asyncapi-2": ^1.0.0-alpha.1 + "@swagger-api/apidom-ns-openapi-2": ^1.0.0-alpha.1 + "@swagger-api/apidom-ns-openapi-3-0": ^1.0.0-alpha.1 + "@swagger-api/apidom-ns-openapi-3-1": ^1.0.0-alpha.1 + "@swagger-api/apidom-ns-workflows-1": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-api-design-systems-json": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-json": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-openapi-json-2": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-openapi-yaml-2": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-workflows-json-1": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-workflows-yaml-1": ^1.0.0-alpha.1 + "@swagger-api/apidom-parser-adapter-yaml-1-2": ^1.0.0-alpha.1 + "@types/ramda": ~0.30.0 + axios: ^1.7.4 minimatch: ^7.4.3 process: ^0.11.10 - ramda: ~0.29.1 - ramda-adjunct: ^4.1.1 - stampit: ^4.3.2 + ramda: ~0.30.0 + ramda-adjunct: ^5.0.0 dependenciesMeta: "@swagger-api/apidom-error": optional: true @@ -3349,7 +3389,7 @@ __metadata: optional: true "@swagger-api/apidom-parser-adapter-yaml-1-2": optional: true - checksum: 2131dc3df89c1670d8f5fde91f524a240afc253cf4fa8cf3c4b0ed2a35671b20b44fe944c7f3149fecd17e0cce3502f9d333df982d01ca999149a05bd9d9fc12 + checksum: d30ea82a49489c011b7c741beef40bf6e9c4cc3e64a08c7bfbd80fde0572597b0be694cd7f40bde1abe2bd19c9ac5aa862692295347e65f2bfb93a8aae3fd66b languageName: node linkType: hard @@ -3488,6 +3528,87 @@ __metadata: languageName: node linkType: hard +"@types/d3-color@npm:^3.0.0": + version: 3.1.3 + resolution: "@types/d3-color@npm:3.1.3" + checksum: 8a0e79a709929502ec4effcee2c786465b9aec51b653ba0b5d05dbfec3e84f418270dd603002d94021885061ff592f614979193bd7a02ad76317f5608560e357 + languageName: node + linkType: hard + +"@types/d3-delaunay@npm:^5.3.0": + version: 5.3.4 + resolution: "@types/d3-delaunay@npm:5.3.4" + checksum: d4568c19a7d2566b6bd49351f15f755809aff69e24939df50e4ad1a5e4363c6c65cd365c4978e90dd44d393fd8b52f1b99ce9960e8f2205e6a03e539f74e1905 + languageName: node + linkType: hard + +"@types/d3-format@npm:^1.4.1": + version: 1.4.5 + resolution: "@types/d3-format@npm:1.4.5" + checksum: f284da718785080cc3ee598c3585285c04585e4dc57631aca1051bda43bd6348e8256399b5f8a4f3af99809acedde3a74cd41aebdd4ce4c714f7cc554552e29b + languageName: node + linkType: hard + +"@types/d3-path@npm:^2": + version: 2.0.4 + resolution: "@types/d3-path@npm:2.0.4" + checksum: 054005eeef4420a1d2867509e25da419521086b9d2aa22b45095b77604cfef1b8208742063cac3bfd82e4ff8b0214d4c64bf5f0e08fa4c7919114d30af4fdf9d + languageName: node + linkType: hard + +"@types/d3-scale-chromatic@npm:^3.0.0": + version: 3.0.3 + resolution: "@types/d3-scale-chromatic@npm:3.0.3" + checksum: a465d126a00a71d3824957283580b4b404fe6f6bb52eb2b7303047fffed2bec6e31aeb34bfb30313e72ee1d75243c50ec5a45824eaf547f9c0849a1379527662 + languageName: node + linkType: hard + +"@types/d3-scale@npm:^4.0.8": + version: 4.0.8 + resolution: "@types/d3-scale@npm:4.0.8" + dependencies: + "@types/d3-time": "*" + checksum: 3b1906da895564f73bb3d0415033d9a8aefe7c4f516f970176d5b2ff7a417bd27ae98486e9a9aa0472001dc9885a9204279a1973a985553bdb3ee9bbc1b94018 + languageName: node + linkType: hard + +"@types/d3-shape@npm:^2.0.0": + version: 2.1.7 + resolution: "@types/d3-shape@npm:2.1.7" + dependencies: + "@types/d3-path": ^2 + checksum: c83f53a016e1ccfaa6104458b73ae2b1c87de0e4ddf8c43a11ceba87652965273a4b33e49d552be34f7d04b24fc380f21a1958f86ab1fd863da78e957e88af34 + languageName: node + linkType: hard + +"@types/d3-time-format@npm:^2.3.1": + version: 2.3.4 + resolution: "@types/d3-time-format@npm:2.3.4" + checksum: 5351ee0bcd5d181dfc120b5652802ae4cd8f8def60b9e3638a83464456d376e8fce7a6c50e2b4d7f186fb8a31aa28fda9b8d3e7b3c816941da71b66938e4fb9f + languageName: node + linkType: hard + +"@types/d3-time-format@npm:^3.0.0": + version: 3.0.4 + resolution: "@types/d3-time-format@npm:3.0.4" + checksum: d2aa42854b833342d0536927deae533eb2302232ee253cf271ee9f935784b61eb9605ab706fbcba72b83564ffce88c02fd437f72bc068779ed9166a5de019637 + languageName: node + linkType: hard + +"@types/d3-time@npm:*": + version: 3.0.3 + resolution: "@types/d3-time@npm:3.0.3" + checksum: a071826c80efdb1999e6406fef2db516d45f3906da3a9a4da8517fa863bae53c4c1056ca5347a20921660607d21ec874fd2febe0e961adb7be6954255587d08f + languageName: node + linkType: hard + +"@types/d3-time@npm:^1.1.1": + version: 1.1.4 + resolution: "@types/d3-time@npm:1.1.4" + checksum: a794a2e05365de5bd4b139d7ff94f0d9eeb362116677f1edadb1aa08d5ddb93c4e50ace092f8fa9d7358efab5073770654ac6d294a2a39ca5106c0a55f38c22e + languageName: node + linkType: hard + "@types/eslint-scope@npm:^3.7.3": version: 3.7.7 resolution: "@types/eslint-scope@npm:3.7.7" @@ -3540,7 +3661,7 @@ __metadata: languageName: node linkType: hard -"@types/hoist-non-react-statics@npm:^3.3.0": +"@types/hoist-non-react-statics@npm:^3.3.1": version: 3.3.5 resolution: "@types/hoist-non-react-statics@npm:3.3.5" dependencies: @@ -3636,7 +3757,14 @@ __metadata: languageName: node linkType: hard -"@types/ramda@npm:^0.29.1, @types/ramda@npm:~0.29.6": +"@types/prop-types@npm:^15.7.2": + version: 15.7.13 + resolution: "@types/prop-types@npm:15.7.13" + checksum: 8935cad87c683c665d09a055919d617fe951cb3b2d5c00544e3a913f861a2bd8d2145b51c9aa6d2457d19f3107ab40784c40205e757232f6a80cc8b1c815513c + languageName: node + linkType: hard + +"@types/ramda@npm:^0.29.1": version: 0.29.9 resolution: "@types/ramda@npm:0.29.9" dependencies: @@ -3645,15 +3773,21 @@ __metadata: languageName: node linkType: hard -"@types/react-redux@npm:^7.1.20": - version: 7.1.33 - resolution: "@types/react-redux@npm:7.1.33" +"@types/ramda@npm:~0.30.0": + version: 0.30.2 + resolution: "@types/ramda@npm:0.30.2" + dependencies: + types-ramda: ^0.30.1 + checksum: 528e62da967adb38b7b6be3314ee11009f4e7312e4fbb9670f4556bb2f640754f08ae68ede87822ae255aba747e67296f40b37d53bfb427c58ab82f5b7a4989e + languageName: node + linkType: hard + +"@types/react-lifecycles-compat@npm:^3.0.1": + version: 3.0.4 + resolution: "@types/react-lifecycles-compat@npm:3.0.4" dependencies: - "@types/hoist-non-react-statics": ^3.3.0 "@types/react": "*" - hoist-non-react-statics: ^3.3.0 - redux: ^4.0.0 - checksum: 063e98c0d8cdc7cc2da1663716260ffb8d504b2f8be2d92cabb630cae31eb05aa0e389175265caa9a160bb7c4b66646d4a4171d4aa2dc292722088dcf593cdc3 + checksum: 504665a1a83be43ab43cbd3d19fd94d0de6634543f06351cce80c844628048650f2cf063048e5dc39effdf0053565ae60a04427e79d094714d6aeb84d5c9643e languageName: node linkType: hard @@ -3721,6 +3855,13 @@ __metadata: languageName: node linkType: hard +"@types/use-sync-external-store@npm:^0.0.3": + version: 0.0.3 + resolution: "@types/use-sync-external-store@npm:0.0.3" + checksum: 161ddb8eec5dbe7279ac971531217e9af6b99f7783213566d2b502e2e2378ea19cf5e5ea4595039d730aa79d3d35c6567d48599f69773a02ffcff1776ec2a44e + languageName: node + linkType: hard + "@types/yargs-parser@npm:*": version: 21.0.3 resolution: "@types/yargs-parser@npm:21.0.3" @@ -4230,6 +4371,13 @@ __metadata: languageName: node linkType: hard +"apg-lite@npm:^1.0.3": + version: 1.0.4 + resolution: "apg-lite@npm:1.0.4" + checksum: 30a27eecb71350a6dd47f8944520e56c08063115197e8de15699b792e32101b452ff339cf9d5469db7a992b0f2f8659c16f72f24ab7465683fb7e6cf0dc4afcd + languageName: node + linkType: hard + "aproba@npm:^1.0.3": version: 1.2.0 resolution: "aproba@npm:1.2.0" @@ -4415,14 +4563,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.4.0": - version: 1.6.2 - resolution: "axios@npm:1.6.2" +"axios@npm:^1.7.4": + version: 1.7.7 + resolution: "axios@npm:1.7.7" dependencies: - follow-redirects: ^1.15.0 + follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: 4a7429e2b784be0f2902ca2680964391eae7236faa3967715f30ea45464b98ae3f1c6f631303b13dfe721b17126b01f486c7644b9ef276bfc63112db9fd379f8 + checksum: 882d4fe0ec694a07c7f5c1f68205eb6dc5a62aecdb632cc7a4a3d0985188ce3030e0b277e1a8260ac3f194d314ae342117660a151fabffdc5081ca0b5a8b47fe languageName: node linkType: hard @@ -4736,6 +4884,15 @@ __metadata: languageName: node linkType: hard +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: ^7.1.1 + checksum: b95aa0b3bd909f6cd1720ffcf031aeaf46154dd88b4da01f9a1d3f7ea866a79eba76a6d01cbc3c422b2ee5cdc39a4f02491058d5df0d7bf6e6a162a832df1f69 + languageName: node + linkType: hard + "browserslist@npm:^4.0.0, browserslist@npm:^4.14.5, browserslist@npm:^4.21.4, browserslist@npm:^4.22.2": version: 4.22.2 resolution: "browserslist@npm:4.22.2" @@ -5065,7 +5222,7 @@ __metadata: languageName: node linkType: hard -"classnames@npm:*, classnames@npm:^2.3.1": +"classnames@npm:*": version: 2.3.2 resolution: "classnames@npm:2.3.2" checksum: 2c62199789618d95545c872787137262e741f9db13328e216b093eea91c85ef2bfb152c1f9e63027204e2559a006a92eb74147d46c800a9f96297ae1d9f96f4e @@ -5079,7 +5236,7 @@ __metadata: languageName: node linkType: hard -"classnames@npm:^2.3.2": +"classnames@npm:^2.3.1, classnames@npm:^2.3.2": version: 2.5.1 resolution: "classnames@npm:2.5.1" checksum: da424a8a6f3a96a2e87d01a432ba19315503294ac7e025f9fece656db6b6a0f7b5003bb1fbb51cbb0d9624d964f1b9bb35a51c73af9b2434c7b292c42231c1e5 @@ -5285,10 +5442,10 @@ __metadata: languageName: node linkType: hard -"cookie@npm:~0.6.0": - version: 0.6.0 - resolution: "cookie@npm:0.6.0" - checksum: f56a7d32a07db5458e79c726b77e3c2eff655c36792f2b6c58d351fb5f61531e5b1ab7f46987150136e366c65213cbe31729e02a3eaed630c3bf7334635fb410 +"cookie@npm:~0.7.2": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 9bf8555e33530affd571ea37b615ccad9b9a34febbf2c950c86787088eb00a8973690833b0f8ebd6b69b753c62669ea60cec89178c1fb007bf0749abed74f93e languageName: node linkType: hard @@ -5638,7 +5795,7 @@ __metadata: languageName: node linkType: hard -"d3-array@npm:2, d3-array@npm:^2.3.0": +"d3-array@npm:2": version: 2.12.1 resolution: "d3-array@npm:2.12.1" dependencies: @@ -5647,10 +5804,19 @@ __metadata: languageName: node linkType: hard -"d3-color@npm:1 - 2, d3-color@npm:^2.0.0": - version: 2.0.0 - resolution: "d3-color@npm:2.0.0" - checksum: b887354aa383937abd04fbffed3e26e5d6a788472cd3737fb10735930e427763e69fe93398663bccf88c0b53ee3e638ac6fcf0c02226b00ed9e4327c2dfbf3dc +"d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3": + version: 3.2.4 + resolution: "d3-array@npm:3.2.4" + dependencies: + internmap: 1 - 2 + checksum: a5976a6d6205f69208478bb44920dd7ce3e788c9dceb86b304dbe401a4bfb42ecc8b04c20facde486e9adcb488b5d1800d49393a3f81a23902b68158e12cddd0 + languageName: node + linkType: hard + +"d3-color@npm:1 - 3, d3-color@npm:^3.1.0": + version: 3.1.0 + resolution: "d3-color@npm:3.1.0" + checksum: 4931fbfda5d7c4b5cfa283a13c91a954f86e3b69d75ce588d06cde6c3628cebfc3af2069ccf225e982e8987c612aa7948b3932163ce15eb3c11cd7c003f3ee3b languageName: node linkType: hard @@ -5663,10 +5829,10 @@ __metadata: languageName: node linkType: hard -"d3-format@npm:1 - 2": - version: 2.0.0 - resolution: "d3-format@npm:2.0.0" - checksum: c4d3c8f9941d097d514d3986f54f21434e08e5876dc08d1d65226447e8e167600d5b9210235bb03fd45327225f04f32d6e365f08f76d2f4b8bff81594851aaf7 +"d3-format@npm:1 - 3": + version: 3.1.0 + resolution: "d3-format@npm:3.1.0" + checksum: f345ec3b8ad3cab19bff5dead395bd9f5590628eb97a389b1dd89f0b204c7c4fc1d9520f13231c2c7cf14b7c9a8cf10f8ef15bde2befbab41454a569bd706ca2 languageName: node linkType: hard @@ -5677,12 +5843,12 @@ __metadata: languageName: node linkType: hard -"d3-interpolate@npm:1 - 2, d3-interpolate@npm:1.2.0 - 2, d3-interpolate@npm:^2.0.1": - version: 2.0.1 - resolution: "d3-interpolate@npm:2.0.1" +"d3-interpolate@npm:1 - 3, d3-interpolate@npm:1.2.0 - 3, d3-interpolate@npm:^3.0.1": + version: 3.0.1 + resolution: "d3-interpolate@npm:3.0.1" dependencies: - d3-color: 1 - 2 - checksum: 4a2018ac34fbcc3e0e7241e117087ca1b2274b8b33673913658623efacc5db013b8d876586d167b23e3145bdb34ec8e441d301299b082e1a90985b2f18d4299c + d3-color: 1 - 3 + checksum: a42ba314e295e95e5365eff0f604834e67e4a3b3c7102458781c477bd67e9b24b6bb9d8e41ff5521050a3f2c7c0c4bbbb6e187fd586daa3980943095b267e78b languageName: node linkType: hard @@ -5693,26 +5859,26 @@ __metadata: languageName: node linkType: hard -"d3-scale-chromatic@npm:^2.0.0": - version: 2.0.0 - resolution: "d3-scale-chromatic@npm:2.0.0" +"d3-scale-chromatic@npm:^3.0.0": + version: 3.1.0 + resolution: "d3-scale-chromatic@npm:3.1.0" dependencies: - d3-color: 1 - 2 - d3-interpolate: 1 - 2 - checksum: 9fe5b4c1d9907abbda76e414856d9089182a0641f3bbf43d8d3008dbcccb52781e21793682e2b53663d3c6cd63e76965f961894e53ed3b01a345797412fe5b1f + d3-color: 1 - 3 + d3-interpolate: 1 - 3 + checksum: ab6324bd8e1f708e731e02ab44e09741efda2b174cea1d8ca21e4a87546295e99856bc44e2fd3890f228849c96bccfbcf922328f95be6a7df117453eb5cf22c9 languageName: node linkType: hard -"d3-scale@npm:^3.2.3": - version: 3.3.0 - resolution: "d3-scale@npm:3.3.0" +"d3-scale@npm:^4.0.2": + version: 4.0.2 + resolution: "d3-scale@npm:4.0.2" dependencies: - d3-array: ^2.3.0 - d3-format: 1 - 2 - d3-interpolate: 1.2.0 - 2 - d3-time: ^2.1.1 - d3-time-format: 2 - 3 - checksum: f77e73f0fb422292211d0687914c30d26e29011a936ad2a535a868ae92f306c3545af1fe7ea5db1b3e67dbce7a6c6cd952e53d02d1d557543e7e5d30e30e52f2 + d3-array: 2.10.0 - 3 + d3-format: 1 - 3 + d3-interpolate: 1.2.0 - 3 + d3-time: 2.1.1 - 3 + d3-time-format: 2 - 4 + checksum: a9c770d283162c3bd11477c3d9d485d07f8db2071665f1a4ad23eec3e515e2cefbd369059ec677c9ac849877d1a765494e90e92051d4f21111aa56791c98729e languageName: node linkType: hard @@ -5725,7 +5891,16 @@ __metadata: languageName: node linkType: hard -"d3-time-format@npm:2 - 3, d3-time-format@npm:^3.0.0": +"d3-time-format@npm:2 - 4": + version: 4.1.0 + resolution: "d3-time-format@npm:4.1.0" + dependencies: + d3-time: 1 - 3 + checksum: 7342bce28355378152bbd4db4e275405439cabba082d9cd01946d40581140481c8328456d91740b0fe513c51ec4a467f4471ffa390c7e0e30ea30e9ec98fcdf4 + languageName: node + linkType: hard + +"d3-time-format@npm:^3.0.0": version: 3.0.0 resolution: "d3-time-format@npm:3.0.0" dependencies: @@ -5734,7 +5909,7 @@ __metadata: languageName: node linkType: hard -"d3-time@npm:1 - 2, d3-time@npm:^2.1.1": +"d3-time@npm:1 - 2": version: 2.1.1 resolution: "d3-time@npm:2.1.1" dependencies: @@ -5743,6 +5918,15 @@ __metadata: languageName: node linkType: hard +"d3-time@npm:1 - 3, d3-time@npm:2.1.1 - 3": + version: 3.1.0 + resolution: "d3-time@npm:3.1.0" + dependencies: + d3-array: 2 - 3 + checksum: 613b435352a78d9f31b7f68540788186d8c331b63feca60ad21c88e9db1989fe888f97f242322ebd6365e45ec3fb206a4324cd4ca0dfffa1d9b5feb856ba00a7 + languageName: node + linkType: hard + "d3-time@npm:^1.0.11": version: 1.1.0 resolution: "d3-time@npm:1.1.0" @@ -6613,6 +6797,15 @@ __metadata: languageName: node linkType: hard +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: ^5.0.1 + checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798 + languageName: node + linkType: hard + "find-cache-dir@npm:^3.3.1": version: 3.3.2 resolution: "find-cache-dir@npm:3.3.2" @@ -6666,23 +6859,23 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.15.0": - version: 1.15.3 - resolution: "follow-redirects@npm:1.15.3" +"follow-redirects@npm:^1.15.4": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: 584da22ec5420c837bd096559ebfb8fe69d82512d5585004e36a3b4a6ef6d5905780e0c74508c7b72f907d1fa2b7bd339e613859e9c304d0dc96af2027fd0231 + checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 languageName: node linkType: hard -"follow-redirects@npm:^1.15.4": - version: 1.15.6 - resolution: "follow-redirects@npm:1.15.6" +"follow-redirects@npm:^1.15.6": + version: 1.15.9 + resolution: "follow-redirects@npm:1.15.9" peerDependenciesMeta: debug: optional: true - checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 + checksum: 859e2bacc7a54506f2bf9aacb10d165df78c8c1b0ceb8023f966621b233717dab56e8d08baadc3ad3b9db58af290413d585c999694b7c146aaf2616340c3d2a6 languageName: node linkType: hard @@ -7440,6 +7633,13 @@ __metadata: languageName: node linkType: hard +"internmap@npm:1 - 2": + version: 2.0.3 + resolution: "internmap@npm:2.0.3" + checksum: 7ca41ec6aba8f0072fc32fa8a023450a9f44503e2d8e403583c55714b25efd6390c38a87161ec456bf42d7bc83aab62eb28f5aef34876b1ac4e60693d5e1d241 + languageName: node + linkType: hard + "internmap@npm:^1.0.0": version: 1.0.1 resolution: "internmap@npm:1.0.1" @@ -7814,13 +8014,6 @@ __metadata: languageName: node linkType: hard -"is-plain-object@npm:^5.0.0": - version: 5.0.0 - resolution: "is-plain-object@npm:5.0.0" - checksum: e32d27061eef62c0847d303125440a38660517e586f2f3db7c9d179ae5b6674ab0f469d519b2e25c147a1a3bc87156d0d5f4d8821e0ce4a9ee7fe1fcf11ce45c - languageName: node - linkType: hard - "is-posix-bracket@npm:^0.1.0": version: 0.1.1 resolution: "is-posix-bracket@npm:0.1.1" @@ -9143,7 +9336,17 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": +"micromatch@npm:^4.0.2": + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" + dependencies: + braces: ^3.0.3 + picomatch: ^2.3.1 + checksum: 79920eb634e6f400b464a954fcfa589c4e7c7143209488e44baf627f9affc8b1e306f41f4f0deedde97e69cb725920879462d3e750ab3bd3c1aed675bb3a8966 + languageName: node + linkType: hard + +"micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" dependencies: @@ -9502,6 +9705,13 @@ __metadata: languageName: node linkType: hard +"neotraverse@npm:=0.6.18": + version: 0.6.18 + resolution: "neotraverse@npm:0.6.18" + checksum: 6ec0855db8d484a33672ba4533617bab4944167c881a6ab35a987bf3b92f12159eac5c19ad9cc203c193b279cc1a09f0bd7c7fb7752f9950625cbd866071ef72 + languageName: node + linkType: hard + "nice-try@npm:^1.0.4": version: 1.0.5 resolution: "nice-try@npm:1.0.5" @@ -9828,6 +10038,24 @@ __metadata: languageName: node linkType: hard +"openapi-path-templating@npm:^1.5.1": + version: 1.6.0 + resolution: "openapi-path-templating@npm:1.6.0" + dependencies: + apg-lite: ^1.0.3 + checksum: ebfa0df0b203b90779f88718dae82a2a9889d98452228fd4c7c442c96661fc8dd1013a8a3aed7f39b9c8c6e17936fff85902bb5f1b378318436b5c762e3fdc50 + languageName: node + linkType: hard + +"openapi-server-url-templating@npm:^1.0.0": + version: 1.1.0 + resolution: "openapi-server-url-templating@npm:1.1.0" + dependencies: + apg-lite: ^1.0.3 + checksum: 0379b778445a972712edf504063d15445f351e13c228181ae9c887dc1f8d2f378689b32e7387de9595693f404572278fe1e8f1aa63a68edd0471518761aa58b0 + languageName: node + linkType: hard + "os-tmpdir@npm:~1.0.2": version: 1.0.2 resolution: "os-tmpdir@npm:1.0.2" @@ -10674,15 +10902,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.10.2": - version: 6.11.2 - resolution: "qs@npm:6.11.2" - dependencies: - side-channel: ^1.0.4 - checksum: e812f3c590b2262548647d62f1637b6989cc56656dc960b893fe2098d96e1bd633f36576f4cd7564dfbff9db42e17775884db96d846bebe4f37420d073ecdc0b - languageName: node - linkType: hard - "querystringify@npm:^2.1.1": version: 2.2.0 resolution: "querystringify@npm:2.2.0" @@ -10690,12 +10909,12 @@ __metadata: languageName: node linkType: hard -"ramda-adjunct@npm:^4.0.0, ramda-adjunct@npm:^4.1.1": - version: 4.1.1 - resolution: "ramda-adjunct@npm:4.1.1" +"ramda-adjunct@npm:^5.0.0": + version: 5.1.0 + resolution: "ramda-adjunct@npm:5.1.0" peerDependencies: - ramda: ">= 0.29.0" - checksum: 7cdae1129987afac3d2ab9188b62f949558f86ad14ef76b898bacf065da5542e213e53cb01f064444ad634dfa668148cd3351726017a11dfe141b6b4c3552808 + ramda: ">= 0.30.0" + checksum: 0b5d10add35e56ff1ce1202d9e086602ba5619ce380197e692c03d19b92d7eea41a0fc07e34588c0f6d54d31e00b889fa2bf614d88d10b98822117cbb4666207 languageName: node linkType: hard @@ -10706,13 +10925,20 @@ __metadata: languageName: node linkType: hard -"ramda@npm:^0.29.0, ramda@npm:~0.29.1": +"ramda@npm:^0.29.0": version: 0.29.1 resolution: "ramda@npm:0.29.1" checksum: df7c627597a66d5f317f6ba77ad17d7ba818efc9c2c4a638440bc23f2c651e823970ea05b05a28895738c0e4b738fadbdc17b2c97b3ad922826febc09c859c44 languageName: node linkType: hard +"ramda@npm:^0.30.1, ramda@npm:~0.30.0": + version: 0.30.1 + resolution: "ramda@npm:0.30.1" + checksum: ce6f4b6b967a84a4e65c01ab1b1cdd73d46b8efe71aeccf5d1443c56c4e31a0ea82ece7df6510453dd3d83b92cabf8a6b4d50d189a1b35c08a6f44b281bebf79 + languageName: node + linkType: hard + "randexp@npm:^0.5.3": version: 0.5.3 resolution: "randexp@npm:0.5.3" @@ -10832,7 +11058,7 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^17.0.1, react-is@npm:^17.0.2": +"react-is@npm:^17.0.1": version: 17.0.2 resolution: "react-is@npm:17.0.2" checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8 @@ -10853,24 +11079,35 @@ __metadata: languageName: node linkType: hard -"react-redux@npm:^7.2.4": - version: 7.2.9 - resolution: "react-redux@npm:7.2.9" +"react-redux@npm:^8.0.5": + version: 8.1.3 + resolution: "react-redux@npm:8.1.3" dependencies: - "@babel/runtime": ^7.15.4 - "@types/react-redux": ^7.1.20 + "@babel/runtime": ^7.12.1 + "@types/hoist-non-react-statics": ^3.3.1 + "@types/use-sync-external-store": ^0.0.3 hoist-non-react-statics: ^3.3.2 - loose-envify: ^1.4.0 - prop-types: ^15.7.2 - react-is: ^17.0.2 + react-is: ^18.0.0 + use-sync-external-store: ^1.0.0 peerDependencies: - react: ^16.8.3 || ^17 || ^18 + "@types/react": ^16.8 || ^17.0 || ^18.0 + "@types/react-dom": ^16.8 || ^17.0 || ^18.0 + react: ^16.8 || ^17.0 || ^18.0 + react-dom: ^16.8 || ^17.0 || ^18.0 + react-native: ">=0.59" + redux: ^4 || ^5.0.0-beta.0 peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true react-dom: optional: true react-native: optional: true - checksum: 369a2bdcf87915659af9e5c55abfd9f52a84e43e0d12dcc108ed17dbe6933558b7b7fc12caa9c10c1a10a8be7df89454b6c96989d8573fedec1a772c94a1f145 + redux: + optional: true + checksum: 192ea6f6053148ec80a4148ec607bc259403b937e515f616a1104ca5ab357e97e98b8245ed505a17afee67a72341d4a559eaca9607968b4a422aa9b44ba7eb89 languageName: node linkType: hard @@ -11013,7 +11250,7 @@ __metadata: languageName: node linkType: hard -"redux@npm:^4.0.0, redux@npm:^4.1.2": +"redux@npm:^4.1.2": version: 4.2.1 resolution: "redux@npm:4.2.1" dependencies: @@ -11956,13 +12193,6 @@ __metadata: languageName: node linkType: hard -"stampit@npm:^4.3.2": - version: 4.3.2 - resolution: "stampit@npm:4.3.2" - checksum: 731dfe564b98371293bb5e7cb76bb195336dd3589af4e448d1478ac6c99091fd302fd7f41a255daa4b0ec2c1f14ea4f0cc0a2f05cd3d786b29ba531850ad7f62 - languageName: node - linkType: hard - "static-extend@npm:^0.1.1": version: 0.1.2 resolution: "static-extend@npm:0.1.2" @@ -12237,32 +12467,35 @@ __metadata: languageName: node linkType: hard -"swagger-client@npm:^3.19.0": - version: 3.27.0 - resolution: "swagger-client@npm:3.27.0" +"swagger-client@npm:^3.19.1": + version: 3.31.0 + resolution: "swagger-client@npm:3.31.0" dependencies: "@babel/runtime-corejs3": ^7.22.15 - "@swagger-api/apidom-core": ">=0.99.1 <1.0.0" - "@swagger-api/apidom-error": ">=0.99.0 <1.0.0" - "@swagger-api/apidom-json-pointer": ">=0.99.1 <1.0.0" - "@swagger-api/apidom-ns-openapi-3-1": ">=0.99.1 <1.0.0" - "@swagger-api/apidom-reference": ">=0.99.1 <1.0.0" - cookie: ~0.6.0 + "@scarf/scarf": =1.4.0 + "@swagger-api/apidom-core": ">=1.0.0-alpha.9 <1.0.0-beta.0" + "@swagger-api/apidom-error": ">=1.0.0-alpha.9 <1.0.0-beta.0" + "@swagger-api/apidom-json-pointer": ">=1.0.0-alpha.9 <1.0.0-beta.0" + "@swagger-api/apidom-ns-openapi-3-1": ">=1.0.0-alpha.9 <1.0.0-beta.0" + "@swagger-api/apidom-reference": ">=1.0.0-alpha.9 <1.0.0-beta.0" + cookie: ~0.7.2 deepmerge: ~4.3.0 fast-json-patch: ^3.0.0-1 - is-plain-object: ^5.0.0 js-yaml: ^4.1.0 + neotraverse: =0.6.18 node-abort-controller: ^3.1.1 node-fetch-commonjs: ^3.3.2 - qs: ^6.10.2 - traverse: ~0.6.6 - checksum: 7279ea2cb96dee71c428f758a7d983ee0a143cbcb1c11432d02327f1e4c65d39ca78f1c39dab7771cda54a4e04c57b33936287f23e663181c5058cbd2aea7477 + openapi-path-templating: ^1.5.1 + openapi-server-url-templating: ^1.0.0 + ramda: ^0.30.1 + ramda-adjunct: ^5.0.0 + checksum: 86b414dda317d5e9ca6efac8c04355016106e9e637b9b0bfb7a27c43f4b14e18a18c93ac108798ecc0e00c1937036f79fe103b98f551ef1e24fd54e0c3b756b0 languageName: node linkType: hard -"swagger-ui-react@npm:4.17.1": - version: 4.17.1 - resolution: "swagger-ui-react@npm:4.17.1" +"swagger-ui-react@npm:4.18.0": + version: 4.18.0 + resolution: "swagger-ui-react@npm:4.18.0" dependencies: "@babel/runtime-corejs3": ^7.18.9 "@braintree/sanitize-url": =6.0.2 @@ -12285,7 +12518,7 @@ __metadata: react-immutable-proptypes: 2.2.0 react-immutable-pure-component: ^2.2.0 react-inspector: ^6.0.1 - react-redux: ^7.2.4 + react-redux: ^8.0.5 react-syntax-highlighter: ^15.5.0 redux: ^4.1.2 redux-immutable: ^4.0.0 @@ -12293,7 +12526,7 @@ __metadata: reselect: ^4.1.5 serialize-error: ^8.1.0 sha.js: ^2.4.11 - swagger-client: ^3.19.0 + swagger-client: ^3.19.1 url-parse: ^1.5.8 xml: =1.0.1 xml-but-prettier: ^1.0.1 @@ -12301,7 +12534,7 @@ __metadata: peerDependencies: react: ">=17.0.0" react-dom: ">=17.0.0" - checksum: b0304741950e3a85ff38e21800c5622406293fd35c27c0af24bb15699c1bd9fff27cf24b2803292fb705f0681a9daad78602a0bb61d727b2095fa5bbe59c3dd3 + checksum: f904743fcfd9570ada150283fe278e4f21c8233e3997cb68174cde778091033e48b74993a2c7b9c4b588aa50abfff1840b8f4ade5070587f50e496a175dca401 languageName: node linkType: hard @@ -12518,13 +12751,6 @@ __metadata: languageName: node linkType: hard -"traverse@npm:~0.6.6": - version: 0.6.7 - resolution: "traverse@npm:0.6.7" - checksum: 21018085ab72f717991597e12e2b52446962ed59df591502e4d7e1a709bc0a989f7c3d451aa7d882666ad0634f1546d696c5edecda1f2fc228777df7bb529a1e - languageName: node - linkType: hard - "tree-sitter-json@npm:=0.20.2": version: 0.20.2 resolution: "tree-sitter-json@npm:0.20.2" @@ -12556,7 +12782,7 @@ __metadata: languageName: node linkType: hard -"ts-mixer@npm:^6.0.3": +"ts-mixer@npm:^6.0.3, ts-mixer@npm:^6.0.4": version: 6.0.4 resolution: "ts-mixer@npm:6.0.4" checksum: 36b1af526befd74345e736e9aa16f5c28876ebcea07784da14d929149fd7e6028cfd2fe9304c8efe8cb91b588443a9cc9e991df58e4c6e602326edbaae2af3ab @@ -12663,6 +12889,15 @@ __metadata: languageName: node linkType: hard +"types-ramda@npm:^0.30.1": + version: 0.30.1 + resolution: "types-ramda@npm:0.30.1" + dependencies: + ts-toolbelt: ^9.6.0 + checksum: 7af1b5b6dbb5878e5104013f7eca7feff999b538d98d59c91ce82e69908b31223b44a163271b0c13c9828c27f6cff39f78cff0f83d82b73ac47f74ffb3fe7ded + languageName: node + linkType: hard + "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2"