Dagger
Search

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.2.0

Entrypoint

Return Type
Java
Example
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@a5e511cb5adec1bf0b67ef8856d4191e61ab4711 call \
 init \
 container
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
NameTypeDefault ValueDescription
imageString !-No description provided
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@a5e511cb5adec1bf0b67ef8856d4191e61ab4711 call \
 init \
 with-image --image string \
 container
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@a5e511cb5adec1bf0b67ef8856d4191e61ab4711 call \
 init \
 with-gradle-cache \
 container
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@a5e511cb5adec1bf0b67ef8856d4191e61ab4711 call \
 init \
 with-maven-cache \
 container
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()
}

withDir() 🔗

Sets the directory to run the command in.

Return Type
Config !
Arguments
NameTypeDefault ValueDescription
dirDirectory !-No description provided
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@a5e511cb5adec1bf0b67ef8856d4191e61ab4711 call \
 init \
 with-dir --dir DIR_PATH \
 container
func (m *myModule) example(dir *Directory) *JavaConfig  {
	return dag.
			Java().
			Init().
			WithDir(dir)
}
@function
def example(dir: dagger.Directory) -> dag.JavaConfig:
	return (
		dag.java()
		.init()
		.with_dir(dir)
	)
@func()
example(dir: Directory): JavaConfig {
	return dag
		.java()
		.init()
		.withDir(dir)
}

container() 🔗

Returns the conainer with the settings applied.

Return Type
Container !
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@a5e511cb5adec1bf0b67ef8856d4191e61ab4711 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
NameTypeDefault ValueDescription
cmd[String ! ] !-Command to run
Example
dagger -m github.com/seungyeop-lee/daggerverse/java@a5e511cb5adec1bf0b67ef8856d4191e61ab4711 call \
 init \
 run --cmd string1 --cmd string2
func (m *myModule) example(cmd []string) *Container  {
	return dag.
			Java().
			Init().
			Run(cmd)
}
@function
def example(cmd: List[str]) -> dagger.Container:
	return (
		dag.java()
		.init()
		.run(cmd)
	)
@func()
example(cmd: string[]): Container {
	return dag
		.java()
		.init()
		.run(cmd)
}