davsclaus commented on code in PR #9470: URL: https://github.com/apache/camel/pull/9470#discussion_r1126654824
########## dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java: ########## @@ -137,6 +137,9 @@ abstract class ExportBaseCommand extends CamelCommand { description = "Will be quiet, only print when error occurs") boolean quiet; + @CommandLine.Option(names = { "--additional-properties" }, description = "Additional maven properties, ex. --properties=prop1=foo,prop2=bar") Review Comment: I think the text should be `--additional-properties` in the example ########## dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java: ########## @@ -137,13 +139,20 @@ private void createSettingsGradle(File file) throws Exception { private void createMavenPom(File settings, File profile, File pom, Set<String> deps) throws Exception { String[] ids = gav.split(":"); - String context = readResourceTemplate("templates/spring-boot-pom.tmpl"); - Properties prop = new CamelCaseOrderedProperties(); RuntimeUtil.loadProperties(prop, settings); String repos = getMavenRepos(settings, prop, camelSpringBootVersion); CamelCatalog catalog = CatalogLoader.loadSpringBootCatalog(repos, camelSpringBootVersion); + + String context; + InputStream template = catalog.loadResource("camel-jbang", "spring-boot-pom.tmpl"); + if (template != null) { + context = new String(template.readAllBytes(), StandardCharsets.UTF_8); Review Comment: Can you try using String text = IOHelper.loadText(fis); We do this in the other commands ########## dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportSpringBoot.java: ########## @@ -137,13 +139,20 @@ private void createSettingsGradle(File file) throws Exception { private void createMavenPom(File settings, File profile, File pom, Set<String> deps) throws Exception { String[] ids = gav.split(":"); - String context = readResourceTemplate("templates/spring-boot-pom.tmpl"); - Properties prop = new CamelCaseOrderedProperties(); RuntimeUtil.loadProperties(prop, settings); String repos = getMavenRepos(settings, prop, camelSpringBootVersion); CamelCatalog catalog = CatalogLoader.loadSpringBootCatalog(repos, camelSpringBootVersion); + + String context; Review Comment: Can you add a code comment that we look in the catalog if there is a specialized template to use, if not we use the default template -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org