diff --git a/pkg/dependency/parser/java/pom/parse_test.go b/pkg/dependency/parser/java/pom/parse_test.go
index 934085d5d536..77a47b5ecdac 100644
--- a/pkg/dependency/parser/java/pom/parse_test.go
+++ b/pkg/dependency/parser/java/pom/parse_test.go
@@ -61,6 +61,19 @@ func TestPom_Parse(t *testing.T) {
},
},
},
+ {
+ ID: "org.example:example-test:2.0.0",
+ Name: "org.example:example-test",
+ Version: "2.0.0",
+ Relationship: ftypes.RelationshipDirect,
+ Dev: true,
+ Locations: ftypes.Locations{
+ {
+ StartLine: 49,
+ EndLine: 54,
+ },
+ },
+ },
},
wantDeps: []ftypes.Dependency{
{
@@ -68,6 +81,7 @@ func TestPom_Parse(t *testing.T) {
DependsOn: []string{
"org.example:example-api:1.7.30",
"org.example:example-runtime:1.0.0",
+ "org.example:example-test:2.0.0",
},
},
},
@@ -109,6 +123,19 @@ func TestPom_Parse(t *testing.T) {
},
},
},
+ {
+ ID: "org.example:example-test:2.0.0",
+ Name: "org.example:example-test",
+ Version: "2.0.0",
+ Relationship: ftypes.RelationshipDirect,
+ Dev: true,
+ Locations: ftypes.Locations{
+ {
+ StartLine: 49,
+ EndLine: 54,
+ },
+ },
+ },
},
wantDeps: []ftypes.Dependency{
{
@@ -116,6 +143,7 @@ func TestPom_Parse(t *testing.T) {
DependsOn: []string{
"org.example:example-api:1.7.30",
"org.example:example-runtime:1.0.0",
+ "org.example:example-test:2.0.0",
},
},
},
diff --git a/pkg/dependency/parser/java/pom/testdata/happy/pom.xml b/pkg/dependency/parser/java/pom/testdata/happy/pom.xml
index 1f3c9697a17d..9dfc1c75bd65 100644
--- a/pkg/dependency/parser/java/pom/testdata/happy/pom.xml
+++ b/pkg/dependency/parser/java/pom/testdata/happy/pom.xml
@@ -46,5 +46,11 @@
999
provided
+
+ org.example
+ example-test
+ 2.0.0
+ test
+