Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithJarArtifact

Method
📦 Aspire.Hosting.Java v17.0.0-preview.1.26565.2
func (JavaAppResource) WithJarArtifact(jarPath string) JavaAppResource

Signature

methodWithJarArtifactbuilder
Selects the JAR the generated container image runs, for projects whose build produces more than one.
WithJarArtifact(jarPath string) JavaAppResource
jarPathstringThe path to the JAR produced by the build, relative to the application directory, for example target/app.jar.
JavaAppResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: