From 9998130ea3b13acedac565c50fe4bcedb0ccfeba Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Mon, 12 Jul 2021 16:34:13 +0100 Subject: [PATCH] Deprecation warning for Tomcat 7 --- tomcat/build.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tomcat/build.go b/tomcat/build.go index 97dfc4d..988b8a1 100644 --- a/tomcat/build.go +++ b/tomcat/build.go @@ -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" @@ -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)