> For the complete documentation index, see [llms.txt](https://knowledgebase.autorabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-suite/iz-scan/ci-cd-integration/using-maven.md).

# Using Maven

## CI/CD Integration - Using Maven

{% hint style="warning" %}
Before scanning applications using IZ Scan, make sure you have:

* Purchased a valid license for IZ Scan.
* Downloaded and installed **`Apache Maven`** 3.6.3 or higher. Refer to [Installing Apache Maven](https://maven.apache.org/)
* Downloaded and installed JDK 11
* Follow the instructions on [Generating Security Token](/product-guides/integral-zone/iz-suite/iz-scan/ci-cd-integration/generate-security-token.md) to generate a security token
  {% endhint %}

### Adding Repositories

1. The binaries required to scan the projects are available in **`IZ Maven Central`** repository. Include the following repositories and plugin repositories in settings.xml

```xml
<repositories>
    <repository>
        <id>iz-maven-repo</id>
        <name>IZ Maven Repo</name>
        <url>https://iz-public-m2.s3.eu-west-2.amazonaws.com/releases</url>
    </repository>
</repositories>
```

```xml
<pluginRepositories>
    <pluginRepository>
        <id>iz-maven-plugin-repo</id>
        <url>https://iz-public-m2.s3.eu-west-2.amazonaws.com/releases</url>
    </pluginRepository>
</pluginRepositories>
```

### CI/CD Integration

1. Go to the project root directory from the command line/terminal
2. Run **`mvn`**` ``com.integralzone.izsuite:iz-scan-cli`**`:scan`** command with the following options

{% hint style="warning" %}
The maven command prior to version 26.3.1 will be `mvn com.integralzone.falcon:falcon-scan-cli:scan` . Rest of the parameters will remain the same.
{% endhint %}

1. -DserviceHost=xxx\
   *IZ Scan service URL*
2. -DauthToken=xxx\
   *Security token generated from the server*
3. -DapplicationKey=x.x\
   *Unique ID of the application / project being scanned*
4. -DapplicationName=.\
   *Name of the application being scanned*
5. -Dsource=xxx\
   *Optional. Location of the project source directory. If ignored, the current directory will be used as the project source directory*
6. -DscmBranchName=xxx + *Optional. SCM branch for which code is being analyzed. If ignored, the default value will be **`master`***
7. -DpullRequestId=xxx + \_Optional.SCM Pull request name for which code is being analyzed
8. -Dorganization=xxx + *Optional. Organization under which the project should be categorized. If ignored, the default organization will be used. Value can be any of Organization Name / Id / Ext Id. NOTE: In a multi tenancy environment, this parameter is mandatory.*&#x20;
9. -DsarifReport=xxx + \_Optional. Used to generate issues in SARIF format. The output report file path must be specified using this parameter.

Please refer to the section [below](/product-guides/integral-zone/iz-suite/iz-scan/ci-cd-integration/using-maven.md) for instructions on how to retrieve the organization ID.

1. A complete example may look like&#x20;

```
PROJECT_ROOT_DIR> mvn com.integralzone.izsuite:iz-scan-cli:scan 
-DserviceHost=${FALCON_HOST} 
-DauthToken=${FALCON_TOKEN} 
-DapplicationKey=orders-sapi 
-Dsource=.
-DapplicationName="Orders SAPI"
```

### Retrieve Organization ID

1. Navigate to the main menu **`Organizations`** -> **`Organizations`**
2. In the displayed list of organizations, each one will have an associated **`Id`** as shown below.&#x20;

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FkY3Yd5chkeJMgKYj1xCD%2Forganization_ids.png?alt=media&amp;token=4b892b74-d6fe-4e4b-9bae-5609056ba83f" alt=""><figcaption></figcaption></figure>

3. Use the Organization ID when performing the CICD scan with the **`-Dorganization`** parameter.

```
_For example: -Dorganization=cm0oy5hht00efv640wm935np9_
```

### Setting Proxy Details

If the system from which the projects are analyzed is configured with a proxy, then set the following arguments with proxy server details -

1. Windows&#x20;

```
-Dhttps.proxyHost=PROXY_HOST -Dhttps.proxyPort=PROXY_PORT -Dhttp.proxyHost=PROXY_HOST -Dhttp.proxyPort=PROXY_PORT -Djava.net.useSystemProxies=true
```

{% hint style="info" %}

* Replace **`PROXY_HOST`** and **`PROXY_PORT`** with appropriate values for Porxy server host and port
* If **`https.proxyPort`** is not specified default value will be 443
* If **`http.proxyPort`** is not specified default value will be 80
  {% endhint %}

### See Also

* [Mule Code Coverage](/product-guides/integral-zone/iz-suite/iz-scan/ci-cd-integration/mule-coverage-reports.md)
* [Aborting Builds](/product-guides/integral-zone/iz-suite/iz-scan/ci-cd-integration/terminate-build.md)
* [Install IZ Scan for Cloud](/product-guides/integral-zone/iz-suite/iz-scan/vs-code-extension/installation/cloud-version.md)
* [Install IZ Scan for Desktop](/product-guides/integral-zone/iz-suite/iz-scan/vs-code-extension/installation/desktop-version.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://knowledgebase.autorabit.com/product-guides/integral-zone/iz-suite/iz-scan/ci-cd-integration/using-maven.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
