-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build instructions for developers Follow up from issue #17375, add instructions solely for distribution profile. Note that this build command is mostly used by me, everyone is welcome to add further optimizations for a faster distribution build. Co-authored-by: Abhishek Radhakrishnan <[email protected]> * Update docs/development/build.md Co-authored-by: Abhishek Radhakrishnan <[email protected]> * Update docs/development/build.md Co-authored-by: Abhishek Radhakrishnan <[email protected]> --------- Co-authored-by: Abhishek Radhakrishnan <[email protected]>
- Loading branch information
1 parent
e4cdbca
commit ba76264
Showing
1 changed file
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,34 +29,34 @@ For building the latest code in master, follow the latest version of this page | |
[here](https://github.com/apache/druid/blob/master/docs/development/build.md): | ||
make sure it has `/master/` in the URL. | ||
|
||
#### Prerequisites | ||
## Prerequisites | ||
|
||
##### Installing Java and Maven | ||
### Installing Java and Maven | ||
|
||
- See our [Java documentation](../operations/java.md) for information about obtaining a supported JDK | ||
- [Maven version 3.x](http://maven.apache.org/download.cgi) | ||
|
||
##### Other dependencies | ||
### Other Dependencies | ||
|
||
- Distribution builds require Python 3.x and the `pyyaml` module. | ||
- Integration tests require `pyyaml` version 5.1 or later. | ||
|
||
##### Downloading the source | ||
## Downloading the Source Code | ||
|
||
```bash | ||
git clone [email protected]:apache/druid.git | ||
cd druid | ||
``` | ||
|
||
#### Building from source | ||
## Building from Source | ||
|
||
The basic command to build Druid from source is: | ||
|
||
```bash | ||
mvn clean install | ||
``` | ||
|
||
This will run static analysis, unit tests, compile classes, and package the projects into JARs. It will _not_ generate the source or binary distribution tarball. | ||
This will run static analysis, unit tests, compile classes, and package the projects into JARs. It will _not_ generate the source or binary distribution tarball. Note that this build may take some time to complete. | ||
|
||
In addition to the basic stages, you may also want to add the following profiles and properties: | ||
|
||
|
@@ -72,9 +72,25 @@ Putting these together, if you wish to build the source and binary distributions | |
mvn clean install -Papache-release,dist,rat -DskipTests | ||
``` | ||
|
||
#### Potential issues | ||
### Building for Development | ||
|
||
##### Missing `pyyaml` | ||
For development, use only the dist profile and skip the Apache release and Apache rat profiles. | ||
|
||
```bash | ||
mvn clean install -Pdist -DskipTests | ||
``` | ||
|
||
If you want to speed up the build even more, you can enable parallel building with the `-T1C` option and skip some static analysis checks. | ||
|
||
```bash | ||
mvn clean install -Pdist -T1C -DskipTests -Dforbiddenapis.skip=true -Dcheckstyle.skip=true -Dpmd.skip=true -Dmaven.javadoc.skip=true -Denforcer.skip=true | ||
``` | ||
|
||
You will expect to find your distribution tar file under the `distribution/target` directory. | ||
|
||
## Potential issues | ||
|
||
### Missing `pyyaml` | ||
|
||
You are building Druid from source following the instructions on this page but you get | ||
``` | ||
|