quarkusio/quarkus · error · RuntimeException

Failed to compare ${p1} to ${p2}

Error message

Failed to compare ${p1} to ${p2}

What it means

RuntimeException from MavenProjectBuildFile.isSameFile: Files.isSameFile threw (typically an IOException because one of the two paths does not exist — e.g. an expected pom or catalog file is missing) while comparing two filesystem paths of project files. The two path arguments are interpolated into the message.

Source

Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/MavenProjectBuildFile.java:201

    private static List<ArtifactCoords> collectPlatformDescriptors(List<ArtifactCoords> managedDeps, MessageWriter log) {
        if (managedDeps.isEmpty()) {
            return Collections.emptyList();
        }
        final List<ArtifactCoords> result = new ArrayList<>(4);
        for (ArtifactCoords c : managedDeps) {
            if (PlatformArtifacts.isCatalogArtifact(c)) {
                result.add(c);
            }
        }
        return result;
    }

    private static boolean isSameFile(Path p1, Path p2) {
        try {
            return Files.isSameFile(p1, p2);
        } catch (IOException e) {
            throw new RuntimeException("Failed to compare " + p1 + " to " + p2, e);
        }
    }

    private Model model;
    private List<ArtifactCoords> managedDependencies;
    private Properties projectProps;
    private Supplier<List<ArtifactCoords>> projectDepsSupplier;
    private List<ArtifactCoords> dependencies;
    private List<ArtifactCoords> importedPlatforms;
    private MavenArtifactResolver resolver;

    private MavenProjectBuildFile(Path projectDirPath, ExtensionCatalog extensionsCatalog, Model model,
            Supplier<List<ArtifactCoords>> projectDeps,
            List<ArtifactCoords> projectManagedDeps,
            Properties projectProps, MavenArtifactResolver resolver) {
        super(projectDirPath, extensionsCatalog);
        this.model = model;
        this.projectDepsSupplier = projectDeps;

View on GitHub (pinned to e1c734241f)

Solutions

  1. Verify both compared files exist on disk
  2. Regenerate or restore the missing project file identified by the paths in the message
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/buildfile/MavenProjectBuildFile.java:201 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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