apache/maven · warning

The following dependencies could not be resolved at this poi

Error message

The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:

What it means

MNG-2277 compensation: an aggregating mojo (or one with requiresProject=false) triggered project dependency resolution at a point in the build where reactor artifacts have not been assembled yet (e.g. from clean). If every unresolved dependency is itself a reactor module, Maven does not fail - it warns that resolution is impossible 'at this point', lists the unresolved reactor dependencies, and hints to build up to 'package' first.

Source

Thrown at impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java:270

        DependencyResolutionResult result;
        try {
            DefaultDependencyResolutionRequest request =
                    new DefaultDependencyResolutionRequest(project, session.getRepositorySession());
            request.setResolutionFilter(resolutionFilter);

            eventSpyDispatcher.onEvent(request);

            result = dependenciesResolver.resolve(request);
        } catch (DependencyResolutionException e) {
            result = e.getResult();

            /*
             * MNG-2277, the check below compensates for our bad plugin support where we ended up with aggregator
             * plugins that require dependency resolution, although they usually run in phases of the build where project
             * artifacts haven't been assembled yet. The prime example of this is "mvn release:prepare".
             */
            if (aggregating && areAllDependenciesInReactor(session.getProjects(), result.getUnresolvedDependencies())) {
                logger.warn("The following dependencies could not be resolved at this point of the build"
                        + " but seem to be part of the reactor:");

                for (Dependency dependency : result.getUnresolvedDependencies()) {
                    logger.warn("o {}", dependency);
                }

                logger.warn("Try running the build up to the lifecycle phase \"package\"");
            } else {
                throw new LifecycleExecutionException(messageBuilderFactory, null, project, e);
            }
        }

        eventSpyDispatcher.onEvent(result);

        Set<Artifact> artifacts = new LinkedHashSet<>();
        if (result.getDependencyGraph() != null
                && !result.getDependencyGraph().getChildren().isEmpty()) {
            RepositoryUtils.toArtifacts(

View on GitHub (pinned to e4093d4e12)

Solutions

  1. Build to package (or install) before the aggregating goal: mvn clean install once, then mvn release:prepare
  2. Upgrade the aggregating plugin - newer m-release-p versions defer dependency resolution and avoid the trap
  3. Configure the aggregating mojo to not require dependency resolution (fork a phase like package instead of resolve dependencies)
  4. As a last resort run the aggregator with -N or against an already-installed reactor

Example fix

# before
mvn clean release:prepare   # warns: reactor deps unresolved at this point
# after
mvn clean install
mvn release:prepare
Defensive patterns

Strategy: validation

Validate before calling

# pipeline guard: ensure reactor artifacts exist before aggregating goals
if [ ! -d "$HOME/.m2/repository/com/acme/parent/1.0" ]; then
  mvn -q clean install -DskipTests
fi
mvn release:prepare

Prevention

When it happens

Trigger: Running mvn release:prepare (the prime example) or another aggregator goal directly after clean on a multi-module reactor: project artifacts are not yet in the reactor's assembled state nor in the local repo, so scope+dependency resolution fails for sibling modules.

Common situations: mvn clean release:prepare / release:perform on fresh checkouts; CI pipelines invoking aggregating reporting or release plugins as the very first command; any aggregator that declares it needs runtime dependencies of all modules.

Related errors


AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21). Data as JSON: /api/errors/3c1b7a7eb21185c8. Report an issue: GitHub.