diff options
author | jonmv <venstad@gmail.com> | 2023-06-28 22:38:24 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2023-06-28 22:38:24 +0200 |
commit | 87e717e046e51be12eebe66f3da8b0201c3174d0 (patch) | |
tree | 6788d491926fda360b55d72517fcfa7e21c97bb5 | |
parent | 684882aefca3060117a022b897ccd295d9172cc2 (diff) |
Handle null tags (the default) in effective-services-mojo
-rw-r--r-- | vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/EffectiveServicesMojo.java | 7 |
1 files changed, 4 insertions, 3 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..8104b3c0330 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,11 +45,12 @@ 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 ) + - " written to " + output); + ( tags == null ? "" : ", tags '" + tagz) + + "' written to " + output); } static String effectiveServices(File servicesFile, ZoneId zone, InstanceName instance, Tags tags) throws Exception { |