ZAP is built with Gradle, the following sections explain how to use it to build and run ZAP. The Gradle tasks are expected to be executed with the provided Gradle Wrapper.
The following page provides in depth guides on how to import, build, and run ZAP (core and add-ons) with commonly used IDEs: https://www.zaproxy.org/docs/developer/
To run ZAP directly from the source run the task :zap:run
. It will use any add-ons available in the zap/src/main/dist/plugin/ directory.
NOTE: No add-on is included in the repository, they need to be built/copied separately into the plugin
directory.
To execute the tests run the task :zap:test
.
The distributions bundle ZAP and its dependencies, all necessary to run ZAP standalone. By default the distributions of development
versions (SNAPSHOT) bundle the add-ons present in the dist plugin
directory, main versions (non-SNAPSHOT) bundle a predefined
list of add-ons (downloaded automatically when the distribution is built).
The distributions are built into zap/build/distributions/
.
A zip package with a day stamped version, does not target any specific OS, it bundles all add-ons present in the plugin
directory always.
To build it run the task :zap:distDaily
.
(This distribution is built by default, it is a dependency of assemble
task.)
A zip package with a day stamped version, does not target any specific OS, it bundles only weekly add-ons (built automatically from source when the distribution is built). This distribution is used for weekly releases.
To build it run the task :zap:distWeekly
.
The build also provides the task :zap:copyWeeklyAddOns
which builds and copies the weekly add-ons into the plugin directory,
using existing repositories in the file system at the same level as zaproxy.
A zip package, does not target any specific OS.
To build it run the task :zap:distCrossplatform
.
Same as cross platform distribution but with just the essential add-ons, making the distribution smaller.
To build it run the task :zap:distCore
.
A tar.gz package, the macOS/Windows specific add-ons are excluded from this distribution.
To build it run the task :zap:distLinux
.
A deb package, bundling ZAP and its dependencies. Does not bundle any add-ons, they are expected to be installed separately, for example, from marketplace.
To build it run the task :zap:distDebian
.
A dmg bundling ZAP, its dependencies, and a JRE. The Linux/Windows specific add-ons are excluded from this distribution.
To build the macOS distributions run the tasks :zap:distMac
and :zap:distMacArm64
, for the architectures x64
and aarch64
respectively.
NOTE: Needs to be executed on macOS, it requires hdiutil
.
The installers for Linux and Windows are built with install4j. The Windows executable is built with the launch4j, invoked with Gradle plugin gradle-launch4j.
To build the installers run the task :zap:installers
.
Once the build is finished the installers will be located in the directory zap/build/install4j/
.
NOTE: The following properties must be defined (e.g. in file GRADLE_HOME/gradle.properties
) to successfully and properly build the installers:
install4jHomeDir
- install4j installation directory;install4jLicense
- install4j license key.