Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Overview

This page describes the three possible ways to run the Ant integration.

Configuration

For information on configuration parameters, refer to Configuration File & Parameters.

Using Module settings inside build.xml

Project module in your workspace to be updated or created with nested <module> elements.

...

Attribute

...

Type

...

Description

...

Required

...

name

...

String

...

Module name to be matched with an existing WhiteSource project name. If a project with this name does not exist, then a new project will be created.

...

One of these attributes

...

token

...

String

...

page

...

Each module must be declared with nested <path> elements that stores the location of the module's lib folder (with all the dependencies).

Example

This example shows how to configure a Multi-module project structure with two modules. The first is matched by name and the second by a project token.

build.xml

...

...

<!-- Define the White Source target -->

<target name="whitesource" description="white source ant plugin">

    <!-- Execute White Source -->

    <whitesource apikey="${whitesource.apikey}">

        <!-- check policies (optional) -->

        <checkpolicies reportdir="."/>

         

        <!-- first module -->

        <module name="MyModule">

            <path refid="module1.libs.path"/>

        </module>

         

        <!-- second module -->

        <module token="${whitesource.module2.token}">

            <path refid="module2.libs.path"/>

        </module>

    </whitesource>

</target>

...

More information on working with nested <path> elements can be found here.

Run the Default Scan

The Unified Agent will search for the following extensions in your project: jar, war, ear, par, rar, dll, exe, ko, so, msi, zip, tar, tar.gz, swc, swf. - this option will only occur if none of the above options (Configuration or Using Module settings inside build.xml) are activated.is available at: https://docs.mend.io/bundle/unified_agent/page/apache_ant_integration.html