question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build native image source jar

See original GitHub issue

Description I would like the ability for Quarkus to produce a native image source jar without also running a native-image build. The scenario in mind is the following, with two machines:

  1. Maven builder machine with all needed dependencies, but no GraalVM/Mandrel.
  2. Container builder machine using a Mandrel builder image, but no Maven or dependencies. It has access to the output from the first machine.

I cannot find a way to perform a Maven build with Quarkus, such that the output jar can be passed to native-image and produce a working executable. When I give native-image the standard runner jar, or uber-jar, the executable exits immediately with exit code 1.

Implementation ideas This functionality could perhaps be added as a package type selection for the quarkus.package.type property.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jerboaacommented, Feb 22, 2021

Thanks!

2reactions
geoandcommented, Feb 22, 2021

Understood.

I’ll create a draft PR later on with a new package type as requested and we can discuss further based on that

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started - GraalVM
The native-image tool takes Java bytecode as its input. You can build a native executable from a class file, from a JAR file,...
Read more >
Building a Native Executable - Quarkus
You can run the application in a container using the JAR produced by the Quarkus Maven Plugin. However, in this section we focus...
Read more >
Native Image - Oracle Help Center
To build a native image as a shared library of a JAR file, use: ... threads from C code, as well as declarations...
Read more >
GraalVM Native Image Support - Spring
Generated source files can be found in target/spring-aot/main/sources when using Maven and build/generated/aotSources with Gradle. 1.2.2. Hint ...
Read more >
GraalVM Native Image Quick Reference v1 - Medium
Native Image allows compiling your applications to binaries, typically, the executable ones, but you can also create shared libraries. The ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found