Croway opened a new pull request, #30289: URL: https://github.com/apache/camel/pull/30289
JIRA: [CAMEL-27116](https://issues.apache.org/jira/browse/CAMEL-27116) - Some consumer options of the file components start but do not do what they say: `noop=true` with `delete=true` deletes the files (delete wins), `noop=true` with `move` does not move them (noop wins), a fixed `fileName=*.csv` is compared with `equals` and consumes no file, and `file:classpath:data` is a directory of the file system named `classpath:data`. Nothing is logged for any of them. - `GenericFileEndpoint.warnIfConsumerOptionsConflict()` logs a WARN for the first three when the consumer is created (also for `poll` / `pollEnrich`), naming the option to use. `FileEndpoint`, `RemoteFileEndpoint` (ftp, ftps, sftp, azure-files, mina-sftp) and `SmbEndpoint` call it next to the idempotent-options WARN. A custom `processStrategy` skips the noop WARNs. `FileComponent` logs a WARN for a directory that starts with `classpath:` or `resource:`, pointing to `language:constant:resource:classpath:...`. Behaviour does not change: these routes start and run as before. - `include` / `exclude` with a wildcard (`include=*.xml`) failed with only the regex parser message (`Dangling meta character '*' near index 0`). The message keeps that text and adds that the option is a regular expression (such as `.*\.xml`) and names `antInclude` / `antExclude` and `includeExt` / `excludeExt`. - The `${ }` directory error keeps its text and adds that the directory is fixed when the endpoint is created, with `toD` to write and `pollEnrich` with a simple expression to read. - Docs: the `fileName`, `include` and `exclude` option descriptions (regenerated JSON, catalog and endpoint DSL) and file-component.adoc say the above. ftp-component.adoc and azure-files-component.adoc no longer say that the ANT path matcher needs camel-spring. Tests: `FileConsumerNoopWithDeleteOrMoveTest`, `FileConsumerFileNameWildcardTest`, `FileConsumerIncludeExcludeNotRegexTest`, `FileComponentClasspathDirectoryTest`, `FileInvalidStartingPathTest` (camel-core), `RemoteFileEndpointConflictingConsumerOptionsTest` (camel-ftp, ftp/ftps/sftp), `SmbEndpointConflictingConsumerOptionsTest` (camel-smb). 23 of the 62 new test cases fail on main (no WARN, old messages) and all pass with the change; the others are controls (options that do what they say do not warn, the file is still deleted / not moved / not matched, `antInclude` and a regex `include` still work). No upgrade guide entry: only new WARN logs and longer error messages, no change of behaviour. _Claude Code on behalf of Federico Mariani_ -- 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]
