java-sdk
Runtime module for the Java SDK
Installation
dagger install github.com/robertonav20/dagger/sdk/java@946f48bd5db0f6d07c3a12a19d02b77a8a344a45Entrypoint
Return Type
JavaSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sdkSourceDir | Directory | - | Directory with the Java SDK source code. dagger-java-samples is not necessary to build, but as it's referenced in the root pom.xml maven will check if it's there. So we keep the pom.xml to fake it. |
Example
dagger -m github.com/robertonav20/dagger/sdk/java@946f48bd5db0f6d07c3a12a19d02b77a8a344a45 call \
func (m *MyModule) Example() *dagger.JavaSdk {
return dag.
JavaSdk()
}@function
def example() -> dagger.JavaSdk:
return (
dag.java_sdk()
)@func()
example(): JavaSdk {
return dag
.javaSdk()
}Types
JavaSdk 🔗
sdksourceDir() 🔗
Return Type
Directory ! Example
dagger -m github.com/robertonav20/dagger/sdk/java@946f48bd5db0f6d07c3a12a19d02b77a8a344a45 call \
sdksource-dirfunc (m *MyModule) Example() *dagger.Directory {
return dag.
JavaSdk().
SdksourceDir()
}@function
def example() -> dagger.Directory:
return (
dag.java_sdk()
.sdksource_dir()
)@func()
example(): Directory {
return dag
.javaSdk()
.sdksourceDir()
}mavenErrors() 🔗
If true, -e flag will be added to the maven command to display execution error messages
Return Type
Boolean ! Example
dagger -m github.com/robertonav20/dagger/sdk/java@946f48bd5db0f6d07c3a12a19d02b77a8a344a45 call \
maven-errorsfunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
JavaSdk().
MavenErrors(ctx)
}@function
async def example() -> bool:
return await (
dag.java_sdk()
.maven_errors()
)@func()
async example(): Promise<boolean> {
return dag
.javaSdk()
.mavenErrors()
}mavenDebugLogging() 🔗
If true, -X flag will be added to the maven command to enable full debug logging
Return Type
Boolean ! Example
dagger -m github.com/robertonav20/dagger/sdk/java@946f48bd5db0f6d07c3a12a19d02b77a8a344a45 call \
maven-debug-loggingfunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
JavaSdk().
MavenDebugLogging(ctx)
}@function
async def example() -> bool:
return await (
dag.java_sdk()
.maven_debug_logging()
)@func()
async example(): Promise<boolean> {
return dag
.javaSdk()
.mavenDebugLogging()
}withConfig() 🔗
Return Type
JavaSdk !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| mavenErrors | Boolean ! | false | No description provided |
| mavenDebugLogging | Boolean ! | false | No description provided |
Example
dagger -m github.com/robertonav20/dagger/sdk/java@946f48bd5db0f6d07c3a12a19d02b77a8a344a45 call \
with-config --maven-errors boolean --maven-debug-logging booleanfunc (m *MyModule) Example(mavenErrors bool, mavenDebugLogging bool) *dagger.JavaSdk {
return dag.
JavaSdk().
WithConfig(mavenErrors, mavenDebugLogging)
}@function
def example(maven_errors: bool, maven_debug_logging: bool) -> dagger.JavaSdk:
return (
dag.java_sdk()
.with_config(maven_errors, maven_debug_logging)
)@func()
example(mavenErrors: boolean, mavenDebugLogging: boolean): JavaSdk {
return dag
.javaSdk()
.withConfig(mavenErrors, mavenDebugLogging)
}codegen() 🔗
Return Type
GeneratedCode !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.GeneratedCode {
return dag.
JavaSdk().
Codegen(modSource, introspectionJson)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.GeneratedCode:
return (
dag.java_sdk()
.codegen(mod_source, introspection_json)
)@func()
example(modSource: ModuleSource, introspectionJson: File): GeneratedCode {
return dag
.javaSdk()
.codegen(modSource, introspectionJson)
}moduleRuntime() 🔗
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| modSource | ModuleSource ! | - | No description provided |
| introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.Container {
return dag.
JavaSdk().
ModuleRuntime(modSource, introspectionJson)
}@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.Container:
return (
dag.java_sdk()
.module_runtime(mod_source, introspection_json)
)@func()
example(modSource: ModuleSource, introspectionJson: File): Container {
return dag
.javaSdk()
.moduleRuntime(modSource, introspectionJson)
}