Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bf78755
HIVE-29756: Beeline native installer added, native images compatibili…
illiabarbashov-sketch Jul 28, 2026
df5a3f8
HIVE-29666: pom xml formatted
illiabarbashov-sketch Jul 28, 2026
16c97b7
HIVE-29666: windows github runner fixed
illiabarbashov-sketch Jul 29, 2026
c62a4d8
HIVE-29666: windows github runner fixed
illiabarbashov-sketch Jul 29, 2026
a47d3a8
HIVE-29666: windows github runner fixed
illiabarbashov-sketch Jul 29, 2026
8697de5
HIVE-29666: macos 13 runner timeout added
illiabarbashov-sketch Jul 30, 2026
6eb1f76
HIVE-29666: windows jpackage flag for console app
illiabarbashov-sketch Aug 3, 2026
9b3b3ba
Merge branch 'apache:master' into HIVE-29666_beeline_native
illiabarbashov-sketch Aug 3, 2026
8eaaad5
HIVE-29666: msi installer added
illiabarbashov-sketch Aug 3, 2026
a8e9e3f
Merge branch 'HIVE-29666_beeline_native' of github.com:illiabarbashov…
illiabarbashov-sketch Aug 3, 2026
9b83954
HIVE-29666: msi installer added
illiabarbashov-sketch Aug 3, 2026
e0c1025
HIVE-29666: windows installer improvements
illiabarbashov-sketch Aug 4, 2026
e4d4dd2
HIVE-29666: windows installer improvements
illiabarbashov-sketch Aug 4, 2026
bba5606
HIVE-29666: windows installer improvements
illiabarbashov-sketch Aug 4, 2026
b54944c
HIVE-29666: address comments
illiabarbashov-sketch Aug 7, 2026
0c0db4a
HIVE-29666: address comments
illiabarbashov-sketch Aug 7, 2026
076d2be
HIVE-29666: address comments
illiabarbashov-sketch Aug 7, 2026
1a42fca
HIVE-29666: address comments
illiabarbashov-sketch Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/beeline-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Beeline Native Installer Release

on:
workflow_dispatch:
inputs:
release_tag:
description: 'GitHub release tag to upload artifacts to. Leave empty to skip release upload.'
required: false
default: ''
type: string

permissions:
contents: write

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-13
label: macos-x64
artifact_glob: beeline/target/installer/x64/*.dmg
- os: macos-latest
label: macos-arm64
artifact_glob: beeline/target/installer/arm64/*.dmg
- os: ubuntu-latest
label: linux-x64
artifact_glob: beeline/target/installer/x64/*.deb
- os: windows-latest
label: windows-x64
artifact_glob: beeline/target/installer/x64/*.msi

runs-on: ${{ matrix.os }}
# Bounds total job time (queue + execution). Notably guards against macos-13
# runner-pool starvation as GitHub drains its capacity ahead of deprecation.
timeout-minutes: 60
steps:
- uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: temurin
cache: maven

- name: Disable WSL bash stub so Git Bash wins (Windows only)
if: runner.os == 'Windows'
shell: pwsh
run: |
$stub = "C:\Windows\System32\bash.exe"
if (Test-Path $stub) {
Write-Host "Taking ownership of $stub"
takeown.exe /F $stub /A | Out-Null
icacls.exe $stub /grant "*S-1-5-32-544:F" | Out-Null # Administrators group SID
Rename-Item -Path $stub -NewName "bash.exe.disabled" -Force
}
"C:\Program Files\Git\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Write-Host "bash now resolves to:"
where.exe bash
bash --version

- name: Build Beeline installer
run: mvn package -pl beeline -am -DskipTests -P native-installer

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we reuse the existing -Pdist profile here?

@illiabarbashov-sketch illiabarbashov-sketch Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we would need this? I mean, if we just rename native-isntaller to dist profile for beeline, wouldn't it triggered the jpackage native app on every nightly build? I thought it was something to avoid. Current hive building command, to what I know, is mvn install -Dtest=noMatches -Pdist -pl packaging -am Beeline currently doesn't have dist profile so it's just get built with the install command. If we change native-installer profile to dist the earlier hive build command will propagate the dist profile to beeline and jpackage will get activated. And we should be sure that Jenkins agent is able to run that. Also this will extend the time for nightly build.


- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: beeline-${{ matrix.label }}
path: ${{ matrix.artifact_glob }}
if-no-files-found: error

- name: Upload installer to GitHub release
if: ${{ inputs.release_tag != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.release_tag }}
files: ${{ matrix.artifact_glob }}
allow_updates: true
fail_on_unmatched_files: true
116 changes: 111 additions & 5 deletions beeline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<name>Hive Beeline</name>
<properties>
<hive.path.to.root>..</hive.path.to.root>
<jpackage.plugin.version>4.3.0</jpackage.plugin.version>
</properties>
<dependencies>
<!-- dependencies are always listed in sorted order by groupId, artifactId -->
Expand Down Expand Up @@ -68,10 +69,10 @@
</dependency>
<dependency>
<!--
Since the compile-time hive-jdbc dependency contains Utils.java,
which directly imports HiveSQLException from hive-service,
hive-service is also required at runtime and should therefore be declared as a compile-time dependency.
-->
Since the compile-time hive-jdbc dependency contains Utils.java,
which directly imports HiveSQLException from hive-service,
hive-service is also required at runtime and should therefore be declared as a compile-time dependency.
-->
<groupId>org.apache.hive</groupId>
<artifactId>hive-service</artifactId>
<version>${project.version}</version>
Expand Down Expand Up @@ -147,7 +148,7 @@
<!--
hive-exec, hive-llap-server, and hive-hplsql are declared test scope here so that
are all needed to run BeelineCli test to manage the embedded HS2 session.
-->
-->
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
Expand Down Expand Up @@ -242,6 +243,111 @@
</dependency>
</dependencies>
<profiles>
<!--
Build a native installer (dmg on macOS, exe/msi on Windows, deb/rpm on Linux).

Usage:
mvn package -pl beeline -am -DskipTests -P native-installer

Output (arch sub-directory so x64 and arm64 artifacts coexist):
beeline/target/installer/x64/beeline-4.3.0.dmg (Intel Mac)

@deniskuzZ deniskuzZ Aug 7, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe /target/apache-hive-beeline-X.Y.Z/x64/beeline-4.3.0.dmg ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

beeline/target/installer/arm64/beeline-4.3.0.dmg (Apple Silicon — macos-arm64 auto-activates)
beeline/target/installer/x64/beeline-4.3.0.exe (Windows)
beeline/target/installer/x64/beeline_4.3.0_amd64.deb (Linux)
-->
<profile>
<id>native-installer</id>
<properties>
<!-- jpackage requires version as 1-3 integers separated by dots -->
<installer.app.version>${jpackage.plugin.version}</installer.app.version>
<!-- Default architecture label; overridden to arm64 by the macos-arm64 profile -->
<installer.arch>x64</installer.arch>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>jpackage</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/installer/${installer.arch}"/>
<exec executable="jpackage" failonerror="true">
<!-- Application identity -->
<arg value="--name"/>
<arg value="beeline"/>
<arg value="--app-version"/>
<arg value="${installer.app.version}"/>
<arg value="--vendor"/>
<arg value="Apache Software Foundation"/>
<arg value="--description"/>
<arg value="Apache Hive Beeline SQL client"/>
<!-- Input: the self-contained fat jar -->
<arg value="--input"/>
<arg value="${project.build.directory}"/>
<arg value="--main-jar"/>
<arg value="beeline-standalone.jar"/>
<arg value="--main-class"/>
<arg value="org.apache.hive.beeline.BeeLine"/>
<!-- Output: arch-specific subdirectory so x64 and arm64 coexist -->
<arg value="--dest"/>
<arg value="${project.build.directory}/installer/${installer.arch}"/>
<arg line="${jpackage.platform.args}"/>
<!--
jpackage picks the native format automatically:
macOS → dmg (x64 on Intel, arm64 on Apple Silicon)
Windows → exe
Linux → deb
To force a specific type, add:
<arg value="- -type"/> <arg value="pkg"/>
-->
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
Auto-detects Apple Silicon and sets installer.arch=arm64.
Declared AFTER native-installer so its property value wins over the x64
default when both profiles are active simultaneously on Apple Silicon.
No -P flag needed — activates automatically via os.name=Mac OS X + os.arch=aarch64.
-->
<profile>
<id>macos-arm64-installer</id>
<activation>
<os>
<name>Mac OS X</name>
<arch>aarch64</arch>
</os>
</activation>
<properties>
<installer.arch>arm64</installer.arch>
</properties>
</profile>
<!--
Auto-activates on Windows.
-->
<profile>
<id>windows-installer</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<jpackage.platform.args>--win-console --type msi --win-dir-chooser --win-menu --win-menu-group "Apache Hive" --win-shortcut-prompt --win-help-url https://hive.apache.org/ --license-file ${project.basedir}/../LICENSE --resource-dir ${project.basedir}/src/main/jpackage/windows</jpackage.platform.args>
</properties>
</profile>
<profile>
<id>sources</id>
<build>
Expand Down
Loading
Loading