java-sdk
Runtime module for the Java SDK
Installation
dagger install github.com/dagger/dagger/sdk/java@v0.18.6
Entrypoint
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/dagger/dagger/sdk/java@48a88b9b11cf606920579d885c1c3d1eeafe9aca 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/dagger/dagger/sdk/java@48a88b9b11cf606920579d885c1c3d1eeafe9aca call \
sdksource-dir
func (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/dagger/dagger/sdk/java@48a88b9b11cf606920579d885c1c3d1eeafe9aca call \
maven-errors
func (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/dagger/dagger/sdk/java@48a88b9b11cf606920579d885c1c3d1eeafe9aca call \
maven-debug-logging
func (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/dagger/dagger/sdk/java@48a88b9b11cf606920579d885c1c3d1eeafe9aca call \
with-config --maven-errors boolean --maven-debug-logging boolean
func (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)
}