Skip to content

Commit e04730e

Browse files
authored
Merge pull request #8 from CodeIntelligenceTesting/maven-advanced-fix
fix: fix dependency issue in advanced-setup/maven
2 parents a4aae3a + 726f998 commit e04730e

5 files changed

Lines changed: 29 additions & 18 deletions

File tree

example-projects/advanced-setup/maven/README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,37 @@ This is an extended example maven project which covers custom project setups:
1111
Right now we do not support a multi module project setup with maven so this project has two `cifuzz.yaml`,
1212
one in the module `tests` and one in `util`.
1313

14+
## Setup
15+
16+
To run the fuzz tests, the Maven `install` command needs to be run to be able to resolve all dependencies.
17+
18+
```
19+
mvn -Dmaven.test.skip=true install
20+
```
21+
1422
## Run
1523

1624
### Exception
1725

1826
```
19-
cd util
20-
cifuzz run util.UtilTest::joinFuzzTest
21-
22-
cd tests
23-
cifuzz run UtilFuzzTest::fuzzTest
27+
cifuzz -C util run util.UtilTest::joinFuzzTest
28+
```
29+
```
30+
cifuzz -C tests run UtilFuzzTest::fuzzTest
2431
```
2532

2633
### Negative Array Size Exception
2734

2835
```
29-
cd tests
30-
cifuzz run NegativeArraySizeFuzzTest::fuzzTest
36+
cifuzz -C tests run NegativeArraySizeFuzzTest::fuzzTest
3137
```
3238

3339
## Bundle
3440

3541
### Tests
3642

3743
```
38-
cd tests
39-
cifuzz bundle
44+
cifuzz -C tests bundle
4045
```
4146

4247
Should include **2** fuzz tests
@@ -47,8 +52,7 @@ Should include **2** fuzz tests
4752
### Util
4853

4954
```
50-
cd util
51-
cifuzz bundle
55+
cifuzz -C util bundle
5256
```
5357

5458
Should include **1** fuzz test

example-projects/advanced-setup/maven/app/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66
<modelVersion>4.0.0</modelVersion>
77

88
<parent>
9-
<groupId>com.cifuzz.tests</groupId>
9+
<groupId>com.cifuzz</groupId>
1010
<artifactId>maven-extended-project</artifactId>
1111
<version>1.0</version>
1212
</parent>
13+
14+
<groupId>com.cifuzz.app</groupId>
1315
<artifactId>app</artifactId>
1416
<name>app</name>
1517

1618
<dependencies>
1719
<dependency>
18-
<groupId>com.cifuzz.tests</groupId>
20+
<groupId>com.cifuzz.util</groupId>
1921
<artifactId>util</artifactId>
2022
<version>1.0</version>
2123
</dependency>

example-projects/advanced-setup/maven/pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
>
66
<modelVersion>4.0.0</modelVersion>
77

8-
<groupId>com.cifuzz.tests</groupId>
8+
<groupId>com.cifuzz</groupId>
99
<artifactId>maven-extended-project</artifactId>
1010
<version>1.0</version>
1111
<packaging>pom</packaging>
12+
1213
<name>Example Maven Project</name>
1314

1415
<properties>
@@ -28,7 +29,7 @@
2829
<extension>
2930
<groupId>com.code-intelligence</groupId>
3031
<artifactId>cifuzz-maven-extension</artifactId>
31-
<version>1.6.0</version>
32+
<version>1.7.0</version>
3233
</extension>
3334
</extensions>
3435
</build>

example-projects/advanced-setup/maven/tests/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<modelVersion>4.0.0</modelVersion>
77

88
<parent>
9-
<groupId>com.cifuzz.tests</groupId>
9+
<groupId>com.cifuzz</groupId>
1010
<artifactId>maven-extended-project</artifactId>
1111
<version>1.0</version>
1212
</parent>
13+
14+
<groupId>com.cifuzz.tests</groupId>
1315
<artifactId>tests</artifactId>
1416
<name>tests</name>
1517

@@ -23,7 +25,7 @@
2325

2426
<dependencies>
2527
<dependency>
26-
<groupId>com.cifuzz.tests</groupId>
28+
<groupId>com.cifuzz.util</groupId>
2729
<artifactId>util</artifactId>
2830
<version>1.0</version>
2931
<scope>test</scope>

example-projects/advanced-setup/maven/util/pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<modelVersion>4.0.0</modelVersion>
77

88
<parent>
9-
<groupId>com.cifuzz.tests</groupId>
9+
<groupId>com.cifuzz</groupId>
1010
<artifactId>maven-extended-project</artifactId>
1111
<version>1.0</version>
1212
</parent>
13+
14+
<groupId>com.cifuzz.util</groupId>
1315
<artifactId>util</artifactId>
1416
<name>util</name>
1517

0 commit comments

Comments
 (0)