Skip to content

Commit

Permalink
Merge pull request #101 from pivotal-david-osullivan/tomcat-7-depreca…
Browse files Browse the repository at this point in the history
…tion

Deprecation warning for Tomcat 7
  • Loading branch information
Daniel Mikusa authored Jul 12, 2021
2 parents 0567a65 + 74d0289 commit 5cb4a18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tomcat/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"path/filepath"
"strings"

"github.com/heroku/color"

"github.com/buildpacks/libcnb"
"github.com/paketo-buildpacks/libjvm"
"github.com/paketo-buildpacks/libpak"
Expand Down Expand Up @@ -88,6 +90,10 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) {
return libcnb.BuildResult{}, fmt.Errorf("unable to find dependency\n%w", err)
}

if strings.HasPrefix(tomcatDep.Version, "7") {
dc.Logger.Headerf("%s Apache Tomcat version 7 is End-of-Life, this is the last release that will contain version 7", color.YellowString("WARNING: "))
}

home, be := NewHome(tomcatDep, dc)
home.Logger = b.Logger
result.Layers = append(result.Layers, home)
Expand Down

0 comments on commit 5cb4a18

Please sign in to comment.