You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
about: This option creates an expedited Bug Report via the helpdesk (no login required). This will allow us to look up your account and allows you to provide additional information in private.
about: This option creates an expedited Feature Request via the helpdesk (no login required). This helps with prioritization and allows you to provide additional information in private.
*[Development environment set up](#development-environment-set-up)
9
+
*[Project build](#project-build)
10
10
11
11
## Development environment quick check
12
12
13
-
To check that your development environment is properly set up to build the project, you will eventually run `./setup.sh` from the project root and should have its output look something like this:
13
+
To check that your development environment is properly set up to build the project, run `./setup.sh` from the project root. Your output should look something like the following.
14
14
15
15
```bash
16
16
$ ./setup.sh
@@ -31,110 +31,106 @@ $ ./setup.sh
31
31
✅ The Docker server is running.
32
32
```
33
33
34
-
If the script finds any issue, you can check the requirements and follow the guide below to install and configure the required tools.
34
+
If there is any issue with your output, you can check the requirements and/or follow the guide below to install and configure the required tools.
35
35
36
-
## Building requirements
36
+
## Environment requirements quick check
37
37
38
-
To build the full project:
38
+
Requirements to build the full project:
39
39
40
-
* The JDK versions 8, 11, 17 and 21 must be installed
41
-
* The `JAVA_8_HOME`, `JAVA_11_HOME`, `JAVA_17_HOME`, `JAVA_21_HOME` and `JAVA_GRAALVM17_HOME` must point to their respective JDK location,
40
+
* The JDK versions 8, 11, 17 and 21 must be installed.
41
+
* The `JAVA_8_HOME`, `JAVA_11_HOME`, `JAVA_17_HOME`, `JAVA_21_HOME` and `JAVA_GRAALVM17_HOME` must point to their respective JDK location.
42
42
* The JDK-8 `bin` directory must be the only JDK on the PATH (e.g. `$JAVA_8_HOME/bin`).
43
-
* The `JAVA_HOME` environment variable may be unset. If set, it must point to the JDK 8 location (same as `JAVA_8_HOME`),
44
-
* The `git` command line must be installed,
45
-
* A container runtime environment must be available to run all tests (usually Docker Desktop).
43
+
* The `JAVA_HOME` environment variable may be unset. If set, it must point to the JDK 8 location (same as `JAVA_8_HOME`).
44
+
* The `git` command line must be installed.
45
+
* A container runtime environment must be available to run all tests (e.g. Docker Desktop).
* Fix the GraalVM installation by [removing the quarantine flag](https://www.graalvm.org/latest/docs/getting-started/macos/):
55
+
* Fix the GraalVM installation by [removing the quarantine flag](https://www.graalvm.org/latest/docs/getting-started/macos/).
57
56
`sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-<current version of graalvm>`
58
-
* Add the required environment variables to your shell using the `export` command:
57
+
* Add the required environment variables to your shell using the `export` command. You can permanently install the environment variables by appending the `export` commands into your shell configuration file `~/.zshrc` or `.bashrc` or other.
export JAVA_GRAALVM17_HOME=/Library/Java/JavaVirtualMachines/graalvm-<current version of grallvm>/Contents/Home
63
+
export JAVA_GRAALVM17_HOME=/Library/Java/JavaVirtualMachines/graalvm-<current version of graalvm>/Contents/Home
65
64
export JAVA_HOME=$JAVA_8_HOME
66
65
```
66
+
* Restart your shell after applying the changes if you appended the commands to your shell configuration file.
67
67
68
68
> [!NOTE]
69
-
> ARM users, there is no Oracle JDK v8 for ARM.
69
+
> ARM users: there is no Oracle JDK v8 for ARM.
70
70
> It's recommended to use [Azul's Zulu](https://www.azul.com/downloads/?version=java-8-lts&architecture=arm-64-bit&package=jdk#zulu) builds of Java 8.
71
71
> [Amazon Corretto](https://aws.amazon.com/corretto/) builds have also been proven to work.
72
72
73
73
> [!NOTE]
74
-
> MacOS users, remember that `/usr/libexec/java_home` may control which JDK is in your path.
75
-
76
-
> [!NOTE]
77
-
> You can permanently install the environment variables by appending the `export` commands into your shell configuration file `~/.zshrc` (or `.bashrc` dependening of your shell).
78
-
> You will need to restart your shell first to apply the changes.
74
+
> MacOS users: remember that `/usr/libexec/java_home` may control which JDK is in your path.
79
75
80
76
**On Linux:**
81
77
82
-
* Download and extract JDK 8, 11, 17 and 21 from [Eclipse Temurin releases](https://adoptium.net/temurin/releases/) and GraalVM from [Oracle downloads](https://www.graalvm.org/downloads/),
83
-
* Install the GraalVM native image requirements for native builds following [the GraalVM official documentation](https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites),
84
-
* Add the required environment variables to your shell using the `export` command:
78
+
* Download and extract JDK 8, 11, 17 and 21 from [Eclipse Temurin releases](https://adoptium.net/temurin/releases/) and GraalVM from [Oracle downloads](https://www.graalvm.org/downloads/).
79
+
* Install the GraalVM native image requirements for native builds by following [the GraalVM official documentation](https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites).
80
+
* Add the required environment variables to your shell using the `export` command. You can permanently install the environment variables by appending the `export` commands into your shell configuration file `~/.zshrc` or `~/.bashrc` or other.
85
81
```shell
86
82
export JAVA_8_HOME=/<path to extracted archive>/jdk8u<current version of JDK 8>
87
83
export JAVA_11_HOME=/<path to extracted archive>/jdk-11.<current version of JDK 11>
88
84
export JAVA_17_HOME=/<path to extracted archive>/jdk-17.<current version of JDK 17>
89
85
export JAVA_21_HOME=/<path to extracted archive>/jdk-21.<current version of JDK 21>
90
-
export JAVA_GRAALVM17_HOME=/<path to extracted archive>/graalvm-jdk-17.<current version of grallvm>/Contents/Home
86
+
export JAVA_GRAALVM17_HOME=/<path to extracted archive>/graalvm-jdk-17.<current version of graalvm>/Contents/Home
91
87
export JAVA_HOME=$JAVA_8_HOME
92
88
```
93
-
94
-
> [!NOTE]
95
-
> You can permanently install the environment variables by appending the `export` commands into your shell configuration file `~/.zshrc` (or `.bashrc` dependening of your shell).
96
-
> You will need to restart your shell first to apply the changes.
89
+
* Restart your shell after applying the changes if you appended the commands to your shell configuration file.
97
90
98
91
**On Windows:**
99
92
100
-
* Download and install JDK 8, 11, 17 and 21 from [Eclipse Temurin releases](https://adoptium.net/temurin/releases/) and GraalVM from [Oracle downloads](https://www.graalvm.org/downloads/),
101
-
* Install the GraalVM native image requirements for native builds following [the GraalVM official documentation](https://www.graalvm.org/latest/docs/getting-started/windows/#prerequisites-for-native-image-on-windows),
102
-
* Add the required environment variables:
103
-
* Open the *Start Menu*, type `environment variable` and open the *System Properties* using the *Edit environment variable for your account* entry,
104
-
* Add new entries to the table:
105
-
*`JAVA_8_HOME` to the JDK 8 installation folder, usually `C:\Program Files\Eclipse Adoptium\jdk-<current version of Java 8>-hotspot\bin`,
106
-
*`JAVA_11_HOME`, `JAVA_21_HOME`, and `JAVA_21_HOME` similarly to their respective installation `bin` folders,
107
-
*`JAVA_GRAALVM17_HOME` to the GraalVM installation folder, usually `C:\Program Files\Java\<current version of graalvm>\bin`.
93
+
* Download and install JDK 8, 11, 17 and 21 from [Eclipse Temurin releases](https://adoptium.net/temurin/releases/) and GraalVM from [Oracle downloads](https://www.graalvm.org/downloads/).
94
+
* Install the GraalVM native image requirements for native builds by following [the GraalVM official documentation](https://www.graalvm.org/latest/docs/getting-started/windows/#prerequisites-for-native-image-on-windows).
95
+
* Add the required environment variables.
96
+
* Open the *Start Menu*, type `environment variable`, and use the *Edit environment variable for your account* entry to open the *System Properties*.
97
+
* Add new entries to the table.
98
+
*`JAVA_8_HOME` to the JDK 8 installation folder, usually `C:\Program Files\Eclipse Adoptium\jdk-<current version of Java 8>-hotspot\bin`
99
+
*`JAVA_11_HOME`, `JAVA_21_HOME`, and `JAVA_21_HOME` similarly to their respective installation `bin` folders
100
+
*`JAVA_GRAALVM17_HOME` to the GraalVM installation folder, usually `C:\Program Files\Java\<current version of graalvm>\bin`
108
101
109
102
### Install git
110
103
111
-
**On MacOS**, you can trigger the installation running any `git` command from the terminal, like `git --version`.
112
-
If not installed, it will prompt you to install it.
104
+
**On MacOS:**
105
+
106
+
You can trigger the installation by running any `git` command from the terminal, e.g. `git --version`.
107
+
If not installed, the terminal will prompt you to install it.
113
108
114
-
**On Linux**, use `# apt-get install git` command.
109
+
**On Linux:**
110
+
111
+
Run `apt-get install git`.
112
+
113
+
**On Windows:**
115
114
116
-
**On Windows**, [download and install the installer from the offical website](https://git-scm.com/download/win).
115
+
Download and install [the installer](https://git-scm.com/download/win) from the official website.
117
116
118
117
### Install Docker Desktop
119
118
120
119
Download and install Docker Desktop from the offical website for [MacOS](https://docs.docker.com/desktop/install/mac-install/), [Linux](https://docs.docker.com/desktop/install/linux-install/) or [Windows](https://docs.docker.com/desktop/install/windows-install/).
121
120
122
121
> [!NOTE]
123
-
> Docker Desktop is the recommended container runtime environment but you can use any other environment to run testcontainers tests.
122
+
> Docker Desktop is the recommended container runtime environment, but you can use any other environment to run testcontainers tests.
124
123
> Check [the testcontainers container runtime requirements](https://java.testcontainers.org/supported_docker_environment/) for more details.
125
124
126
-
### Clone the repository and setup git
125
+
### Clone the repository and set up git
127
126
128
-
First get a copy of the project.
129
-
Start a terminal into your workspace and clone the repository using git:
127
+
* Get a copy of the project.
128
+
* In your workspace, clone the repository using git.
> You can alternative use the `core.hooksPath` configuration to point to the `.githooks` folder using `git config --local core.hooksPath .githooks` if you don't already have a hooks path already defined system-wide.
145
+
> You can alternatively use the `core.hooksPath` configuration to point to the `.githooks` folder using `git config --local core.hooksPath .githooks` if you don't already have a hooks path defined system-wide.
150
146
151
147
> [!NOTE]
152
-
> The git hooks will check your code is properly formatted before commiting it.
153
-
> This is done both to avoid future merge conflict and ensure an uniformity inside the code base.
148
+
> The git hooks will check that your code is properly formatted before commiting.
149
+
> This is done both to avoid future merge conflict and ensure uniformity inside the code base.
154
150
155
-
Finally, configure git to automatically update submodules:
151
+
* Configure git to automatically update submodules.
> This will keep the submodule in `dd-java-agent/agent-jmxfetch/integrations-core` up-to-date.
166
-
> There is also an automated check when opening a pull request if you are trying to submit an module version change (usually an outdated version).
162
+
> There is also an automated check when opening a pull request if you are trying to submit a module version change (usually an outdated version).
167
163
168
164
> [!NOTE]
169
-
> Both git configurations (hooks and submodule) will only be applied to the project and won't apply globally to your setup.
165
+
> Both git configurations (hooks and submodule) will only be applied to this project and won't apply globally in your setup.
170
166
171
167
### Check your development environment
172
168
173
-
If you properly followed this guide, the `setup.sh` script at the project root should run without issue, confirming everything is properly setup.
169
+
You can confirm that your development environment is properly set up using the [quick check](#development-environment-quick-check)`setup.sh` script.
174
170
175
171
> [!NOTE]
176
172
> The `setup.sh` script is only available for MacOS and Linux.
177
173
178
174
### Build the project
179
175
180
-
Now everything is setup, you can then move the next section to start a build, or check [the contribution guidelines](CONTRIBUTING.md).
176
+
After everything is properly set up, you can move on to the next section to start a build or check [the contribution guidelines](CONTRIBUTING.md).
181
177
182
-
## Building commands
178
+
## Project build
183
179
184
-
To build the project without running tests run:
180
+
To build the project without running tests, run:
185
181
```bash
186
182
./gradlew clean assemble
187
183
```
188
184
189
-
To build the entire project with tests (this can take a very long time) run:
185
+
To build the entire project with tests (this can take a very long time), run:
190
186
```bash
191
187
./gradlew clean build
192
188
```
193
189
194
190
>[!NOTE]
195
191
> Running the complete test suite on a local development environment can be challenging.
196
-
> It might take a very long time, and you might encounter few flaky tests along the way.
197
-
> It is recommended to only run the tests related to your changes locally, and leave the whole test suite to the continuous integration platform.
192
+
> It may take a very long time, and you might encounter a few flaky tests along the way.
193
+
> It is recommended to only run the tests related to your changes locally and leave running the whole test suite to the continuous integration platform.
198
194
199
-
To build the JVM agent artifact only run:
195
+
To build the JVM agent artifact only, run:
200
196
```bash
201
197
./gradlew :dd-java-agent:shadowJar
202
198
```
203
199
204
-
After building the project, you can find the built JVM agent artifact into the `dd-java-agent/build/libs` folder.
200
+
After building the project, you can find the built JVM agent artifact in the `dd-java-agent/build/libs` folder.
0 commit comments