JavaAppHostingExtension Methods
Class Methods 5 members
Provides extension methods for adding Java applications to an
Hosting.IDistributedApplicationBuilder. AddJavaApp(IDistributedApplicationBuilder, string, JavaAppContainerResourceOptions) Section titled AddJavaApp(IDistributedApplicationBuilder, string, JavaAppContainerResourceOptions) extension IResourceBuilder<JavaAppContainerResource> Adds a Java application to the application model. Executes the containerized Java app.
public static class JavaAppHostingExtension{ public static IResourceBuilder<JavaAppContainerResource> AddJavaApp( this IDistributedApplicationBuilder builder, string name, JavaAppContainerResourceOptions options) { // ... }}Parameters
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to. name string The name of the resource. options JavaAppContainerResourceOptions The JavaAppContainerResourceOptions to configure the Java application. Returns
IResourceBuilder<JavaAppContainerResource> A reference to the ApplicationModel.IResourceBuilder`1. AddJavaApp(IDistributedApplicationBuilder, string, string, JavaAppExecutableResourceOptions) Section titled AddJavaApp(IDistributedApplicationBuilder, string, string, JavaAppExecutableResourceOptions) extension IResourceBuilder<JavaAppExecutableResource> Adds a Java application to the application model. Executes the executable Java app.
public static class JavaAppHostingExtension{ public static IResourceBuilder<JavaAppExecutableResource> AddJavaApp( this IDistributedApplicationBuilder builder, string name, string workingDirectory, JavaAppExecutableResourceOptions options) { // ... }}Parameters
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to. name string The name of the resource. workingDirectory string The working directory to use for the command. If null, the working directory of the current process is used. options JavaAppExecutableResourceOptions The JavaAppExecutableResourceOptions to configure the Java application. Returns
IResourceBuilder<JavaAppExecutableResource> A reference to the ApplicationModel.IResourceBuilder`1. AddSpringApp(IDistributedApplicationBuilder, string, JavaAppContainerResourceOptions) Section titled AddSpringApp(IDistributedApplicationBuilder, string, JavaAppContainerResourceOptions) extension IResourceBuilder<JavaAppContainerResource> Adds a Spring application to the application model. Executes the containerized Spring app.
public static class JavaAppHostingExtension{ public static IResourceBuilder<JavaAppContainerResource> AddSpringApp( this IDistributedApplicationBuilder builder, string name, JavaAppContainerResourceOptions options) { // ... }}Parameters
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to. name string The name of the resource. options JavaAppContainerResourceOptions The JavaAppContainerResourceOptions to configure the Java application. Returns
IResourceBuilder<JavaAppContainerResource> A reference to the ApplicationModel.IResourceBuilder`1. AddSpringApp(IDistributedApplicationBuilder, string, string, JavaAppExecutableResourceOptions) Section titled AddSpringApp(IDistributedApplicationBuilder, string, string, JavaAppExecutableResourceOptions) extension IResourceBuilder<JavaAppExecutableResource> Adds a Spring application to the application model. Executes the executable Spring app.
public static class JavaAppHostingExtension{ public static IResourceBuilder<JavaAppExecutableResource> AddSpringApp( this IDistributedApplicationBuilder builder, string name, string workingDirectory, JavaAppExecutableResourceOptions options) { // ... }}Parameters
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder to add the resource to. name string The name of the resource. workingDirectory string The working directory to use for the command. If null, the working directory of the current process is used. options JavaAppExecutableResourceOptions The JavaAppExecutableResourceOptions to configure the Java application. Returns
IResourceBuilder<JavaAppExecutableResource> A reference to the ApplicationModel.IResourceBuilder`1. WithMavenBuild(IResourceBuilder<JavaAppExecutableResource>, MavenOptions?) Section titled WithMavenBuild(IResourceBuilder<JavaAppExecutableResource>, MavenOptions?) extension IResourceBuilder<JavaAppExecutableResource> Adds a Maven build step to the application model.
public static class JavaAppHostingExtension{ public static IResourceBuilder<JavaAppExecutableResource> WithMavenBuild( this IResourceBuilder<JavaAppExecutableResource> builder, MavenOptions? mavenOptions = null) { // ... }}Parameters
builder IResourceBuilder<JavaAppExecutableResource> The ApplicationModel.IResourceBuilder`1 to add the Maven build step to. mavenOptions MavenOptions? optional The MavenOptions to configure the Maven build step. Returns
IResourceBuilder<JavaAppExecutableResource> A reference to the ApplicationModel.IResourceBuilder`1. Remarks
This method adds a Maven build step to the application model. The Maven build step is executed before the Java application is started. The Maven build step is added as an executable resource named "maven" with the command "mvnw --quiet clean package". The Maven build step is excluded from the manifest file.