quarkusio/quarkus · error · BootstrapException
Failed to determine the Maven artifact associated with the a
Error message
Failed to determine the Maven artifact associated with the application
What it means
BootstrapAppModelFactory throws this BootstrapException when it cannot associate the application with a Maven project. It occurs after resolving the local project from the project root: if LocalProject.load (or the cached workspace load) returns null, no pom.xml-based project was found at the given path, so the application artifact cannot be determined.
Source
Thrown at independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java:240
/**
* Resolves an application for a project in a workspace.
*
* @return application model
* @throws BootstrapException in case of a failure
*/
private CurationResult resolveAppModelForWorkspace() throws BootstrapException {
ResolvedDependency appArtifact = this.appArtifact;
try {
LocalProject localProject = null;
if (appArtifact == null) {
if (projectRoot == null) {
throw new IllegalArgumentException(
"Neither the application artifact nor the project root path has been provided");
}
localProject = enableClasspathCache ? loadWorkspace() : LocalProject.load(projectRoot, false);
if (localProject == null) {
log.warn("Unable to locate the maven project on the filesystem");
throw new BootstrapException(
"Failed to determine the Maven artifact associated with the application " + projectRoot);
}
appArtifact = localProject.getAppArtifact();
}
Path cachedCpPath = null;
LocalWorkspace workspace = null;
if (enableClasspathCache) {
if (localProject == null) {
localProject = loadWorkspace();
}
workspace = localProject.getWorkspace();
cachedCpPath = resolveCachedCpPath(localProject);
if (Files.exists(cachedCpPath)
&& workspace.getLastModified() < Files.getLastModifiedTime(cachedCpPath).toMillis()) {
try {
return new CurationResult(ApplicationModelSerializer.deserialize(cachedCpPath));View on GitHub (pinned to e1c734241f)
Solutions
- Verify the projectRoot path points to (or is inside) a directory containing a pom.xml
- Provide the application artifact explicitly (groupId:artifactId:version) so the project dir lookup is unnecessary
- Set the working directory of the launch to the Maven project root
- If relying on workspace/classpath cache, clear stale cache and re-run so the workspace reloads
Example fix
// before
QuarkusBootstrap.builder().setProjectRoot(Path.of("/opt/random-dir"))...
// after
QuarkusBootstrap.builder().setProjectRoot(Path.of("/home/dev/my-quarkus-app")) // dir containing pom.xml Defensive patterns
Strategy: validation
Validate before calling
Path root = Path.of("/home/dev/myapp");
if (!Files.exists(root.resolve("pom.xml"))) {
throw new IllegalArgumentException("Not a Maven project root: " + root);
} Try / catch
try {
bootstrap.bootstrap();
} catch (BootstrapException e) {
if (e.getMessage().contains("Failed to determine the Maven artifact")) {
// fix projectRoot or supply appArtifact
}
} Prevention
- Always point projectRoot at a directory containing pom.xml
- Supply the application artifact explicitly when the path is not a Maven project
- Set the launcher working directory to the project root
- Clear stale classpath caches after moving projects
When it happens
Trigger: Calling QuarkusBootstrap/bootstrap APIs with an appArtifact-less configuration where neither the application artifact nor a valid Maven project root is provided; specifically, projectRoot points to a directory that is not a Maven project (no pom.xml in the hierarchy).
Common situations: Running Quarkus from a wrong working directory, pointing quarkus.platform/project paths at non-Maven folders, IDE launches where the classes dir is outside any Maven project, renamed/moved pom.xml, or a Gradle project mistakenly driven through the Maven bootstrap path.
Related errors
- Failed to cache a new instance of io.quarkus.maven.QuarkusMa
- Failed to bootstrap application in ${mode} mode
- Failed to bootstrap the application
- Failed to bootstrap Quarkus application
- Failed to initialize Maven repository system
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/d83ffc53a02f33eb.
Report an issue: GitHub.