java
It is written with the assumption that it is used for Java applications that use Spring Boot and a Maven or Gradle wrapper.Installation
dagger install github.com/seungyeop-lee/daggerverse/java@v0.1.0
Entrypoint
Return Type
Java
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@99557366334ba30f17a865b720412f7e8495f7f4 call \
func (m *myModule) example() *Java {
return dag.
Java()
}
@function
def example() -> dag.Java:
return (
dag.java()
)
@func()
example(): Java {
return dag
.java()
}
Types
Java 🔗
Java dagger module
init() 🔗
Initializes a JavaConfig with default settings.
Return Type
Config !
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@99557366334ba30f17a865b720412f7e8495f7f4 call \
init
func (m *myModule) example() *JavaConfig {
return dag.
Java().
Init()
}
@function
def example() -> dag.JavaConfig:
return (
dag.java()
.init()
)
@func()
example(): JavaConfig {
return dag
.java()
.init()
}
Config 🔗
JavaConfig struct definition This struct holds the configuration for Java applications.
withImage() 🔗
Sets a custom Docker image for the Java application.
Return Type
Config !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | - | No description provided |
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@99557366334ba30f17a865b720412f7e8495f7f4 call \
init \
with-image --image string
func (m *myModule) example(image string) *JavaConfig {
return dag.
Java().
Init().
WithImage(image)
}
@function
def example(image: str) -> dag.JavaConfig:
return (
dag.java()
.init()
.with_image(image)
)
@func()
example(image: string): JavaConfig {
return dag
.java()
.init()
.withImage(image)
}
withGradleCache() 🔗
Enables the Gradle cache.
Return Type
Config !
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@99557366334ba30f17a865b720412f7e8495f7f4 call \
init \
with-gradle-cache
func (m *myModule) example() *JavaConfig {
return dag.
Java().
Init().
WithGradleCache()
}
@function
def example() -> dag.JavaConfig:
return (
dag.java()
.init()
.with_gradle_cache()
)
@func()
example(): JavaConfig {
return dag
.java()
.init()
.withGradleCache()
}
withMavenCache() 🔗
Enables the Maven cache.
Return Type
Config !
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@99557366334ba30f17a865b720412f7e8495f7f4 call \
init \
with-maven-cache
func (m *myModule) example() *JavaConfig {
return dag.
Java().
Init().
WithMavenCache()
}
@function
def example() -> dag.JavaConfig:
return (
dag.java()
.init()
.with_maven_cache()
)
@func()
example(): JavaConfig {
return dag
.java()
.init()
.withMavenCache()
}
container() 🔗
Returns the conainer with the settings applied.
Return Type
Container !
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@99557366334ba30f17a865b720412f7e8495f7f4 call \
init \
container
func (m *myModule) example() *Container {
return dag.
Java().
Init().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.java()
.init()
.container()
)
@func()
example(): Container {
return dag
.java()
.init()
.container()
}
run() 🔗
Run the command in the environment you set up.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
dir | Directory ! | - | Directory to run the command in |
cmd | [String ! ] ! | - | Command to run |
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@99557366334ba30f17a865b720412f7e8495f7f4 call \
init \
run --dir DIR_PATH --cmd string1 --cmd string2
func (m *myModule) example(dir *Directory, cmd []string) *Container {
return dag.
Java().
Init().
Run(dir, cmd)
}
@function
def example(dir: dagger.Directory, cmd: List[str]) -> dagger.Container:
return (
dag.java()
.init()
.run(dir, cmd)
)
@func()
example(dir: Directory, cmd: string[]): Container {
return dag
.java()
.init()
.run(dir, cmd)
}