Croway commented on code in PR #22200:
URL: https://github.com/apache/camel/pull/22200#discussion_r2975896093


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java:
##########
@@ -370,33 +304,36 @@ protected void copyDockerFiles(String buildDir) throws 
Exception {
         Path docker = Path.of(buildDir).resolve("src/main/docker");
         Files.createDirectories(docker);
         String[] ids = gav.split(":");
-        String templateName = "templates/Dockerfile" + javaVersion + ".tmpl";
-        InputStream is = 
ExportCamelMain.class.getClassLoader().getResourceAsStream(templateName);
-        if (is == null) {
+
+        String ftlName = "Dockerfile" + javaVersion + ".ftl";
+        String context;
+        try {
+            Map<String, Object> model = new HashMap<>();

Review Comment:
   can this be extracted to avoid code duplication?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to