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.assembliesnexus-assemblies
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.assembliesnexus-assemblies
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.assembliesnexus-assemblies
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.assembliesnexus-assemblies
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.assembliesnexus-assemblies
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.assembliesnexus-assemblies
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.nexusnexus-parent
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTorg.sonatype.nexus.assemblies
@@ -46,7 +46,7 @@
org.sonatype.nexusnexus-componentspom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -54,7 +54,7 @@
org.sonatype.nexus.pluginsnexus-pluginspom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-buildsupport-all
@@ -35,7 +35,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-commonspom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -43,7 +43,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-dbpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -51,7 +51,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-goodiespom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -59,7 +59,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-groovypom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -67,7 +67,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-guicepom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -75,7 +75,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-httpclientpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -83,7 +83,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-internalpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -91,7 +91,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-jettypom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -99,7 +99,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-jrubypom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -107,7 +107,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-loggingpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -115,7 +115,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-mavenpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -123,7 +123,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-metricspom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -131,7 +131,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-osgipom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -139,7 +139,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-otherpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -147,7 +147,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-restpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -155,7 +155,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-securitypom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -163,7 +163,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-testingpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
@@ -171,7 +171,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-uipom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-buildsupport-db
@@ -47,7 +47,7 @@
com.h2databaseh2
- 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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTextjs-maven-plugin
@@ -37,7 +37,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-allpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.nexusnexus-parent
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTorg.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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-buildsupport-rest
@@ -84,7 +84,7 @@
com.thoughtworks.xstreamxstream
- 1.4.20
+ 1.4.21xmlpull
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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-buildsupport-scripts
@@ -36,7 +36,7 @@
org.sonatype.nexus.buildsupportnexus-buildsupport-allpom
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTimport
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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.buildsupportnexus-buildsupport
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.nexusnexus-components
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.nexusnexus-components
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.nexusnexus-components
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.nexusnexus-components
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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.nexusnexus-components
- 3.75.0-SNAPSHOT
+ 3.76.0-SNAPSHOTnexus-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