quarkusio/quarkus · error · RuntimeException
Invalid artifact ${artifact}
Error message
Invalid artifact ${artifact} What it means
JBangDevModeLauncherImpl.main() parses dependency coordinate strings into ArtifactDependency objects. A string that does not split into 3, 4, or 5 colon-separated parts triggers RuntimeException("Invalid artifact " + s). Note this variant passes parts in the order (groupId, artifactId, version, extension, classifier) for 5-part inputs.
Source
Thrown at independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/jbang/JBangDevModeLauncherImpl.java:117
//todo : proper support for everything
final QuarkusBootstrap.Builder builder = QuarkusBootstrap.builder()
.setBaseClassLoader(JBangDevModeLauncherImpl.class.getClassLoader())
.setIsolateDeployment(true)
.setMode(QuarkusBootstrap.Mode.DEV)
.setTargetDirectory(targetClasses)
.setAppArtifact(appArtifact)
.setManagingProject(ArtifactCoords.pom("io.quarkus", "quarkus-bom", getQuarkusVersion()))
.setForcedDependencies(deps.entrySet().stream().map(s -> {
String[] parts = s.getKey().split(":");
Dependency artifact;
if (parts.length == 3) {
artifact = new ArtifactDependency(parts[0], parts[1], null, ArtifactCoords.TYPE_JAR, parts[2]);
} else if (parts.length == 4) {
artifact = new ArtifactDependency(parts[0], parts[1], null, parts[2], parts[3]);
} else if (parts.length == 5) {
artifact = new ArtifactDependency(parts[0], parts[1], parts[3], parts[2], parts[4]);
} else {
throw new RuntimeException("Invalid artifact " + s);
}
//artifact.setPath(s.getValue());
return artifact;
}).collect(Collectors.toList()))
.setApplicationRoot(targetClasses)
.setProjectRoot(projectRoot)
.setBuildSystemProperties(configurationProperties)
.setRuntimeProperties(configurationProperties);
Map<String, Object> context = new HashMap<>();
context.put("app-project", currentProject);
context.put("args", args);
context.put("app-classes", targetClasses);
final BootstrapMavenContext mvnCtx = new BootstrapMavenContext(
BootstrapMavenContext.config().setCurrentProject(currentProject));
final MavenArtifactResolver mvnResolver = new MavenArtifactResolver(mvnCtx);
builder.setMavenArtifactResolver(mvnResolver);View on GitHub (pinned to e1c734241f)
Solutions
- Use groupId:artifactId:version (3 parts), or 4–5 parts for extension/classifier variants
- Remove extra segments like scope or invalid suffixes
- Cross-check the string against Maven coordinate conventions used by the bootstrap resolver
Example fix
// before com.example:util:jar:1.0:extra // after com.example:util:jar:1.0
Defensive patterns
Strategy: validation
Validate before calling
static void requireValidCoords(String s) {
String[] parts = s.split(":", -1);
if (parts.length < 3 || parts.length > 5)
throw new IllegalArgumentException("Expected 3-5 colon-separated coordinate parts, got " + parts.length + ": " + s);
} Prevention
- Validate coordinate strings before writing them into dev-mode launcher configs
- Use groupId:artifactId:version as the canonical form
- Watch for the 5-part ordering (groupId, artifactId, version, extension, classifier) in this code path
When it happens
Trigger: A dependency string in the dev-mode launcher configuration has an unsupported number of ':' segments — e.g. missing version, or more than 5 segments.
Common situations: Hand-edited dev-mode launch configs; copying coordinates with extra fields; forgetting the version segment; typos introducing extra colons.
Related errors
- Invalid artifact ${artifact}
- invalid config ${comment}
- Invalid duration: ${value}
- Invalid server address
- Mismatched braces:
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/5745aa32f303ac18.
Report an issue: GitHub.