Skip to content

Commit 9b73169

Browse files
authored
Package the JDK into jdk.app on macOS (#48765)
This commit packages the bundled JDK into jdk.app on macOS to assist with notarization there.
1 parent c38079d commit 9b73169

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

distribution/archives/build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ CopySpec archiveFiles(CopySpec modulesFiles, String distributionType, String pla
5959
with binFiles(distributionType, oss, jdk)
6060
}
6161
if (jdk) {
62-
into('jdk') {
63-
with jdkFiles(project, platform)
62+
if ("darwin".equals(platform)) {
63+
into('jdk.app') {
64+
with jdkFiles(project, platform)
65+
}
66+
} else {
67+
into('jdk') {
68+
with jdkFiles(project, platform)
69+
}
6470
}
6571
}
6672
into('') {

distribution/src/bin/elasticsearch-env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ if [ ! -z "$JAVA_HOME" ]; then
4141
JAVA_TYPE="JAVA_HOME"
4242
else
4343
if [ "$(uname -s)" = "Darwin" ]; then
44-
# OSX has a different structure
45-
JAVA="$ES_HOME/jdk/Contents/Home/bin/java"
44+
# macOS has a different structure
45+
JAVA="$ES_HOME/jdk.app/Contents/Home/bin/java"
4646
else
4747
JAVA="$ES_HOME/jdk/bin/java"
4848
fi

0 commit comments

Comments
 (0)