quarkusio/quarkus · error · BuildException

Please config the <resourceGroup> in pom.xml.

Error message

Please config the <resourceGroup> in pom.xml.

What it means

The Azure resource group is required for deployment; validateParameters throws BuildException with EMPTY_RESOURCE_GROUP when config.resourceGroup() is blank. The resource group identifies where the function app and its app service plan are created in Azure.

Source

Thrown at extensions/azure-functions/deployment/src/main/java/io/quarkus/azure/functions/deployment/AzureFunctionsDeployCommand.java:175

                }
            };
            OperationThreadContext ctx = OperationThreadContext.current();
            push.invoke(ctx, dummy);
        } catch (Exception e) {
        }
    }

    protected void validateParameters(AzureFunctionsConfig config, String appName) throws BuildException {
        // app name
        if (StringUtils.isBlank(appName)) {
            throw new BuildException(EMPTY_APP_NAME);
        }
        if (appName.startsWith("-") || !appName.matches(APP_NAME_PATTERN)) {
            throw new BuildException(format(INVALID_APP_NAME, appName));
        }
        // resource group
        if (StringUtils.isBlank(config.resourceGroup())) {
            throw new BuildException(EMPTY_RESOURCE_GROUP);
        }
        if (config.resourceGroup().endsWith(".") || !config.resourceGroup().matches(RESOURCE_GROUP_PATTERN)) {
            throw new BuildException(INVALID_RESOURCE_GROUP_NAME);
        }
        // asp name & resource group
        if (StringUtils.isNotEmpty(config.appServicePlanName())
                && !config.appServicePlanName().matches(APP_SERVICE_PLAN_NAME_PATTERN)) {
            throw new BuildException(format(INVALID_SERVICE_PLAN_NAME, APP_SERVICE_PLAN_NAME_PATTERN));
        }
        if (config.appServicePlanResourceGroup().isPresent()
                && StringUtils.isNotEmpty(config.appServicePlanResourceGroup().orElse(null))
                &&
                (config.appServicePlanResourceGroup().orElse(null).endsWith(".")
                        || !config.appServicePlanResourceGroup().orElse(null).matches(RESOURCE_GROUP_PATTERN))) {
            throw new BuildException(INVALID_SERVICE_PLAN_RESOURCE_GROUP_NAME);
        }
        // slot name
        /*

View on GitHub (pinned to e1c734241f)

Solutions

  1. Add <resourceGroup>my-resource-group</resourceGroup> to the plugin configuration in pom.xml
  2. Or pass -DresourceGroup=my-resource-group to the deploy command
  3. Create/verify the resource group exists in your subscription (az group create -n my-resource-group -l eastus)

Example fix

<!-- before -->
<configuration>
  <appName>my-quarkus-func</appName>
</configuration>
<!-- after -->
<configuration>
  <appName>my-quarkus-func</appName>
  <resourceGroup>my-rg</resourceGroup>
</configuration>
Defensive patterns

Strategy: validation

Validate before calling

if (resourceGroup == null || resourceGroup.isBlank()) {
  throw new IllegalArgumentException("<resourceGroup> must be configured before quarkus:deploy");
}

Prevention

When it happens

Trigger: quarkus:deploy without <resourceGroup> in the azure-functions plugin configuration and no command-line override.

Common situations: appName configured but resourceGroup forgotten in a new project; property removed during refactor; deploying from a module whose pom lacks the full configuration block.

Related errors


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