diff --git a/native/build.go b/native/build.go index a4d6c1d..f710a17 100644 --- a/native/build.go +++ b/native/build.go @@ -45,16 +45,11 @@ func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error) { return libcnb.BuildResult{}, fmt.Errorf("unable to read manifest in %s\n%w", context.Application.Path, err) } - _, ok := manifest.Get("Spring-Boot-Version") - if !ok { - return libcnb.BuildResult{}, nil - } - cr, err := libpak.NewConfigurationResolver(context.Buildpack, &b.Logger) if err != nil { return libcnb.BuildResult{}, fmt.Errorf("unable to create configuration resolver\n%w", err) } - if _, ok = cr.Resolve(DeprecatedConfigNativeImage); ok { + if _, ok := cr.Resolve(DeprecatedConfigNativeImage); ok { b.warn(fmt.Sprintf("$%s has been deprecated. Please use $%s instead.", DeprecatedConfigNativeImage, ConfigNativeImage, diff --git a/native/native_image.go b/native/native_image.go index 9994e76..fbbcd40 100644 --- a/native/native_image.go +++ b/native/native_image.go @@ -22,7 +22,6 @@ import ( "io/ioutil" "os" "path/filepath" - "regexp" "strings" "github.com/buildpacks/libcnb" @@ -164,16 +163,3 @@ func (n NativeImage) Contribute(layer libcnb.Layer) (libcnb.Layer, error) { func (NativeImage) Name() string { return "native-image" } - -func (NativeImage) hasSpringNative(libs []string) bool { - // matches either spring-native or legacy spring-graalvm-native - re := regexp.MustCompile(`spring-(?:graalvm-|)native-.+\.jar`) - - for _, l := range libs { - if re.MatchString(l) { - return true - } - } - - return false -}