github.com/joey-fossa/fossa-cli@v0.7.34-0.20190708193710-569f1e8679f0/docs/integrations/ant.md (about) 1 # Ant / Ivy 2 3 ## Support 4 5 Apache Ant / Ivy support in FOSSA CLI depends on the following tools existing in your environment: 6 7 - Java (defaults to `java`, configure with `$JAVA_BINARY`) 8 - Any (defaults to `ant`, configure with `$ANT_BINARY`) 9 10 ## Configuration 11 12 ### Automatic 13 14 Running `fossa init` will search for ant modules by traversing the file tree and checking for two conditions: 15 1. A valid `build.xml` file. 16 2. The existence of a `lib/` directory where jars are stored. 17 18 If these conditions are satisfied, a new module will be added to the configuration file. 19 20 ### Manual 21 22 In order to manually add an Ant module follow the blueprint below: 23 24 ```yaml 25 analyze: 26 modules: 27 - name: {module} 28 type: ant 29 path: {path-to-build.xml} 30 target: {path-to-build.xml} 31 ``` 32 33 If you have a complex Ant build that stores libraries in multiple locations, you can either specify multiple modules with custom `libdir` locations or upload raw dependency signatures directly to FOSSA. This can be done using the `libdir` option. 34 35 ## Options 36 37 | Option | Type | Name | Common Use Case | 38 | -------- | :----: | --------------------------- | ------------------------------------------ | 39 | `libdir` | string | [LibDir](#libdir-string) | Specify the path to the ant lib directory. | 40 41 42 #### `libdir: <string>` 43 44 `libdir` refers to the directory where all the JAR libraries used in a production build are stored. These directories can be difficult to automatically infer without running a build, you will often have to specify them yourself in configuration. 45 46 Default: `lib` 47 48 ## Analysis 49 50 Analysis starts from the specified `libdir` and collects all `.jar` files. Dependency locators containing the project name and revision are created for each jar using the following process: 51 1. Attempt to find a pom file within the jar to obtain dependency information. 52 2. Search for a Manifest file within `META-INF` to obtain dependency information. 53 3. Fallback to using the name of the `jar` to obtain dependency information. 54 55 Once dependency information is obtained, the list will be compiled into a complete dependency graph corresponding to the ant module. As fossa moves from step 1 to step 3, jars become increasingly difficult to resolve into known dependencies.