JavaAppResource
Represents a Java application resource in the distributed application model.
type JavaAppResource interface { IComputeResource IContainerFilesDestinationResource IJavaAppResource Resource ResourceWithArgs ResourceWithEndpoints ResourceWithEnvironment ResourceWithWaitSupport}Properties
ResourceTypeDisplayName stringgetResourceTypeDisplayName() (string, error)Methods
WithGradleBuild(args []string) JavaAppResourceParameters
args[]string Arguments passed to the Gradle wrapper. Defaults to clean build.Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
java, for example bootRun .WithGradleTask( task string, args []string,) JavaAppResourceParameters
taskstringThe Gradle task to execute.args[]string Additional arguments passed to the Gradle wrapper after the task.Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
WithJarArtifact(jarPath string) JavaAppResourceParameters
jarPath stringThe path to the JAR produced by the build, relative to the application directory, for example target/app.jar .Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
WithMainClass(mainClass string) JavaAppResourceParameters
mainClass stringThe fully qualified name of the class declaring main, for example com.example.Application .Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
WithMavenBuild(args []string) JavaAppResourceParameters
args[]string Arguments passed to the Maven wrapper. Defaults to clean package.Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
java, for example spring-boot:run .WithMavenGoal( goal string, args []string,) JavaAppResourceParameters
goalstringThe Maven goal to execute.args[]string Additional arguments passed to the Maven wrapper after the goal.Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
WithOtelAgent(agentPath string) JavaAppResourceParameters
agentPath stringThe path to the opentelemetry-javaagent.jar file.Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
WithOtelAgentDefaultPath() JavaAppResourceReturns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().
WithWrapperPath(wrapperPath string) JavaAppResourceParameters
wrapperPath stringThe path to the wrapper script, absolute or relative to the resource's working directory.Returns
JavaAppResource A reference to the I.
Returns a handle; failures surface later via Err().