Skip to content

Commit

Permalink
Merge pull request #500 from PG2000/main
Browse files Browse the repository at this point in the history
feat: add support for multiple war files
  • Loading branch information
dmikusa authored Nov 8, 2024
2 parents 5515f33 + 98fa652 commit 6b0246f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tomcat/detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error
file := filepath.Join(context.Application.Path, "WEB-INF")
if _, err := os.Stat(file); err != nil && !os.IsNotExist(err) {
return libcnb.DetectResult{}, fmt.Errorf("unable to stat file %s\n%w", file, err)
} else if os.IsNotExist(err) {
} else if os.IsNotExist(err) && !warFilesExist {
d.Logger.Info("PASSED: a WEB-INF directory was not found, this is normal when building from source")
return result, nil
}
Expand Down
1 change: 1 addition & 0 deletions tomcat/detect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ func testDetect(t *testing.T, context spec.G, it spec.S) {
Provides: []libcnb.BuildPlanProvide{
{Name: "jvm-application"},
{Name: "java-app-server"},
{Name: "jvm-application-package"},
},
Requires: []libcnb.BuildPlanRequire{
{Name: "syft"},
Expand Down

0 comments on commit 6b0246f

Please sign in to comment.