This document will help you compile and build a project in your maven and set your IDE.
Prepare JDK 17 or 21.
git clone https://github.com/apache/skywalking-java.git cd skywalking-java ./mvnw clean package -Pall
./mvnw clean package
The agent binary package is generated in skywalking-agent folder.
Set Generated Source Codes(grpc-java and java folders in apm-protocol/apm-network/target/generated-sources/protobuf) folders if you are using IntelliJ IDE.
After you have compiled the project and have generated the skywalking-agent folder, you can build Docker images. [make docker] builds the agent Docker images based on alpine image, java8, java11 and java 17 images by default. If you want to only build part of the images, add suffix .alpine or .java<x> to the make target, for example:
make docker.alpine docker.java8 docker.java11
You can also customize the Docker registry and Docker image names by specifying the variable HUB, NAME.
gcr.io/skywalking and custom name to sw-agent.make docker.alpine HUB=gcr.io/skywalking NAME=sw-agentThis will name the Docker image to
gcr.io/skywalking/sw-agent:latest-alpineIf you want to push the Docker images, add suffix to the make target docker., for example:
make docker.push.alpine docker.push.java8 docker.push.java11