Skip to content

Commit 8af422e

Browse files
committed
Document Ivy based Ant plugin provisioning
1 parent 48c4595 commit 8af422e

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

ant/src/site/markdown/index.md.vm

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,45 @@ Installation
3232
* [dependency-check-purge](config-purge.html) - deletes the local copy of the NVD; this should rarely be used (if ever).
3333
* [dependency-check-update](config-update.html) - downloads and updates the local copy of the NVD.
3434

35+
Installation Using Apache Ivy
36+
====================
37+
38+
Instead of manually downloading and managing the Dependency-Check Ant JARs,
39+
Apache Ivy can be used to automatically provision the required dependencies.
40+
This approach helps ensure consistent versions across multiple environments
41+
and simplifies setup.
42+
43+
Below is an example `build.xml` configuration using Apache Ivy.
44+
45+
#[[
46+
```xml
47+
<project name="dependency-check-ivy" default="check"
48+
xmlns:ivy="antlib:org.apache.ivy.ant">
49+
50+
<!-- Load Ivy -->
51+
<taskdef resource="org/apache/ivy/ant/antlib.xml"/>
52+
53+
<!-- Resolve Dependency-Check Ant dependencies -->
54+
<ivy:settings/>
55+
<ivy:retrieve pattern="lib/[artifact]-[revision].[ext]"/>
56+
57+
<!-- Register Dependency-Check Ant task -->
58+
<taskdef
59+
resource="dependency-check-taskdefs.properties">
60+
<classpath>
61+
<fileset dir="lib">
62+
<include name="*.jar"/>
63+
</fileset>
64+
</classpath>
65+
</taskdef>
66+
67+
<target name="check">
68+
<dependency-check
69+
projectName="Example Project"
70+
scanSet="src"
71+
format="HTML"/>
72+
</target>
73+
</project>
3574

3675
It is important to understand that the first time this task is executed it may
3776
take 10 minutes or more as it downloads and processes the data from the National

0 commit comments

Comments
 (0)