fix: align tool module handling with dap-was naming
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 1m55s
All checks were successful
Deploy to OCIWP / deploy (push) Successful in 1m55s
This commit is contained in:
@@ -18,10 +18,10 @@ public class PodScaffolder {
|
||||
System.out.println(" MCP Tool Pod Scaffolder (Java CLI) ");
|
||||
System.out.println("=========================================\n");
|
||||
|
||||
String rawModuleName = getOrAsk(args, 0, scanner, "1. 생성할 모듈(Pod) 이름 (예: payment 또는 dap-tool-payment): ");
|
||||
String moduleName = rawModuleName.startsWith("dap-tool-") ? rawModuleName : "dap-tool-" + rawModuleName;
|
||||
String rawModuleName = getOrAsk(args, 0, scanner, "1. 생성할 모듈(Pod) 이름 (예: payment 또는 dap-was-payment): ");
|
||||
String moduleName = rawModuleName.startsWith("dap-was-") ? rawModuleName : "dap-was-" + rawModuleName;
|
||||
String portStr = getOrAsk(args, 1, scanner, "2. 사용할 포트 번호 (예: 8085): ");
|
||||
String shortName = moduleName.replace("dap-tool-", "").replace("-", "");
|
||||
String shortName = moduleName.replace("dap-was-", "").replace("-", "");
|
||||
|
||||
String defaultAuthor = System.getProperty("user.name");
|
||||
String defaultDate = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy.MM.dd"));
|
||||
|
||||
@@ -673,8 +673,9 @@ public class ToolScaffolder {
|
||||
}
|
||||
|
||||
private static String toToolName(String moduleName, String group, String baseName) {
|
||||
String pod = moduleName.startsWith("dap-tool-")
|
||||
? moduleName.substring("dap-tool-".length())
|
||||
String moduleDirectory = Path.of(moduleName).getFileName().toString();
|
||||
String pod = moduleDirectory.startsWith("dap-was-")
|
||||
? moduleDirectory.substring("dap-was-".length())
|
||||
: "oth";
|
||||
String normalizedName = baseName.replaceAll("([a-z0-9])([A-Z])", "$1 $2")
|
||||
.toLowerCase(Locale.ROOT)
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.stream.Stream;
|
||||
public class ToolSourceUpdater {
|
||||
|
||||
public static void updateToolSource(String toolName, String domainGroup, String description, boolean register, Boolean requiresApproval) throws Exception {
|
||||
// 1. Find all *UseCase.java files in dap-tool-* directories
|
||||
// 1. Find all *UseCase.java files in dap-was-* directories
|
||||
String envSourceDir = System.getenv("AXHUB_SOURCE_DIR");
|
||||
Path rootDir = envSourceDir != null ? Paths.get(envSourceDir) : Paths.get(".");
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ToolSourceUpdater {
|
||||
javaFiles = paths
|
||||
.filter(Files::isRegularFile)
|
||||
.filter(p -> p.toString().endsWith("UseCase.java"))
|
||||
.filter(p -> p.toString().contains("dap-tool-") || p.toString().contains("axhub-tool-"))
|
||||
.filter(p -> p.toString().contains("dap-was-") || p.toString().contains("axhub-tool-"))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public final class McpToolNameValidator {
|
||||
|
||||
try (var modules = Files.list(projectRoot)) {
|
||||
modules.filter(Files::isDirectory)
|
||||
.filter(path -> path.getFileName().toString().startsWith("dap-tool-"))
|
||||
.filter(path -> path.getFileName().toString().startsWith("dap-was-"))
|
||||
.filter(path -> !path.getFileName().toString().equals("dap-was-lib"))
|
||||
.sorted()
|
||||
.forEach(module -> collectDeclarations(module, declarationsByName));
|
||||
|
||||
Reference in New Issue
Block a user