2017-01-05 11:27:08 +01:00
|
|
|
# How to build PMD
|
|
|
|
|
2020-05-14 19:58:08 +02:00
|
|
|
PMD uses [Maven](https://maven.apache.org/) and requires at least Java 11 for building.
|
|
|
|
You can get Java 11 from [Oracle](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
|
|
|
or from [AdoptOpenJdk](https://adoptopenjdk.net/).
|
2017-01-05 11:27:08 +01:00
|
|
|
|
2022-01-14 16:10:05 +01:00
|
|
|
PMD uses the [maven wrapper](https://maven.apache.org/wrapper/), so you can simply build PMD as following:
|
2017-01-05 11:27:08 +01:00
|
|
|
|
2017-05-05 11:10:42 +02:00
|
|
|
* `./mvnw clean verify` (on Unix-like platform such as Linux and Mac OS X)
|
|
|
|
* `mvnw.cmd clean verify` (on Windows)
|
2017-01-05 11:27:08 +01:00
|
|
|
|
|
|
|
This will create the zip files in the directory `pmd-dist/target`:
|
|
|
|
|
|
|
|
cd pmd-dist/target
|
|
|
|
ls *.zip
|
|
|
|
|
|
|
|
That's all !
|
|
|
|
|
2021-04-29 14:59:13 +02:00
|
|
|
**Note:** While Java 11 is required for building, running PMD only requires Java 7
|
|
|
|
(or Java 8 for Apex, JavaScript, Scala, Visualforce, and the Designer).
|
2017-09-24 10:34:09 +02:00
|
|
|
|
2020-05-07 10:09:58 +02:00
|
|
|
**Note:** With PMD 6.24.0, we are creating [Reproducible Builds](https://reproducible-builds.org/). Since we use
|
|
|
|
[Maven](https://maven.apache.org/guides/mini/guide-reproducible-builds.html) for building, the following
|
|
|
|
limitations apply:
|
|
|
|
|
|
|
|
* Generally give **different results on Windows and Unix** because of different newlines.
|
|
|
|
(carriage return linefeed on Windows, linefeed on Unixes).
|
|
|
|
|
2021-04-15 16:20:22 +02:00
|
|
|
We build our releases under **Linux** on [Github Actions](https://github.com/pmd/pmd/actions).
|
2020-05-07 10:09:58 +02:00
|
|
|
|
|
|
|
* Generally depend on the **major version of the JDK** used to compile. (Even with source/target defined,
|
|
|
|
each major JDK version changes the generated bytecode.).
|
|
|
|
|
2021-04-15 16:20:22 +02:00
|
|
|
We build our releases using OpenJDK 11.
|
2020-05-07 10:09:58 +02:00
|
|
|
|
2017-09-24 10:34:09 +02:00
|
|
|
## How to build the documentation?
|
2017-01-05 11:27:08 +01:00
|
|
|
|
2017-09-24 10:34:09 +02:00
|
|
|
cd docs
|
|
|
|
bundle install # once
|
|
|
|
bundle exec jekyll build
|
2017-01-05 11:27:08 +01:00
|
|
|
|
2017-09-24 10:34:09 +02:00
|
|
|
You'll find the built site in the directory `_site/`.
|
2017-01-05 11:27:08 +01:00
|
|
|
|
2017-09-24 10:34:09 +02:00
|
|
|
For more info, see [README in docs directory](docs/README.md).
|