davsclaus commented on a change in pull request #6583:
URL: https://github.com/apache/camel/pull/6583#discussion_r773865999



##########
File path: 
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CreateProject.java
##########
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.dsl.jbang.core.commands;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.concurrent.Callable;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+import freemarker.template.TemplateExceptionHandler;
+import org.apache.camel.dsl.jbang.core.generator.CamelJbangGenerator;
+import org.apache.camel.dsl.jbang.core.generator.QuarkusGenerator;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "create-project", description = "Creates 
Camel-Quarkus project")
+public class CreateProject implements Callable<Integer> {
+
+    private static final String PACKAGE_REGEX = 
"package\\s+([a-zA_Z_][\\.\\w]*);";
+    private static final Pattern PACKAGE_PATTERN = 
Pattern.compile(PACKAGE_REGEX);
+    //CHECKSTYLE:ON
+    @CommandLine.Parameters(description = "The Camel file(s) to run", arity = 
"1")

Review comment:
       to run -> to include in the created project

##########
File path: 
dsl/camel-jbang/camel-jbang-core/src/main/resources/generator/quarkus-pom.ftl
##########
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--

Review comment:
       We should not include ASF license in the generated project code, as end 
users can use this for their own projects that is not ASF licensed

##########
File path: 
dsl/camel-jbang/camel-jbang-core/src/main/resources/generator/quarkus-pom.ftl
##########
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+         http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+       <modelVersion>4.0.0</modelVersion>
+
+       <artifactId>${name}</artifactId>
+       <groupId>org.apache.camel.jbang</groupId>

Review comment:
       I think you should be able to configure the groupId also




-- 
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


Reply via email to