Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions docs/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,43 @@ const tasks = Array.from(sourcesMap).flatMap(([type, definition]) => {
})
}

// Wraps gulp.src to gracefully handle ENOENT from ephemeral directories
// (e.g. .camel-jbang/work created/deleted by tests running in parallel).
// Each source pattern is processed as a separate gulp.src stream so that
// an ENOENT in one pattern (e.g. the dsl glob) doesn't abort the other
// patterns (e.g. core, components). Results are merged into a single
// passthrough stream.
const ignorePatterns = ['**/target/**', '**/.camel-jbang/**']
const resilientSrc = (source, options) => {
const patterns = Array.isArray(source) ? source : [source]
const passthrough = through2.obj()
let remaining = patterns.length

const onStreamDone = () => {
remaining--
if (remaining === 0) {
passthrough.end()
}
}

patterns.forEach(pattern => {
const src = gulp.src(pattern, options)
let done = false
src.on('data', chunk => passthrough.write(chunk))
src.on('error', err => {
if (err.code === 'ENOENT') {
console.error(`⚠️ ENOENT (skipped): ${err.path || err.message}`)
} else {
passthrough.destroy(err)
}
})
src.on('end', () => { if (!done) { done = true; onStreamDone() } })
src.on('close', () => { if (!done) { done = true; onStreamDone() } })
})

return passthrough
}

// creates symlinks from source to destination that satisfy the
// given filter removing the basedir from a path, i.e. symlinking
// from a flat hiearchy
Expand All @@ -327,10 +364,12 @@ const tasks = Array.from(sourcesMap).flatMap(([type, definition]) => {
}
})

return gulp.src(source, { ignore: ['**/target/**'] })
let fileCount = 0
return resilientSrc(source, { ignore: ignorePatterns, allowEmpty: true })
.pipe(filterFn)
.pipe(
map((file, done) => {
fileCount++
// this flattens the output to just .../pages/.../file.ext
// instead of .../pages/camel-.../src/main/docs/.../file.ext
file.base = path.dirname(file.path)
Expand All @@ -340,6 +379,9 @@ const tasks = Array.from(sourcesMap).flatMap(([type, definition]) => {
.pipe(gulp.symlink(destination, {
relativeSymlinks: true,
}))
.on('end', () => {
console.log(` → symlinked ${fileCount} files to ${destination}`)
})
}

// generates sorted & grouped nav.adoc file from a set of .adoc
Expand Down Expand Up @@ -410,7 +452,7 @@ const tasks = Array.from(sourcesMap).flatMap(([type, definition]) => {
return done()
}

return gulp.src(source, { ignore: ['**/target/**'] }) // asciidoc files
return resilientSrc(source, { ignore: ignorePatterns, allowEmpty: true }) // asciidoc files
.pipe(through2.obj(extractExamples)) // extracted example files
// symlink links from a fixed directory, i.e. we could link to
// the example files from `destination`, that would not work for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
= camel bind

Bind source and sink Kamelets as a new Camel integration
DEPRECATED: Bind source and sink Kamelets as a new Camel integration


CAUTION: This command is deprecated.


== Usage
Expand All @@ -20,7 +23,7 @@ camel bind [options]
|===
| Option | Description | Default | Type
| `--error-handler` | Add error handler (none|log|sink:<endpoint>). Sink endpoints are expected in the format [[apigroup/]version:]kind:[namespace/]name, plain Camel URIs or Kamelet name. | | String
| `--output` | Output format generated by this command (supports: file, yaml or json). | file | String
| `--output` | Output format generated by this command (supports: file, yaml, json). | file | String
| `--property` | Adds a pipe property in the form of [source|sink|error-handler|step-<n>].<key>=<value> where <n> is the step number starting from 1 | | String
| `--sink` | Sink (to) such as a Kamelet or Camel endpoint uri | | String
| `--source` | Source (from) such as a Kamelet or Camel endpoint uri | | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ camel catalog component [options]
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
| `--repo,--repos` | Additional maven repositories for download on-demand (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | | RuntimeType
| `--since-after` | Filter by version more recent (inclusive) | | String
| `--since-before` | Filter by version older (inclusive) | | String
| `--sort` | Sort by name, support-level, or description | name | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ camel catalog dataformat [options]
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
| `--repo,--repos` | Additional maven repositories for download on-demand (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | | RuntimeType
| `--since-after` | Filter by version more recent (inclusive) | | String
| `--since-before` | Filter by version older (inclusive) | | String
| `--sort` | Sort by name, support-level, or description | name | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ camel catalog dev-console [options]
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
| `--repo,--repos` | Additional maven repositories for download on-demand (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | | RuntimeType
| `--since-after` | Filter by version more recent (inclusive) | | String
| `--since-before` | Filter by version older (inclusive) | | String
| `--sort` | Sort by name, support-level, or description | name | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ camel catalog language [options]
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
| `--repo,--repos` | Additional maven repositories for download on-demand (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | | RuntimeType
| `--since-after` | Filter by version more recent (inclusive) | | String
| `--since-before` | Filter by version older (inclusive) | | String
| `--sort` | Sort by name, support-level, or description | name | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ camel catalog other [options]
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
| `--repo,--repos` | Additional maven repositories for download on-demand (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | | RuntimeType
| `--since-after` | Filter by version more recent (inclusive) | | String
| `--since-before` | Filter by version older (inclusive) | | String
| `--sort` | Sort by name, support-level, or description | name | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ camel catalog transformer [options]
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
| `--repo,--repos` | Additional maven repositories for download on-demand (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | | RuntimeType
| `--since-after` | Filter by version more recent (inclusive) | | String
| `--since-before` | Filter by version older (inclusive) | | String
| `--sort` | Sort by name, support-level, or description | name | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ camel cmd logger [options]
|===
| Option | Description | Default | Type
| `--logger` | The logger name | root | String
| `--logging-level` | To change logging level () | | String
| `--logging-level` | To change logging level (ERROR, WARN, INFO, DEBUG, TRACE) | | String
| `--sort` | Sort by pid, name or age | pid | String
| `-h,--help` | Display the help and sub-commands | | boolean
|===
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ camel cmd receive [options]
| `--logging-color` | Use colored logging | true | boolean
| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys | | boolean
| `--only-body` | Show only message body in received messages | false | boolean
| `--output` | Output format (text or json) | | String
| `--output` | Output format (auto, true, false) | | String
| `--prefix` | Print prefix with running Camel integration name. auto=only prefix when running multiple integrations. true=always prefix. false=prefix off. | auto | String
| `--pretty` | Pretty print message body when using JSon or XML format | | boolean
| `--prop,--property` | Additional properties; override existing (only applicable when NOT using an existing running Camel) | | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TIP: You can also use `camel --help` or `camel <command> --help` to see availabl
[cols="2,5",options="header"]
|===
| Command | Description
| xref:jbang-commands/camel-jbang-bind.adoc[camel bind] | Bind source and sink Kamelets as a new Camel integration
| xref:jbang-commands/camel-jbang-bind.adoc[camel bind] | DEPRECATED: Bind source and sink Kamelets as a new Camel integration
| xref:jbang-commands/camel-jbang-catalog.adoc[camel catalog] | List artifacts from Camel Catalog
| xref:jbang-commands/camel-jbang-cmd.adoc[camel cmd] | Performs commands in the running Camel integrations, such as start/stop route, or change logging levels.
| xref:jbang-commands/camel-jbang-completion.adoc[camel completion] | Generate completion script for bash/zsh
Expand Down Expand Up @@ -43,4 +43,5 @@ TIP: You can also use `camel --help` or `camel <command> --help` to see availabl
| xref:jbang-commands/camel-jbang-transform.adoc[camel transform] | Transform message or Camel routes
| xref:jbang-commands/camel-jbang-update.adoc[camel update] | Update Camel project
| xref:jbang-commands/camel-jbang-version.adoc[camel version] | Manage Camel versions
| xref:jbang-commands/camel-jbang-wrapper.adoc[camel wrapper] | Install Camel wrapper scripts for version pinning
|===
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ camel debug [options]
| `--gav` | The Maven group:artifact:version (used during exporting) | | String
| `--health` _(deprecated)_ | Deprecated: use --observe instead. Health check at /q/health on local HTTP server (port 8080 by default) | false | boolean
| `--ignore-loading-error` | Whether to ignore route loading and compilation errors (use this with care!) | false | boolean
| `--java-version` | Java version (21, 25) | 21 | String
| `--jfr` | Enables Java Flight Recorder saving recording to disk on exit | false | boolean
| `--jfr-profile` | Java Flight Recorder profile to use (such as default or profile) | | String
| `--jvm-debug` | To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port | | int
Expand All @@ -45,10 +46,10 @@ camel debug [options]
| `--log-lines` | Number of log lines to display on top of screen | 10 | int
| `--logging` | Can be used to turn off logging | true | boolean
| `--logging-category` | Used for individual logging levels (ex: org.apache.kafka=DEBUG) | | List
| `--logging-color` | Use colored logging | true | boolean
| `--logging-color` | Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities | | boolean
| `--logging-config-path` | Path to file with custom logging configuration | | String
| `--logging-json` | Use JSON logging (ECS Layout) | false | boolean
| `--logging-level` | Logging level () | info | String
| `--logging-level` | Logging level (ERROR, WARN, INFO, DEBUG, TRACE) | info | String
| `--management-port` | To use a dedicated port for HTTP management (use 0 to dynamic assign a free random port number) | | int
| `--mask` | Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys | | boolean
| `--maven-apache-snapshot-enabled` | Whether downloading JARs from ASF Maven Snapshot repository is enabled | true | boolean
Expand All @@ -67,7 +68,7 @@ camel debug [options]
| `--package-scan-jars` | Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang | false | boolean
| `--port` | Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number) | | int
| `--pretty` | Pretty print message body when using JSon or XML format | | boolean
| `--profile` | Profile to run (dev, test, or prod). | dev | String
| `--profile` | Profile to run (dev, test, prod). | dev | String
| `--prompt` | Allow user to type in required parameters in prompt if not present in application | false | boolean
| `--prop,--property` | Additional properties (override existing) | | String
| `--properties` | comma separated list of properties file (ex. /path/to/file.properties,/path/to/other.properties | | String
Expand All @@ -77,13 +78,13 @@ camel debug [options]
| `--reload,--dev` | Enables dev mode (live reload when source files are updated and saved) | | boolean
| `--remote-attach` | Attaches debugger remotely to an existing running Camel integration. (Add camel-cli-debug JAR to the existing Camel application and run before attaching this debugger) | | boolean
| `--repo,--repos` | Additional maven repositories (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | camel-main | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | camel-main | RuntimeType
| `--show-body` | Show message body in debug messages | true | boolean
| `--show-exception` | Show exception and stacktrace for failed messages | true | boolean
| `--show-exchange-properties` | Show exchange properties in debug messages | false | boolean
| `--show-exchange-variables` | Show exchange variables in debug messages | true | boolean
| `--show-headers` | Show message headers in debug messages | true | boolean
| `--skip-plugins` | Skip plugins during export | false | boolean
| `--skip-plugins` | Skip resolving plugin dependencies | false | boolean
| `--source` | Prefer to display source filename/code instead of IDs | | boolean
| `--source-dir` | Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time. | | String
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ camel dependency copy [options]
| `--dep,--dependency` | Add additional dependencies | | List
| `--dir,--directory` | Directory where the project will be exported | . | String
| `--download` | Whether to allow automatic downloading JAR dependencies (over the internet) | true | boolean
| `--dry-run` | Preview export without writing files | false | boolean
| `--exclude` | Exclude files by name or pattern | | List
| `--fresh` | Make sure we use fresh (i.e. non-cached) resources | false | boolean
| `--gav` | The Maven group:artifact:version | | String
Expand All @@ -38,7 +39,7 @@ camel dependency copy [options]
| `--lazy-bean` | Whether to use lazy bean initialization (can help with complex classloading issues | true | boolean
| `--local-kamelet-dir` | Local directory for loading Kamelets (takes precedence) | | String
| `--logging` | Can be used to turn on logging to console (logs by default to file in <user home>/.camel directory) | false | boolean
| `--logging-level` | Logging level | info | String
| `--logging-level` | Logging level (ERROR, WARN, INFO, DEBUG, TRACE) | info | String
| `--main-classname` | The class name of the Camel Main application class | CamelApplication | String
| `--management-port` | To use a dedicated port for HTTP management | | int
| `--maven-apache-snapshot-enabled` | Whether downloading JARs from ASF Maven Snapshot repository is enabled | true | boolean
Expand All @@ -54,17 +55,19 @@ camel dependency copy [options]
| `--package-name` | For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files. | | String
| `--package-scan-jars` | Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel JBang | false | boolean
| `--port` | Embeds a local HTTP server on this port | | int
| `--profile` | Profile to export (dev, test, or prod). | | String
| `--profile` | Profile to export (dev, test, prod). | | String
| `--prop,--property` | Camel application properties, ex. --property=prop1=foo | | String
| `--quarkus-artifact-id` | Quarkus Platform Maven artifactId | quarkus-bom | String
| `--quarkus-group-id` | Quarkus Platform Maven groupId | io.quarkus.platform | String
| `--quarkus-package-type` | Quarkus package type (uber-jar or fast-jar) | uber-jar | String
| `--quarkus-version` | Quarkus Platform version | RuntimeType.QUARKUS_VERSION | String
| `--quiet` | Will be quiet, only print when error occurs | false | boolean
| `--repo,--repos` | Additional maven repositories (Use commas to separate multiple repositories) | | String
| `--runtime` | Runtime () | | RuntimeType
| `--runtime` | Runtime (camel-main, spring-boot, quarkus) | | RuntimeType
| `--skip-plugins` | Skip plugins during export | false | boolean
| `--spring-boot-version` | Spring Boot version | RuntimeType.SPRING_BOOT_VERSION | String
| `--verbose` | Verbose output of startup activity (dependency resolution and downloading | false | boolean
| `--yes,-y` | Automatically answer yes to confirmation prompts (e.g. when using --clean-dir) | false | boolean
| `-h,--help` | Display the help and sub-commands | | boolean
|===

Expand Down
Loading
Loading