You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "orpiske (via GitHub)" <gi...@apache.org> on 2026/06/24 14:58:16 UTC

[PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

orpiske opened a new pull request, #24234:
URL: https://github.com/apache/camel/pull/24234

   ## Summary
   
   Add a `directories` parameter to the `camel-yaml-dsl-validator-maven-plugin` that allows users to specify additional directories to scan for YAML files, beyond the default Maven resource directories.
   
   This addresses [CAMEL-23820](https://issues.apache.org/jira/browse/CAMEL-23820), where the plugin only supported files in Maven resource directories, preventing usage in projects that store YAML routes in other locations.
   
   ## Changes
   
   - Added `directories` parameter (`@Parameter(property = "camel.directories")`) accepting a list of directory paths
   - Both relative and absolute paths are supported; relative paths are resolved against the project base directory
   - Custom directories are scanned **in addition to** the default resource directories (backward compatible)
   - Updated the documentation with the new option and a usage example
   - Added unit tests covering: absolute paths, relative paths, null directories, combined resources + custom dirs, and `.camel.yaml` extension filtering
   
   ## Test plan
   
   - [x] Unit tests pass (5 new tests in `ValidateMojoTest`)
   - [x] Module build passes (`mvn verify`)
   - [x] Full root build passes (`mvnd -Dquickly clean install`)
   
   _Claude Code on behalf of Otavio Rodolfo Piske_


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24234:
URL: https://github.com/apache/camel/pull/24234#issuecomment-4791634235

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `docs`
   - `dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin`
   
   :white_check_mark: **POM dependency changes: targeted tests included**
   
   <details><summary>Modules affected by dependency changes (2)</summary>
   
   - `:camel-yaml-dsl-validator-maven-plugin`
   - `:docs`
   
   </details>
   
   <details><summary>All tested modules (2 modules)</summary>
   
   - Camel :: Docs
   - Camel :: YAML DSL :: Validator Maven Plugin
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/28113230501)


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #24234:
URL: https://github.com/apache/camel/pull/24234#issuecomment-4790624988

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #24234:
URL: https://github.com/apache/camel/pull/24234


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #24234:
URL: https://github.com/apache/camel/pull/24234#issuecomment-4790992823

   There are uncommitted changes
   HEAD detached at pull/24234/merge
   Changes not staged for commit:
     (use "git add <file>..." to update what will be committed)
     (use "git restore <file>..." to discard changes in working directory)
   	modified:   docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #24234:
URL: https://github.com/apache/camel/pull/24234#discussion_r3468124820


##########
dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin/src/main/docs/camel-yaml-dsl-validator-maven-plugin.adoc:
##########
@@ -113,6 +114,34 @@ mvn camel-yaml-dsl-validator:validate -Dcamel.excludes=cheese.yaml
 
 Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.excludes` as the option name.
 
+=== Validating with additional directories
+
+If your YAML route files are stored in a location outside the standard Maven resource directories, you can specify additional directories to scan:
+
+[source,xml]
+----
+<plugin>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-yaml-dsl-validate-maven-plugin</artifactId>

Review Comment:
   Typo in `artifactId`: this says `camel-yaml-dsl-validate-maven-plugin` but should be `camel-yaml-dsl-validator-maven-plugin` (missing `r`).
   
   ```suggestion
     <artifactId>camel-yaml-dsl-validator-maven-plugin</artifactId>
   ```



-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on code in PR #24234:
URL: https://github.com/apache/camel/pull/24234#discussion_r3468641729


##########
dsl/camel-yaml-dsl/camel-yaml-dsl-validator-maven-plugin/src/main/docs/camel-yaml-dsl-validator-maven-plugin.adoc:
##########
@@ -113,6 +114,34 @@ mvn camel-yaml-dsl-validator:validate -Dcamel.excludes=cheese.yaml
 
 Notice that you must prefix the `-D` command argument with `camel.`, eg `camel.excludes` as the option name.
 
+=== Validating with additional directories
+
+If your YAML route files are stored in a location outside the standard Maven resource directories, you can specify additional directories to scan:
+
+[source,xml]
+----
+<plugin>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-yaml-dsl-validate-maven-plugin</artifactId>

Review Comment:
   Fixed — and also corrected the same typo on lines 29 and 51 which were pre-existing (from the original PR that introduced the plugin). The generated docs copy at `docs/user-manual/` is now synced and committed as well.
   
   _Claude Code on behalf of Otavio Rodolfo Piske_



-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23820: support custom directories in YAML DSL validator plugin [camel]

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on PR #24234:
URL: https://github.com/apache/camel/pull/24234#issuecomment-4791431735

   Thanks for catching both issues. Fixed the `artifactId` typo (including 2 pre-existing instances on lines 29 and 51) and committed the synced docs copy at `docs/user-manual/modules/ROOT/pages/camel-yaml-dsl-validator-maven-plugin.adoc`.
   
   _Claude Code on behalf of Otavio Rodolfo Piske_


-- 
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-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org