Skip to content

Commit

Permalink
fix: add missing changes after merging main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Sep 13, 2024
1 parent d1abac5 commit 4b29756
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/dependency/parser/java/pom/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type artifact struct {

Module bool
Relationship ftypes.Relationship
Test bool

Locations ftypes.Locations
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/dependency/parser/java/pom/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ func (p *Parser) parseRoot(root artifact, uniqModules map[string]struct{}) ([]ft
Licenses: result.artifact.Licenses,
Relationship: art.Relationship,
Locations: art.Locations,
Test: art.Test,
}

// save only dependency names
Expand All @@ -244,6 +245,7 @@ func (p *Parser) parseRoot(root artifact, uniqModules map[string]struct{}) ([]ft
Licenses: art.Licenses,
Relationship: art.Relationship,
Locations: art.Locations,
Dev: art.Test,
}
pkgs = append(pkgs, pkg)

Expand Down Expand Up @@ -412,7 +414,7 @@ func (p *Parser) parseDependencies(deps []pomDependency, props map[string]string
// Resolve dependencies
d = d.Resolve(props, depManagement, rootDepManagement)

if (d.Scope != "" && d.Scope != "compile" && d.Scope != "runtime") || d.Optional {
if (d.Scope != "" && d.Scope != "compile" && d.Scope != "runtime" && d.Scope != "test") || d.Optional {
continue
}

Expand Down

0 comments on commit 4b29756

Please sign in to comment.