How to: [1.4 - Build Projects](#table-of-contents)
To build from source, you need the following installed and available in your `$PATH:`

* [Java 11](https://adoptium.net/)

* [Apache Maven 3.8.8 or greater](https://maven.apache.org/) (optional)

After cloning the project, you can build it from source using [maven wrapper](https://maven.apache.org/wrapper/):

- Linux: `./mvnw clean install`
- Windows: `mvnw.cmd clean install`

#### Nix users

If you're a nix user, you can enter OpenAPI Generator shell, by typing:
```sh
nix develop
```
It will enter a shell with Java 11 installed.

Direnv supports automatically loading of the nix developer shell, so if you're using direnv too, type:
```sh
direnv allow
```
and have `java` and `mvn` set up with correct versions each time you enter project directory.

The default build contains minimal static analysis (via CheckStyle). To run your build with PMD and Spotbugs, use the `static-analysis` profile:

- Linux: `./mvnw -Pstatic-analysis clean install`
- Windows: `mvnw.cmd -Pstatic-analysis clean install`