@@ -25,6 +25,10 @@ cd dd-dependency-sniffer
25
25
26
26
## Usage
27
27
28
+ First ensure that you have the following software installed on your system:
29
+ 1 . [ Docker] ( https://docs.docker.com/engine/install/ )
30
+ 2 . [ Bash] ( https://www.gnu.org/software/bash/ )
31
+
28
32
The sniffer is capable of parsing and analyzing dependency tree reports from
29
33
both [ Maven] ( https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html )
30
34
and [ Gradle] ( https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html ) . It relies on the following
@@ -33,12 +37,20 @@ environment variables to provide access to your local dependencies:
33
37
- ** _ M2_HOME_ ** (by default ` $HOME/.m2 ` ) pointing to your local Maven repository.
34
38
- ** _ GRADLE_USER_HOME_ ** (by default ` $HOME/.gradle ` ) pointing to your local Gradle repository.
35
39
36
- You can run the script via the command line :
40
+ You can download the provided script and run it :
37
41
38
42
``` shell
43
+ curl " https://datadoghq.dev/dd-dependency-sniffer/run.sh" -o run.sh
44
+ chmod +x ./run.sh
39
45
./run.sh --type [gradle| maven] --artifact $ARTIFACT_ID --package $PACKAGE_NAME $REPORT
40
46
```
41
47
48
+ Or run it directly with:
49
+
50
+ ``` shell
51
+ curl -s " https://datadoghq.dev/dd-dependency-sniffer/run.sh" | bash -s -- --type [gradle| maven] --artifact $ARTIFACT_ID --package $PACKAGE_NAME $REPORT
52
+ ```
53
+
42
54
The options are as follows:
43
55
44
56
- ** _ --type_ ** : Specify either ` gradle ` or ` maven ` .
@@ -63,7 +75,7 @@ report, from your project run:
63
75
Run the script:
64
76
65
77
``` shell
66
- ./ run.sh --type maven --artifact slf4j-api maven.json
78
+ run.sh --type maven --artifact slf4j-api maven.json
67
79
```
68
80
69
81
### Gradle
@@ -79,5 +91,5 @@ from your project run:
79
91
Run the script:
80
92
81
93
``` shell
82
- ./ run.sh --type gradle --artifact slf4j-api gradle.txt
94
+ run.sh --type gradle --artifact slf4j-api gradle.txt
83
95
```
0 commit comments