You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行mvn clean install时Quarkus构建报错:key不能为空

解决Quarkus构建报错:"key can't be empty"

Hey, let's break down this error you're facing when running mvn clean install on your Quarkus project. That java.lang.IllegalArgumentException: key can't be empty message means Quarkus (or Maven) is trying to load a configuration entry where the "key" part is missing or empty—think of it like trying to set a value without saying what that value is for.

Where to look for the problem

Here are the most common places to check:

1. Your project's Quarkus config file

First head to src/main/resources/application.properties (or application.yaml if you use YAML). Look for lines that have a value but no key, like:

# Bad example: empty key before the equals sign
=my-value
# Or a line with just whitespace and equals
   =another-value

If you're using YAML, watch out for empty keys like this:

# Bad example: empty key at the top level
:
  valid-key: some-value

Quarkus parses these config files on build, and empty keys will trigger this exact error.

2. Maven's settings.xml file

Your build command uses -s D:\env\apache-maven-3.6.3\conf\settings.xml, so check this file for empty configuration entries. Common culprits are:

  • <server> tags with an empty <id> (Maven needs this to identify servers)
  • <property> tags inside <profiles> or <settings> with an empty <name>

Example of a bad server config:

<server>
  <id></id> <!-- Empty ID here causes issues -->
  <username>my-user</username>
</server>

3. Quarkus Maven plugin config in pom.xml

Check your project's pom.xml for the quarkus-maven-plugin configuration. If there's a <configuration> section with an empty key-value pair, that could also trigger the error.

How to pinpoint the exact issue

Run your build with debug logging enabled to get a full stack trace—this will tell you exactly where the empty key is coming from:

mvn clean install -X

The detailed log will show the exact code path that hit the error, making it easy to trace back to the problematic config file or entry.

内容的提问来源于stack exchange,提问作者御风大世界

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 07:30:56