Overview of Project Lombok
masterequals and hashCode methods, builders, and logging variables. This allows developers to write cleaner, more concise Java classes.repository·master·Indexed 12 days ago
https://github.com/projectlombok/lombokA Java library that automates the generation of repetitive boilerplate code, such as getters, setters, builders, and logging, using annotations during the compilation process. Includes documentation for CLI commands and building Docker images for Ant, Bazel, Gradle, and Maven environments with support for JDK versions 8 through 22.
equals and hashCode methods, builders, and logging variables. This allows developers to write cleaner, more concise Java classes.All relevant files in the Lombok Docker image are located in the /workspace directory. Specifically, when building, the lombok.jar is placed in:
/workspace/classpath/workspace/modulesTo build the Docker image, execute the following commands from the <lombokhome>/docker directory. You can build a standard image or provide a specific Lombok JAR version using the lombokjar build argument.
# Build the default image
docker build -t lombok-gradle-jdk17 -f gradle/Dockerfile .
# Build with a specific lombok jar version
docker build -t lombok-gradle-jdk17 --build-arg lombokjar=lombok-1.18.28.jar -f gradle/Dockerfile .If you have a recently built or specific lombok.jar on your local system and want to use it instead of the one downloaded during the image build, you can mount it into the container at runtime using a volume mount.
Mount the file to /workspace/lombok.jar within the container.
docker run -v /path/to/your/lombok/dist/lombok.jar:/workspace/lombok.jar <image_name>You can run the Lombok Maven container interactively. To use a specific Lombok JAR from your local host instead of the one inside the image, use a volume mount (-v) to map your local file to /workspace/lombok.jar inside the container.
# Run the container interactively
docker run -it lombok-maven-jdk17
# Run the container and mount a local lombok.jar to the workspace
docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-maven-jdk17To build a Docker image for Lombok with Ant support, execute the build commands from the <lombokhome>/docker directory. You can build a standard image or specify a custom Lombok JAR version using the --build-arg flag.
# Build the default image
docker build -t lombok-ant-jdk17 -f ant/Dockerfile .
# Build with a specific lombok jar version
docker build -t lombok-ant-jdk17 --build-arg lombokjar=lombok-1.18.28.jar -f ant/Dockerfile .You can run the container interactively. To use a local lombok.jar from your host machine inside the container, mount it as a volume to /workspace/lombok.jar.
# Run the container interactively
docker run -it lombok-bazel-jdk17
# Run the container and mount a local lombok.jar
docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-bazel-jdk17To build the Docker image, execute the following commands from the <lombokhome>/docker directory. You can either build using the default internal JAR or provide a specific version of lombok.jar using the lombokjar build argument.
# Build using default settings
docker build -t lombok-bazel-jdk17 -f bazel/Dockerfile .
# Build using a specific lombok.jar version
docker build -t lombok-bazel-jdk17 --build-arg lombokjar=lombok-1.18.28.jar -f bazel/Dockerfile .You can run the Lombok Ant container in interactive mode. To use a specific Lombok JAR from your local host machine, mount it into the container using a volume (-v).
# Run the container interactively
docker run -it lombok-ant-jdk17
# Run with a local lombok.jar mounted to /workspace/lombok.jar
docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/lombok.jar lombok-ant-jdk17You can run the container interactively. To use a specific Lombok JAR from your local filesystem instead of the one inside the image, mount it to /workspace/classpath/lombok.jar using a volume.
# Run the container interactively
docker run -it lombok-gradle-jdk17
# Run with a local lombok.jar mounted to the classpath
docker run --rm -it -v /<lombokhome>/dist/lombok.jar:/workspace/classpath/lombok.jar lombok-gradle-jdk17To build the Lombok Maven Docker images, execute the following commands from the <lombokhome>/docker directory. You can build a standard image or provide a specific lombokjar version via a build argument.
# Build the default image
docker build -t lombok-maven-jdk17 -f maven/Dockerfile .
# Build with a specific lombok jar version
docker build -t lombok-maven-jdk17 --build-arg lombokjar=lombok-1.18.20.jar -f maven/Dockerfile .When building the Lombok Docker image, you can specify the Gradle version using the gradle build argument.
Supported values:
8.5 (default)8.37.6.16.8.3docker build --build-arg gradle=8.3 -t lombok-gradle-jdk17 -f gradle/Dockerfile .