release-scripts/src/main/java/software/amazon/awssdk/release/CreateNewServiceModuleMain.java [113:155]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    protected void run(CommandLine commandLine) throws Exception {
        new NewServiceCreator(commandLine).run();
    }

    private static class NewServiceCreator {
        private final Path mavenProjectRoot;
        private final String mavenProjectVersion;
        private final String serviceModuleName;
        private final String serviceId;
        private final String serviceProtocol;
        private final Set<String> internalDependencies;

        private NewServiceCreator(CommandLine commandLine) {
            this.mavenProjectRoot = Paths.get(commandLine.getOptionValue("maven-project-root").trim());
            this.mavenProjectVersion = commandLine.getOptionValue("maven-project-version").trim();
            this.serviceModuleName = commandLine.getOptionValue("service-module-name").trim();
            this.serviceId = commandLine.getOptionValue("service-id").trim();
            this.serviceProtocol = transformSpecialProtocols(commandLine.getOptionValue("service-protocol").trim());
            this.internalDependencies = computeInternalDependencies(toList(commandLine
                                                                               .getOptionValues("include-internal-dependency")),
                                                                    toList(commandLine
                                                                               .getOptionValues("exclude-internal-dependency")));
            Validate.isTrue(Files.exists(mavenProjectRoot), "Project root does not exist: " + mavenProjectRoot);
        }

        private String transformSpecialProtocols(String protocol) {
            switch (protocol) {
                case "ec2": return "aws-query";
                case "rest-xml": return "aws-xml";
                case "rest-json": return "aws-json";
                case "rpc-v2-cbor": return "smithy-rpcv2";
                default: return "aws-" + protocol;
            }
        }

        public void run() throws Exception {
            Path servicesRoot = mavenProjectRoot.resolve("services");
            Path templateModulePath = servicesRoot.resolve("new-service-template");
            Path newServiceModulePath = servicesRoot.resolve(serviceModuleName);

            createNewModuleFromTemplate(templateModulePath, newServiceModulePath);
            replaceTemplatePlaceholders(newServiceModulePath);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



release-scripts/src/main/java/software/amazon/awssdk/release/NewServiceMain.java [70:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @Override
    protected void run(CommandLine commandLine) throws Exception {
        new NewServiceCreator(commandLine).run();
    }

    private static class NewServiceCreator {
        private final Path mavenProjectRoot;
        private final String mavenProjectVersion;
        private final String serviceModuleName;
        private final String serviceId;
        private final String serviceProtocol;
        private final Set<String> internalDependencies;

        private NewServiceCreator(CommandLine commandLine) {
            this.mavenProjectRoot = Paths.get(commandLine.getOptionValue("maven-project-root").trim());
            this.mavenProjectVersion = commandLine.getOptionValue("maven-project-version").trim();
            this.serviceModuleName = commandLine.getOptionValue("service-module-name").trim();
            this.serviceId = commandLine.getOptionValue("service-id").trim();
            this.serviceProtocol = transformSpecialProtocols(commandLine.getOptionValue("service-protocol").trim());
            this.internalDependencies = computeInternalDependencies(toList(commandLine
                                                                               .getOptionValues("include-internal-dependency")),
                                                                    toList(commandLine
                                                                               .getOptionValues("exclude-internal-dependency")));
            Validate.isTrue(Files.exists(mavenProjectRoot), "Project root does not exist: " + mavenProjectRoot);
        }

        private String transformSpecialProtocols(String protocol) {
            switch (protocol) {
                case "ec2": return "aws-query";
                case "rest-xml": return "aws-xml";
                case "rest-json": return "aws-json";
                case "rpc-v2-cbor": return "smithy-rpcv2";
                default: return "aws-" + protocol;
            }
        }

        public void run() throws Exception {
            Path servicesRoot = mavenProjectRoot.resolve("services");
            Path templateModulePath = servicesRoot.resolve("new-service-template");
            Path newServiceModulePath = servicesRoot.resolve(serviceModuleName);

            createNewModuleFromTemplate(templateModulePath, newServiceModulePath);
            replaceTemplatePlaceholders(newServiceModulePath);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



