Documentation ¶
Index ¶
- Constants
- Variables
- func IsBeforeJava18(candidate string) bool
- func IsBeforeJava9(candidate string) bool
- func IsBuildContribution(metadata map[string]interface{}) bool
- func IsLaunchContribution(metadata map[string]interface{}) bool
- func NewManifest(applicationPath string) (*properties.Properties, error)
- func NewManifestFromJAR(jarFilePath string) (*properties.Properties, error)
- type Build
- type BuildOption
- type CertificateLoader
- type Detect
- type DistributionType
- type JDK
- type JLink
- type JRE
- type JVMVersion
- type JavaSecurityProperties
- type MavenJAR
- type NIK
- type NativeImage
- type SDKInfo
Constants ¶
View Source
const ( PlanEntryNativeImageBuilder = "native-image-builder" PlanEntryJRE = "jre" PlanEntryJDK = "jdk" )
View Source
const DefaultCertFile = "/etc/ssl/certs/ca-certificates.crt"
Variables ¶
View Source
var Java18, _ = semver.NewVersion("18")
View Source
var Java9, _ = semver.NewVersion("9")
Functions ¶
func IsBeforeJava18 ¶
func IsBeforeJava9 ¶
func IsBuildContribution ¶
func IsLaunchContribution ¶
func NewManifest ¶
func NewManifest(applicationPath string) (*properties.Properties, error)
NewManifest reads the <APP>/META-INF/MANIFEST.MF file if it exists, normalizing it into the standard properties form.
func NewManifestFromJAR ¶
func NewManifestFromJAR(jarFilePath string) (*properties.Properties, error)
NewManifestFromJAR reads the META-INF/MANIFEST.MF from a JAR file if it exists, normalizing it into the standard properties form.
Types ¶
type Build ¶
type Build struct { Logger bard.Logger Result libcnb.BuildResult CertLoader CertificateLoader DependencyCache libpak.DependencyCache Native NativeImage CustomHelpers []string }
func (Build) Build ¶
func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error)
type BuildOption ¶
func WithCustomHelpers ¶
func WithCustomHelpers(customHelpers []string) BuildOption
func WithNativeImage ¶
func WithNativeImage(nativeImage NativeImage) BuildOption
type CertificateLoader ¶
func NewCertificateLoader ¶
func NewCertificateLoader() CertificateLoader
func (*CertificateLoader) Load ¶
func (c *CertificateLoader) Load(path string, password string) error
func (*CertificateLoader) Metadata ¶
func (c *CertificateLoader) Metadata() (map[string]interface{}, error)
type Detect ¶
type Detect struct{}
func (Detect) Detect ¶
func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error)
type DistributionType ¶
type DistributionType uint8
const ( JDKType DistributionType = iota JREType )
func (DistributionType) String ¶
func (d DistributionType) String() string
type JDK ¶
type JDK struct { CertificateLoader CertificateLoader LayerContributor libpak.DependencyLayerContributor Logger bard.Logger }
func NewJDK ¶
func NewJDK(dependency libpak.BuildpackDependency, cache libpak.DependencyCache, certificateLoader CertificateLoader) (JDK, libcnb.BOMEntry, error)
type JLink ¶
type JLink struct { LayerContributor libpak.LayerContributor Logger bard.Logger ApplicationPath string Executor effect.Executor CertificateLoader CertificateLoader Metadata map[string]interface{} JavaVersion string Args []string UserConfigured bool }
type JRE ¶
type JRE struct { ApplicationPath string CertificateLoader CertificateLoader DistributionType DistributionType LayerContributor libpak.DependencyLayerContributor Logger bard.Logger Metadata map[string]interface{} }
func NewJRE ¶
func NewJRE(applicationPath string, dependency libpak.BuildpackDependency, cache libpak.DependencyCache, distributionType DistributionType, certificateLoader CertificateLoader, metadata map[string]interface{}) (JRE, libcnb.BOMEntry, error)
type JVMVersion ¶
func NewJVMVersion ¶
func NewJVMVersion(logger bard.Logger) JVMVersion
func (JVMVersion) GetJVMVersion ¶
func (j JVMVersion) GetJVMVersion(appPath string, cr libpak.ConfigurationResolver) (string, error)
type JavaSecurityProperties ¶
type JavaSecurityProperties struct { LayerContributor libpak.LayerContributor Logger bard.Logger }
func NewJavaSecurityProperties ¶
func NewJavaSecurityProperties(info libcnb.BuildpackInfo) JavaSecurityProperties
func (JavaSecurityProperties) Contribute ¶
func (JavaSecurityProperties) Name ¶
func (j JavaSecurityProperties) Name() string
type MavenJAR ¶
type MavenJAR struct { // Name is the name of the JAR, without the version or extension. Name string `toml:"name"` // Version is the version of the JAR, without the name or extension. Version string `toml:"version"` // SHA256 is the SHA256 hash of the JAR. SHA256 string `toml:"sha256"` }
MavenJAR is metadata about a JRE entry that follows Maven naming conventions.
func NewMavenJARListing ¶
NewMavenJARListing generates a listing of all JAR that follow Maven naming convention under the roots.
type NIK ¶
type NIK struct { CertificateLoader CertificateLoader DependencyCache libpak.DependencyCache Executor effect.Executor JDKDependency libpak.BuildpackDependency LayerContributor libpak.LayerContributor Logger bard.Logger NativeDependency *libpak.BuildpackDependency CustomCommand string CustomArgs []string }
func NewNIK ¶
func NewNIK(jdkDependency libpak.BuildpackDependency, nativeDependency *libpak.BuildpackDependency, cache libpak.DependencyCache, certificateLoader CertificateLoader, customCommand string, customArgs []string) (NIK, []libcnb.BOMEntry, error)
type NativeImage ¶
type SDKInfo ¶
SDKInfo represents the information from each line in the `.sdkmanrc` file
func ReadSDKMANRC ¶
ReadSDKMANRC reads the `.sdkmanrc` format file from path and retuns the list of SDKS in it
Source Files ¶
Click to show internal directories.
Click to hide internal directories.