The Java implementation to access the OWASP ZAP API. For more information about OWASP ZAP consult the (main) OWASP ZAP project.
This project produces two libraries:
zap-clientapi, the library that contains the Java implementation to access the OWASP ZAP API;zap-clientapi-ant, the library that contains Ant tasks that wrap functionality provided byzap-clientapi. This library depends onzap-clientapiand Ant, both should be available at runtime.
The latest released versions can be downloaded from the Releases page.
Or, if using a dependency management tool, for example Maven, the zap-clientapi library
can be obtained from Maven Central with following coordinates:
- GroupId:
org.zaproxy - ArtifactId:
zap-clientapi - Version:
1.2.0
Previous releases are also available, more details can be found in Maven Central.
For help using OWASP ZAP API refer to:
- Examples - collection of examples using the library;
- OWASP ZAP User Group - for asking questions;
- IRC: irc.mozilla.org #websectools (eg using Mibbit) - chat with core ZAP developers (European office hours usually best)
To report issues related to OWASP ZAP API, bugs and enhancements requests, use the issue tracker of the main OWASP ZAP project.
This project uses Gradle to build its libraries, for example, running:
./gradlew build
in the main directory of the project will build all the libraries. The libraries will be located in the build/libs directory
of each subproject.
To install the artifacts to the local Maven repository you can run the following:
./gradlew install
The installed artifacts (zap-clientapi) are then available for other (local) projects to use.
In the following sections it will be explained the steps necessary to release a new version of the libraries. In all steps the
version to be released is referred to as <version-to-release>, which should be replaced with appropriate version number
(e.g. 2.1.0).
The project follows the git-flow branching model. To release a new version it needs to be created a new release branch, update the version, and tag:
- Create a release branch:
git checkout -b release-<version-to-release> develop; - Update version in:
build.gradlefile (e.g. remove-SNAPSHOT);- source code (e.g.
@sinceand@deprecatedJavaDoc tags); README.mdfile (inHow to Obtainsection);
- Review that everything is correct and commit the changes:
git commit -S -m "Bump version number to <version-to-release>" - Checkout
masterand merge the release branch:git checkout mastergit merge -S --no-ff release-<version-to-release> -m "Merge branch 'release-<version-to-release>' into master"
- Tag the new version:
git tag -s v<version-to-release> -m "Version <version-to-release>"
Reintegrate the changes into develop branch:
- Checkout develop branch:
git checkout develop - Merge the
release-<version-to-release>branch:git merge -S --no-ff release-<version-to-release> -m "Merge branch 'release-<version-to-release>' into develop"- Resolve possible conflicts;
- The version can be bumped to the next developing version (e.g. increase the minor version and add
-SNAPSHOT); - Continue with the merge (if the version was bumped mention it in the commit message);
- The version can be bumped to the next developing version (e.g. increase the minor version and add
- Resolve possible conflicts;
- Bump to the next developing version now (e.g. increase the minor version and add
-SNAPSHOT), if not done during the merge:git commit -S -m "Bump version number to <developing-version>-SNAPSHOT"
Delete the release branch:
git branch -d release-<version-to-release>
Push the branches (develop and master) and tag:
git push upstream develop master v<version-to-release>
(Assuming upstream is the zaproxy repo.)
Checkout the tagged version:
git checkout v<version-to-release>
Create the artifacts/libraries necessary for the release:
./gradlew clean build uberJar
To upload the built artifacts to OSSRH you can run the following:
./gradlew uploadArchives
Once uploaded continue with the release process in OSSRH: http://central.sonatype.org/pages/releasing-the-deployment.html
NOTE: The following properties must be defined (e.g. in file GRADLE_HOME/gradle.properties ) to successfully sign and
upload the artifacts:
signing.keyId- the ID of the GPG key, used to sign the artifacts;ossrhUsername- the OSSRH username;ossrhPassword- the OSSRH password for above username.
Also, the user must have permissions to upload to GroupId org.zaproxy.
Release in GitHub:
- Draft a new release:
- Tag:
v<version-to-release> - Title:
Version <version-to-release> - Description: (Add a summary of the changes done in the new version and mention the artifacts/libraries available.)
- Tag:
- Upload the libraries:
zap-api-<version-to-release>.jarzap-clientapi-<version-to-release>.jarzap-clientapi-ant-<version-to-release>.jar
- Publish release.