davsclaus commented on code in PR #23333: URL: https://github.com/apache/camel/pull/23333#discussion_r3273226352
########## dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/QuarkusExtensionRegistryMixin.java: ########## @@ -0,0 +1,63 @@ +/* + * 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.nio.file.Path; + +import org.apache.camel.dsl.jbang.core.common.QuarkusHelper; +import org.apache.camel.dsl.jbang.core.common.RuntimeType; +import picocli.CommandLine; + +/** + * Options related to Quarkus Platform Extension Registry. + */ +public class QuarkusExtensionRegistryMixin { + + @CommandLine.Option(names = { + "--quarkus-ext-registry" }, + description = """ + The base URI of Quarkus Extension Registry. + The default is {@value RuntimeType#QUARKUS_EXTENSION_REGISTRY_BASE_URL} unless camel.jbang.quarkus.platform.url + system property is set (the "/client/platforms" suffix is removed if present). + """) + String quarkusExtensioRegistryBaseUri; + Review Comment: Typo: `quarkusExtensioRegistryBaseUri` is missing an 'n' in "Extension" — should be `quarkusExtensionRegistryBaseUri`. This propagates to 35 occurrences across the codebase including the user-facing property name `camel.jbang.quarkusExtensioRegistryBaseUri`. Worth fixing now before it becomes a permanent API wart. ########## catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/jbang/camel-jbang-configuration-metadata.json: ########## @@ -37,9 +37,13 @@ { "name": "camel.jbang.openApi", "required": false, "description": "File name of open-api spec file (JSON or YAML) to generate routes from the swagger\/openapi API spec file.", "type": "string", "javaType": "String", "secret": false }, { "name": "camel.jbang.packageScanJars", "required": false, "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang", "label": "advanced", "type": "boolean", "javaType": "boolean", "defaultValue": false, "secret": false }, { "name": "camel.jbang.prompt", "required": false, "description": "Allow user to type in required parameters in prompt if not present in application", "label": "advanced", "type": "boolean", "javaType": "boolean", "defaultValue": false, "secret": false }, - { "name": "camel.jbang.quarkusArtifactId", "required": false, "description": "Quarkus Platform Maven artifactId", "label": "quarkus", "type": "string", "javaType": "String", "secret": false }, - { "name": "camel.jbang.quarkusGroupId", "required": false, "description": "Quarkus Platform Maven groupId", "label": "quarkus", "type": "string", "javaType": "String", "secret": false }, - { "name": "camel.jbang.quarkusVersion", "required": false, "description": "Quarkus Platform version", "label": "quarkus", "type": "string", "javaType": "String", "secret": false }, + { "name": "camel.jbang.quarkusArtifactId", "required": false, "description": "artifactId of Quarkus Platform BOM", "label": "quarkus", "type": "string", "javaType": "String", "secret": false, "deprecated": true }, + { "name": "camel.jbang.quarkusArtifactId", "required": false, "description": "artifactId of Camel Quarkus Platform BOM", "label": "quarkus", "type": "string", "javaType": "String", "secret": false }, Review Comment: Duplicate property names: `camel.jbang.quarkusArtifactId`, `camel.jbang.quarkusGroupId`, and `camel.jbang.quarkusVersion` each appear twice — once for Quarkus Platform BOM and once for Camel Quarkus Platform BOM. These would conflict in `application.properties`. The Camel Quarkus-specific ones need distinct names (e.g., `camel.jbang.camelQuarkusArtifactId`, `camel.jbang.camelQuarkusGroupId`, `camel.jbang.camelQuarkusVersion`). ########## dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/CamelJBangConstants.java: ########## @@ -203,6 +221,10 @@ public final class CamelJBangConstants { javaType = "boolean", defaultValue = "true") public static final String DOWNLOAD = "camel.jbang.download"; + @Metadata(description = "Whether to force usin fresh (i.e. non-cached) resources", + javaType = "boolean", defaultValue = "true") + public static final String FRESH = "camel.jbang.fresh"; + Review Comment: Two issues here: 1. **Default value mismatch**: `defaultValue = "true"` here, but the actual CLI option in `MavenResolverMixin` has `defaultValue = "false"`. The generated docs and metadata will show `true`, misleading users. 2. **Typo in description**: `"Whether to force usin fresh"` — missing 'g' in "using". ```suggestion @Metadata(description = "Whether to force using fresh (i.e. non-cached) resources", javaType = "boolean", defaultValue = "false") ``` -- 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]
