# JavaAppExecutableResource.withMavenGoal

- Module: [CommunityToolkit.Aspire.Hosting.Java](/reference/api/typescript/communitytoolkit.aspire.hosting.java.md)
- Defined on: [JavaAppExecutableResource](/reference/api/typescript/communitytoolkit.aspire.hosting.java/javaappexecutableresource.md)
- Version: `13.4.0`
- Kind: `method`

Configures the Java application to run using a Maven goal

## Definition

```typescript
interface JavaAppExecutableResource {
  // ... omitted for brevity
  withMavenGoal(
      goal: string,
      args: string[]): JavaAppExecutableResource;
}
```

## Signature

```typescript
withMavenGoal(
    goal: string,
    args: string[]): JavaAppExecutableResource
```

## Parameters

- `goal` (`string`)
- `args` (`string[]`)

## Returns

[JavaAppExecutableResource](/reference/api/typescript/communitytoolkit.aspire.hosting.java/javaappexecutableresource.md) `builder`

## Defined on

- [JavaAppExecutableResource](/reference/api/typescript/communitytoolkit.aspire.hosting.java/javaappexecutableresource.md) -- `handle`
