Change Camel component URI in Java
Apache 2.0Transforms component URIs in Java code using regular expressions with capturing groups.
org. apache. camel. upgrade. customRecipes. internal. ChangeJavaComponentUriRecipeRequired
Regular expression to match the component URI. Use capturing groups for parts to preserve.
Replacement string using ${1}, ${2}, etc. to reference capturing groups from the pattern.
Optional
consumerOnlyBoolean
When true, only URIs passed to from(...)/fromF(...) are transformed; producer endpoints are left unchanged.
mod run . --recipe= org. apache. camel. upgrade. customRecipes. internal. ChangeJavaComponentUriRecipe \
-P uriPattern= '^pulsar: ((persistent|non-persistent): / / ([^/ ]+)/ ([^/ ]+)/ ([^/ ]+)/ (. +))$' \
-P replacement= 'pulsar: ${2}: / / ${3}/ ${5}/ ${6}'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.