quarkusio/quarkus · error · BootstrapDependencyProcessingException

Failed to parse conditional dependencies configuration of ${

Error message

Failed to parse conditional dependencies configuration of ${runtimeArtifact}

What it means

ExtensionInfo converts the conditional-dependencies property (a comma-separated string array) into Artifact coordinates. This BootstrapDependencyProcessingException wraps any parse failure, attributing it to the runtime artifact whose descriptor declared the malformed entry.

Source

Thrown at independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ExtensionInfo.java:93

    private Artifact[] initConditionalDeps(boolean devMode) throws BootstrapDependencyProcessingException {
        return devMode
                ? toArtifactArray(
                        joinAndDedupe(splitConditionalDeps(props.getProperty(BootstrapConstants.CONDITIONAL_DEPENDENCIES)),
                                splitConditionalDeps(props.getProperty(BootstrapConstants.CONDITIONAL_DEV_DEPENDENCIES))),
                        runtimeArtifact)
                : toArtifactArray(splitConditionalDeps(props.getProperty(BootstrapConstants.CONDITIONAL_DEPENDENCIES)),
                        runtimeArtifact);
    }

    private static Artifact[] toArtifactArray(String[] strArr, Artifact runtimeArtifact)
            throws BootstrapDependencyProcessingException {
        var artifactArr = new Artifact[strArr.length];
        for (int i = 0; i < strArr.length; ++i) {
            try {
                artifactArr[i] = toArtifact(strArr[i]);
            } catch (Exception e) {
                throw new BootstrapDependencyProcessingException(
                        "Failed to parse conditional dependencies configuration of " + runtimeArtifact, e);
            }
        }
        return artifactArr;
    }

    private static String[] splitConditionalDeps(String conditionalDepsStr) {
        return conditionalDepsStr == null ? new String[0] : BootstrapUtils.splitByWhitespace(conditionalDepsStr);
    }

    private static String[] joinAndDedupe(String[] arr1, String[] arr2) {
        if (arr1.length == 0) {
            return arr2;
        }
        if (arr2.length == 0) {
            return arr1;
        }
        if (arr1.length == 1) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Inspect the runtime POM properties and fix each entry to G:A:V(:type[:classifier]) format
  2. Regenerate extension descriptor properties with quarkus-extension-maven-plugin instead of editing them by hand
  3. Remove empty/trailing entries from the comma-separated list
  4. Check the cause (wrapped Exception) for the exact offending string

Example fix

// before
<quarkus.extension.conditional.dependencies>com.acme:myext,foo-bar</quarkus.extension.conditional.dependencies>
// after
<quarkus.extension.conditional.dependencies>com.acme:myext:1.0.0,org.acme:foo-bar:2.1.0</quarkus.extension.conditional.dependencies>
Defensive patterns

Strategy: validation

Validate before calling

java.util.regex.Pattern GAV = java.util.regex.Pattern.compile("[^:]+:[^:]+:[^:]+(:[^:]+(:[^:]+)?)?");
static void validateConditionalDeps(String csv) {
    for (String s : csv.split(",")) {
        if (!GAV.matcher(s.trim()).matches()) throw new IllegalArgumentException("Bad GAV: " + s);
    }
}

Prevention

When it happens

Trigger: initConditionalDeps -> toArtifactArray when a quarkus.extension.conditional.dependencies.<env> value contains a string not matching groupId:artifactId:version(:type[:classifier]) format.

Common situations: Typos in the extension descriptor properties (missing colon segments, spaces, wrong order), properties written by hand instead of generated by the extension plugin, empty entries from trailing commas.

Understand the failure class

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/daeff72854496cdf. Report an issue: GitHub.