Aspire.Hosting.Java
Official
📦 Aspire.Hosting.Javav13.6.0-preview.1.26478.815Functions
2Types
2 types and 0 members
Types
Functions
method
addJavaAppbuilderAdds a Java application to the application model, launched with `java`.
addJavaApp(name: string, appDirectory: string): JavaAppResourcemethod
addJavaAppWithJarbuilderAdds a Java application that runs a prebuilt JAR with `java -jar`.
addJavaAppWithJar(name: string, appDirectory: string, jarPath: string, args: string[]): JavaAppResourcemethod
addJavaContainerbuilderAdds a Java application that runs from an existing container image.
addJavaContainer(name: string, image: string, tag?: string): JavaContainerResourcemethod
addQuarkusAppbuilderAdds a Quarkus application to the application model, built and launched with its own Maven or Gradle wrapper.
addQuarkusApp(name: string, appDirectory: string): JavaAppResourcemethod
addSpringBootAppbuilderAdds a Spring Boot application to the application model, built and launched with its own Maven or Gradle wrapper.
addSpringBootApp(name: string, appDirectory: string): JavaAppResourcemethod
withGradleBuildbuilderRuns a Gradle build before the Java application starts.
withGradleBuild(args: string[]): JavaAppResourcemethod
withGradleTaskbuilderLaunches the Java application through a Gradle task instead of `java`, for example `bootRun`.
withGradleTask(task: string, args: string[]): JavaAppResourcemethod
withJarArtifactbuilderSelects the JAR the generated container image runs, for projects whose build produces more than one.
withJarArtifact(jarPath: string): JavaAppResourcemethod
withJvmArgsbuilderAdds arguments to the Java Virtual Machine that runs the application.
withJvmArgs(args: string[]): IJavaAppResourcemethod
withMainClassbuilderSets the main class an IDE launches when running or debugging this application. Has no effect on how Aspire starts the process, which is decided by the JAR path, Maven goal, or Gradle task.
withMainClass(mainClass: string): JavaAppResourcemethod
withMavenBuildbuilderRuns a Maven build before the Java application starts.
withMavenBuild(args: string[]): JavaAppResourcemethod
withMavenGoalbuilderLaunches the Java application through a Maven goal instead of `java`, for example `spring-boot:run`.
withMavenGoal(goal: string, args: string[]): JavaAppResourcemethod
withOtelAgentbuilderRuns the application with the OpenTelemetry Java agent so it exports traces, metrics, and logs to Aspire.
withOtelAgent(agentPath: string): JavaAppResourcemethod
withOtelAgentDefaultPathbuilderRuns the application with the OpenTelemetry Java agent from the location the build tool writes it to.
withOtelAgentDefaultPath(): JavaAppResourcemethod
withWrapperPathbuilderOverrides the build tool wrapper script path, for repositories whose wrapper is not in the default location or does not use the default name.
withWrapperPath(wrapperPath: string): JavaAppResource