Skip to content

Commit

Permalink
Fix changes at Mvn handler
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Feb 13, 2024
1 parent 207f42f commit e5f0806
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
)

// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 dev
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240213075115-4bf1fe83505d

// replace github.com/jfrog/jfrog-cli-security => github.com/jfrog/jfrog-cli-security dev
replace github.com/jfrog/jfrog-cli-security => github.com/asafambar/jfrog-cli-security v0.0.0-20240213081326-a33920b8de90

// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go dev

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4x
github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/asafambar/jfrog-cli-security v0.0.0-20240213081326-a33920b8de90 h1:ZizYMmq6arZE2DsOq08qKAIY+9thjUOjnZje1lpaAoc=
github.com/asafambar/jfrog-cli-security v0.0.0-20240213081326-a33920b8de90/go.mod h1:ddjGjgQ0Z4ulP3i8FSla0WBpD1F41CsfuBe993X+gVM=
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M=
Expand Down Expand Up @@ -886,10 +888,8 @@ github.com/jfrog/gofrog v1.5.1 h1:2AXL8hHu1jJFMIoCqTp2OyRUfEqEp4nC7J8fwn6KtwE=
github.com/jfrog/gofrog v1.5.1/go.mod h1:SZ1EPJUruxrVGndOzHd+LTiwWYKMlHqhKD+eu+v5Hqg=
github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY=
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-core/v2 v2.47.12 h1:xsEVdzbdhNGkI8Ey4Othx5+zpgCMnT99Uy71LOn+Q7k=
github.com/jfrog/jfrog-cli-core/v2 v2.47.12/go.mod h1:RVn4pIkR5fPUnr8gFXt61ou3pCNrrDdRQUpcolP4lhw=
github.com/jfrog/jfrog-cli-security v1.0.1 h1:zSyqM+E4QP1GItVYO+JnOCRC/65yV+hWH5BmqOJ+sEE=
github.com/jfrog/jfrog-cli-security v1.0.1/go.mod h1:EH7WtHS6Lg3NCQ3wBcrQ2tjAN9O+4whEW48A20bYq0k=
github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240213075115-4bf1fe83505d h1:9efTE8NyZV6XtF9XoGq0g3XiEIYjCPdiHVEanxhhnlk=
github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20240213075115-4bf1fe83505d/go.mod h1:+eraSKhahQf7tj09+g3rAA2Z+XPnZGfMc0y8uUDecZw=
github.com/jfrog/jfrog-client-go v1.36.1 h1:22Ucy5XdEP1yHEjbN8zOt2dZys5rbwcwhC3l3pcOdf4=
github.com/jfrog/jfrog-client-go v1.36.1/go.mod h1:y1WF6eiZ7V2DortiwjpMEicEH6NIJH+hOXI5QI2W3NU=
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA=
Expand Down
7 changes: 4 additions & 3 deletions packagehandlers/mavenpackagehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ type pomDependencyDetails struct {

func NewMavenPackageHandler(scanDetails *utils.ScanDetails) *MavenPackageHandler {
depTreeParams := &java.DepTreeParams{
Server: scanDetails.ServerDetails,
DepsRepo: scanDetails.DepsRepo,
Server: scanDetails.ServerDetails,
DepsRepo: scanDetails.DepsRepo,
IsMavenDepTreeInstalled: true,
}
// The mvn-dep-tree plugin has already been installed during the audit dependency tree build phase,
// Therefore, we set the `isDepTreeInstalled` flag to true
mavenDepTreeManager := java.NewMavenDepTreeManager(depTreeParams, java.Projects, true)
mavenDepTreeManager := java.NewMavenDepTreeManager(depTreeParams, java.Projects)
return &MavenPackageHandler{MavenDepTreeManager: mavenDepTreeManager}
}

Expand Down
2 changes: 1 addition & 1 deletion packagehandlers/packagehandlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ func TestGetDependenciesFromDependencyManagement(t *testing.T) {
}

func TestGetProjectPoms(t *testing.T) {
mvnHandler := &MavenPackageHandler{MavenDepTreeManager: java.NewMavenDepTreeManager(&java.DepTreeParams{}, java.Projects, false)}
mvnHandler := &MavenPackageHandler{MavenDepTreeManager: java.NewMavenDepTreeManager(&java.DepTreeParams{IsMavenDepTreeInstalled: false}, java.Projects)}
currDir, err := os.Getwd()
assert.NoError(t, err)
tmpDir, err := os.MkdirTemp("", "")
Expand Down

0 comments on commit e5f0806

Please sign in to comment.