简体   繁体   中英

How to set up different graalvm-home and java-home in CI server to build native image

Issue: I want has two graalvm version in same CI server to build different quarkus version service project.

resason: Because a few old service use quarkus-1.5.1 & graalvm-20.0.0 and I can't upgrade that version. but I want use quarkus-1.13.1 & graalvm-21.0.0 in new service.

tried: add quarkus.native.graalvm-home & quarkus.native.java-home in the pom.xml, setting graalvm path, but not working.

        <properties>
            <quarkus.package.type>native</quarkus.package.type>
            <quarkus.native.additional-build-args>${qaurkusNativeArgs}</quarkus.native.additional-build-args>
            <quarkus.native.graalvm-home>${quarkus.native.java-home}</quarkus.native.graalvm-home>
            <quarkus.native.java-home>${quarkus.native.java-home}</quarkus.native.java-home>
        </properties>

All you need to do is set the GRAALVM_HOME environment variable when you run mvn package -Dnative .

So something like GRAALVM_HOME=/some/path mvn package -Dnative will make Quarkus use GraalVM from /some/path .

See https://quarkus.io/guides/all-config#quarkus-core_quarkus.native.graalvm-home

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM