title: How to create native executable using quarkus?
body: <p>I've created a quarkus application using quarkus maven plugin.</p>
  
  <p>My maven pom is as follow</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
      xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com&lt;/groupId&gt;
      &lt;artifactId&gt;quarkus-poc&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;properties&gt;
          &lt;surefire-plugin.version&gt;2.22.0&lt;/surefire-plugin.version&gt;
          &lt;quarkus.version&gt;0.11.0&lt;/quarkus.version&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
                  &lt;artifactId&gt;quarkus-bom&lt;/artifactId&gt;
                  &lt;version&gt;${quarkus.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
              &lt;artifactId&gt;quarkus-resteasy&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
              &lt;artifactId&gt;resteasy-jackson-provider&lt;/artifactId&gt;
              &lt;version&gt;4.0.0.Beta5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
              &lt;artifactId&gt;quarkus-arc&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
              &lt;artifactId&gt;quarkus-junit5&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.rest-assured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
                  &lt;artifactId&gt;quarkus-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${quarkus.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;build&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${surefire-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;systemProperties&gt;
                          &lt;java.util.logging.manager&gt;org.jboss.logmanager.LogManager&lt;/java.util.logging.manager&gt;
                      &lt;/systemProperties&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;native&lt;/id&gt;
              &lt;activation&gt;
                  &lt;property&gt;
                      &lt;name&gt;native&lt;/name&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
                          &lt;artifactId&gt;quarkus-maven-plugin&lt;/artifactId&gt;
                          &lt;version&gt;${quarkus.version}&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;native-image&lt;/goal&gt;
                                  &lt;/goals&gt;
                                  &lt;configuration&gt;
                                      &lt;enableHttpUrlHandler&gt;true&lt;/enableHttpUrlHandler&gt;
                                  &lt;/configuration&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
                          &lt;version&gt;${surefire-plugin.version}&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;integration-test&lt;/goal&gt;
                                      &lt;goal&gt;verify&lt;/goal&gt;
                                  &lt;/goals&gt;
                                  &lt;configuration&gt;
                                      &lt;systemProperties&gt;
                                          &lt;native.image.path&gt;${project.build.directory}/${project.build.finalName}-runner&lt;/native.image.path&gt;
                                      &lt;/systemProperties&gt;
                                  &lt;/configuration&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>But when i try to create a native build using <code>mvn package -Pnative -Dnative-image.docker-build=true</code> I get the following error message, independently of the platform.</p>
  
  <pre><code>[INFO] --- quarkus-maven-plugin:0.11.0:native-image (default) @ quarkus-poc ---
  [INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] Running Quarkus native-image plugin on Java HotSpot(TM) 64-Bit Server VM
  [INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] docker run -v C:\Users\nicolas-delsaux\Documents\Adeo\inhabitant-referential--api-poc-challenge\quarkus\target:/project:z --rm swd847/centos-graal-native-image-rc12 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar quarkus-poc-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:+PrintAnalysisCallTree -H:EnableURLProtocols=http -H:-SpawnIsolates -H:-JNI -H:-UseServiceLoaderFeature -H:+StackTrace
  Error: No main manifest attribute, in /project/quarkus-poc-1.0-SNAPSHOT-runner.jar
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  27.308 s
  [INFO] Finished at: 2019-03-12T16:11:43+01:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.11.0:native-image (default) on project quarkus-poc: Failed to generate a native image: Failed to build native image: Image generation failed -&gt; [Help 1]
  </code></pre>
  
  <p>I do recognize that I have not created any kind of main class, since quarkus doesn't seems to need it. But how can i declare to the Java platform that I plan to let quarkus decide of the main class ?</p>
  
  <p><strong>EDIT</strong> In response to c. tweet, here are some more infos</p>
  
  <p>The <code>-runner.jar</code> content is</p>
  
  <pre><code>+---com
  |   \---company
  |       \---service
  |           \---domain
  |               \---poc
  |                       Customer.class
  |                       CustomerService.class
  |                       CustomerService_Bean.class
  |                       CustomersResource.class
  |                       CustomersResource_Bean.class
  |
  +---io
  |   \---quarkus
  |       +---arc
  |       |   |   ActivateRequestContextInterceptor_Bean.class
  |       |   |
  |       |   +---runtime
  |       |   |       LifecycleEventRunner_Bean.class
  |       |   |
  |       |   \---setup
  |       |           Default_ComponentsProvider.class
  |       |
  |       +---deployment
  |       |   \---steps
  |       |           ArcAnnotationProcessor$build4.class
  |       |           LifecycleEventsBuildStep$startupEvent9.class
  |       |           LoggingResourceProcessor$setupLoggingRuntimeInit1.class
  |       |           LoggingResourceProcessor$setupLoggingRuntimeInit2.class
  |       |           LoggingResourceProcessor$setupLoggingStaticInit1.class
  |       |           LoggingResourceProcessor$setupLoggingStaticInit2.class
  |       |           ResteasyScanningProcessor$setupInjection5.class
  |       |           ResteasyScanningProcessor$setupInjection6.class
  |       |           UndertowArcIntegrationBuildStep$integrateRequestContext5.class
  |       |           UndertowArcIntegrationBuildStep$integrateRequestContext6.class
  |       |           UndertowBuildStep$boot8.class
  |       |           UndertowBuildStep$build7.class
  |       |
  |       +---runner
  |       |       ApplicationImpl1.class
  |       |       AutoFeature.class
  |       |       GeneratedMain.class
  |       |
  |       \---runtime
  |           \---generated
  |                   ConfigHelper.class
  |                   ConfigHelperData.class
  |                   ConfigRoot.class
  |
  +---javax
  |   \---enterprise
  |       \---context
  |           \---control
  |                   ActivateRequestContext_Shared_AnnotationLiteral.class
  |
  \---META-INF
      |   MANIFEST.MF
      |   microprofile-config.properties
      |   quarkus-default-config.properties
      |
      +---maven
      |   \---com
      |       \---quarkus-poc
      |               pom.properties
      |               pom.xml
      |
      +---resources
      |       index.html
      |
      \---services
              io.quarkus.arc.ComponentsProvider
  </code></pre>
  
  <p>I'm quite sure some of you will ask for MANIFEST.MF content</p>
  
  <pre><code>Manifest-Version: 1.0
  Built-By: nicolas-delsaux
  Build-Jdk: 1.8.0_131
  Created-By: Maven Integration for Eclipse
  </code></pre>
  
  <p>I think that manifest file is quite strange ...</p>