quarkusio/quarkus · error · GradleException

Failed to load + pomPropsPath + from the classpath

Error message

Failed to load + pomPropsPath + from the classpath

What it means

After successfully locating pom.properties in getQuarkusBootstrapResolver, the plugin loads it with Properties.load. If reading the stream throws IOException, the build fails with this GradleException. Unlike error 338, the resource exists but is unreadable — rare, and typically points to a corrupted jar entry or stream problem.

Source

Thrown at devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java:637

    private Dependency getQuarkusGradleBootstrapResolver() {
        return getQuarkusBootstrapResolver("quarkus-bootstrap-gradle-resolver");
    }

    private Dependency getQuarkusMavenBootstrapResolver() {
        return getQuarkusBootstrapResolver("quarkus-bootstrap-maven-resolver");
    }

    private Dependency getQuarkusBootstrapResolver(String artifactId) {
        final String pomPropsPath = "META-INF/maven/io.quarkus/" + artifactId + "/pom.properties";
        final InputStream devModePomPropsIs = DevModeMain.class.getClassLoader().getResourceAsStream(pomPropsPath);
        if (devModePomPropsIs == null) {
            throw new GradleException("Failed to locate " + pomPropsPath + " on the classpath");
        }
        final Properties devModeProps = new Properties();
        try (InputStream is = devModePomPropsIs) {
            devModeProps.load(is);
        } catch (IOException e) {
            throw new GradleException("Failed to load " + pomPropsPath + " from the classpath", e);
        }
        final String devModeGroupId = devModeProps.getProperty("groupId");
        if (devModeGroupId == null) {
            throw new GradleException("Classpath resource " + pomPropsPath + " is missing groupId");
        }
        final String devModeArtifactId = devModeProps.getProperty("artifactId");
        if (devModeArtifactId == null) {
            throw new GradleException("Classpath resource " + pomPropsPath + " is missing artifactId");
        }
        final String devModeVersion = devModeProps.getProperty("version");
        if (devModeVersion == null) {
            throw new GradleException("Classpath resource " + pomPropsPath + " is missing version");
        }
        return project.getDependencies()
                .create(String.format("%s:%s:%s", devModeGroupId, devModeArtifactId, devModeVersion));
    }

    private Dependency getQuarkusCoreDeployment(ApplicationModel appModel) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Delete the cached plugin artifact (rm -rf ~/.gradle/caches/modules-2/files-2.1/io.quarkus) and re-run so Gradle re-downloads an intact jar
  2. Verify jar integrity of quarkus-gradle-plugin / bootstrap artifacts (unzip -t)
  3. Rebuild any locally built Quarkus artifacts (./mvnw install -Dquickly) so embedded pom.properties are regenerated
  4. Pin an official released Quarkus version instead of a hand-modified plugin jar

Example fix

// shell-side fix
./gradlew --stop
rm -rf ~/.gradle/caches/modules-2/files-2.1/io.quarkus
./gradlew quarkusDev --refresh-dependencies
Defensive patterns

Strategy: retry

Try / catch

try {
    ./gradlew quarkusDev
} catch (GradleException e) {
    if (e.message?.startsWith("Failed to load META-INF/maven")) {
        purgeQuarkusFromGradleCache(); retryWith("--refresh-dependencies");
    } else { throw e; }
}

Prevention

When it happens

Trigger: devModeProps.load(is) throws IOException while parsing META-INF/maven/io.quarkus/<artifactId>/pom.properties in getQuarkusBootstrapResolver (called by getQuarkusGradleBootstrapResolver/getQuarkusMavenBootstrapResolver).

Common situations: Corrupted plugin jar in the Gradle cache (truncated download); a malformed pom.properties manually injected by a local build; jar/jond stream errors from a damaged distribution.

Related errors


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