summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2023-06-28 23:16:25 +0200
committerGitHub <noreply@github.com>2023-06-28 23:16:25 +0200
commit52b2a08d1360a69ccb6393c29927d2b5e8e72b91 (patch)
treef1851b02242e3963ad1f7c845326f5fac9c804cc
parent684882aefca3060117a022b897ccd295d9172cc2 (diff)
parent9ce892e6682287b4d4a2552834451e8a324ad553 (diff)
Merge pull request #27574 from vespa-engine/jonmv/handle-null-tags-in-effective-services
Handle null tags (the default) in effective-services-mojo
-rw-r--r--vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/EffectiveServicesMojo.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/EffectiveServicesMojo.java b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/EffectiveServicesMojo.java
index 7eae86057d4..718cf790ab4 100644
--- a/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/EffectiveServicesMojo.java
+++ b/vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/EffectiveServicesMojo.java
@@ -45,10 +45,11 @@ public class EffectiveServicesMojo extends AbstractVespaDeploymentMojo {
ZoneId zone = zoneOf(environment, region);
Path output = Paths.get(outputDirectory).resolve("services-" + zone.environment().value() + "-" + zone.region().value() + ".xml");
- Files.write(output, effectiveServices(services, zone, InstanceName.from(instance), Tags.fromString(tags)).getBytes(StandardCharsets.UTF_8));
+ Tags tagz = Tags.fromString(tags);
+ Files.write(output, effectiveServices(services, zone, InstanceName.from(instance), tagz).getBytes(StandardCharsets.UTF_8));
getLog().info("Effective services for " + zone +
", instance " + instance +
- ( tags.isEmpty() ? "" : ", tags " + tags ) +
+ ( tags == null ? "" : ", tags '" + tagz + "'") +
" written to " + output);
}