Change Camel component URI across all DSLs

Apache 2.0

Transforms component URIs using regular expressions with capturing groups. Automatically handles Java, XML DSL, and YAML DSL.

org.apache.camel.upgrade.customRecipes.ChangeComponentUriRecipe

Required

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 consumer endpoints (from) are transformed; producer endpoints (to) are left unchanged.

mod run . --recipe=org.apache.camel.upgrade.customRecipes.ChangeComponentUriRecipe \ -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.

Recipe list

It runs these recipes, in this order.

  1. Change Camel component URI in Java
  2. Change Camel component URI in XML DSL
  3. Change Camel component URI in YAML DSL