private Set getKameletDependencies()

in tooling/camel-kafka-connector-generator-maven-plugin/src/main/java/org/apache/camel/kafkaconnector/maven/CamelKafkaConnectorKameletUpdateMojo.java [254:271]


    private Set<String> getKameletDependencies(KameletModel kamelet) throws XPathExpressionException {
        Set<String> deps = new HashSet<>(kamelet.getDependencies());
        Set<String> gavDeps = deps.stream()
        .filter(stringDep -> stringDep != null && !stringDep.trim().isEmpty() && !"null".equals(stringDep.trim()))
        .map(stringDep -> {
            if (stringDep.startsWith("mvn:")) {
                return stringDep.replaceFirst("mvn:", "");
            } else if (stringDep.startsWith("camel:")) {
                return getMainDepGroupId() + ":" + stringDep.replaceFirst(":", "-");
            } else {
                String length = stringDep == null ?  "the string is null value" : Integer.toString(stringDep.length());
                getLog().warn("Dependency string: " + stringDep + " (length of the string is: " + length + ") is used as is. Might not be the intended behaviour!");
                return stringDep;
            }
        }).collect(Collectors.toSet());

        return gavDeps;
    }