Skip to content
Docs Try Aspire
Docs Try

CommunityToolkit.Aspire.Hosting.Java

📦 CommunityToolkit.Aspire.Hosting.Java v13.4.0
10 Functions
2 Types

Types

Functions

method addJavaApp builder
Adds a Java application to the application model. Executes the executable Java app.
addJavaApp(name: string, workingDirectory: string): JavaAppExecutableResource
method addJavaAppWithJar builder
Adds a Java application to the application model. Executes the executable Java app.
addJavaAppWithJar(name: string, workingDirectory: string, jarPath: string, args?: string[]): JavaAppExecutableResource
method addJavaContainerApp builder
Adds a Java application to the application model. Executes the containerized Java app.
addJavaContainerApp(name: string, image: string, imageTag?: string): JavaAppContainerResource
method withGradleBuild builder
Adds a Gradle build step to the Java application
withGradleBuild(args: string[]): JavaAppExecutableResource
method withGradleTask builder
Configures the Java application to run using a Gradle task
withGradleTask(task: string, args: string[]): JavaAppExecutableResource
method withJvmArgs builder
Configures the Java Virtual Machine arguments for the Java application. The arguments are set via the `JAVA_TOOL_OPTIONS` environment variable, which is recognized by the JVM regardless of how the application is launched (e.g., `java -jar`, Maven wrapper, or Gradle wrapper).
withJvmArgs(args: string[]): IResourceWithEnvironment
method withMavenBuild builder
Adds a Maven build step to the Java application
withMavenBuild(args: string[]): JavaAppExecutableResource
method withMavenGoal builder
Configures the Java application to run using a Maven goal
withMavenGoal(goal: string, args: string[]): JavaAppExecutableResource
method withOtelAgent builder
Configures the OpenTelemetry Java Agent for the Java application.
withOtelAgent(agentPath?: string): IResourceWithEnvironment
method withWrapperPath builder
Configures a custom build tool wrapper script path. This is useful when the wrapper script is not in the default location or has a non-standard name.
withWrapperPath(wrapperScript: string): JavaAppExecutableResource