@Override
    protected void doExecute() throws Exception {
        File services = new File(servicesFile);
        if ( ! services.isFile())
            throw new IllegalArgumentException(servicesFile + " does not exist. Set correct path with -DservicesFile=<path to services.xml>");

        ZoneId zone = zoneOf(environment, region);
        Path output = Paths.get(outputDirectory).resolve("services-" + zone.environment().value() + "-" + zone.region().value() + ".xml");
        Tags tagz = Tags.fromString(tags);
        Files.write(output, effectiveServices(services, zone, CloudName.from(cloud), InstanceName.from(instance), tagz).getBytes(StandardCharsets.UTF_8));
        getLog().info("Effective services for " + zone +
                      ", instance " + instance +
                      ( tags == null ? "" : ", tags '" + tagz + "'") +
                      " written to " + output);
    }
Computes the effective services.xml for the indicated zone.

@author jonmv
@author olaa
vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/EffectiveServicesMojo.java