bq
is an interactive tool to create and manage Bootique projects.
https://bootique.io/docs/2.x/bootique-tool-docs/
Follow documentation link above for instructions on how to get a platform-specific bq
binary. To build bq
from
source, do the following:
- Download and unpack GraalVM 8. (As of this writing builds don't yet work with GraalVM 11)
- If you are on MacOS, make sure GraalVM is allowed to run:
xattr -d com.apple.quarantine /path/to/graalvm-ce-java8-X.X.X/
- Checkout and build the repo:
git clone git@github.com:bootique/bootique-tool.git
cd bootique-tool
export JAVA_HOME=<GraalVM Home>
mvn package -Pnative-image
The binary is created at bootique-tool/target/bq
Windows build is a little trickier than other platforms.
Mainly this is because native-image
support is not perfect on Windows so there is a hope that this will improve over time.
There are different actions required for different versions of GraalVM.
For Java 8 you need to install Windows SDK 7.1, the easiest way to do this is via Chocolotey
:
choco install windows-sdk-7.1 kb2519277
From the cmd prompt, activate the sdk-7.1 environment:
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
Now you can start build as usual (note, that you should use same cmd prompt as for command above).
mvn package -Pnative-image -DskipTests
For Java 11 versions of GraalVM you should use newer dev tools:
choco install visualstudio2017-workload-vctools
And then call:
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
Build is the same:
mvn package -Pnative-image -DskipTests
Other problems with GraalVM on Windows:
- there could be a problem installing GraalVM not on a "C:" drive;
- staring from version 20.0.0 you should use
gu install native-image
to installnative-image
binary as it no longer bundled by default; - for GraalVM 20.0.0 and earlier for Java 11 you may need to compile
native-image
into a binary executable (this should be done from the command prompt with initialized dev tools environment, as withbq
tool build):cd %GRAALVM_HOME%\bin native-image.cmd -jar ..\lib\graalvm\svm-driver.jar