in tooling/camel-kafka-connector-generator-maven-plugin/src/main/java/org/apache/camel/kafkaconnector/maven/CamelKafkaConnectorUpdateMojo.java [238:267]
private void fixExcludedDependencies(Document pom) throws Exception {
// add dependencies to be excluded form camel component dependency
Set<String> loggingImpl = new HashSet<>();
// excluded dependencies
Set<String> configExclusions = new HashSet<>();
Properties properties = new Properties();
try (InputStream stream = new FileInputStream(rm.getResourceAsFile(fixDependenciesProperties))) {
properties.load(stream);
}
String artExcl = properties.getProperty(EXCLUDE_DEPENDENCY_PROPERTY_PREFIX + getMainDepArtifactId());
getLog().debug("Configured exclusions: " + artExcl);
if (artExcl != null && artExcl.trim().length() > 0) {
for (String dep : artExcl.split(",")) {
getLog().debug("Adding configured exclusion: " + dep);
configExclusions.add(dep);
}
}
Set<String> libsToRemove = new TreeSet<>();
libsToRemove.addAll(loggingImpl);
libsToRemove.addAll(configExclusions);
if (!libsToRemove.isEmpty()) {
getLog().info("Camel-kafka-connector: the following dependencies will be removed from the connector: " + libsToRemove);
MavenUtils.addExclusionsToDependency(pom, getMainDepArtifactId(), libsToRemove, GENERATED_SECTION_START, GENERATED_SECTION_END);
}
}