title: Quarkus cant find third party clasess for Jandex index even with jandex plugin and an empty META-INF/beans.xml
body: <p>Victor from Chile.</p>
  
  <p>I have a quarkus application and I want to use quarkus-hibernate-orm for Oracle database, but my Entities classes are in a third party jar, so I just put the dependency in the pom (of entities classes) below of quarkus-hibernate-orm dependency and of course the other quarkus dependencies as well.</p>
  
  <p>I tried this:
  <a href="https://stackoverflow.com/questions/55513502/how-to-create-a-jandex-index-in-quarkus-for-classes-in-a-external-module">How to create a Jandex index in Quarkus for classes in a external module</a></p>
  
  <p>The jandex plugin and beans.xml solutions doesnt work for me (I dont tried the third options but seems to work for another people the first two options that already tried.)</p>
  
  <p>Testing with quarkus 0.20.0 and 0.19.1 and show me the same error.</p>
  
  <p>pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;cl.myproj&lt;/groupId&gt;
      &lt;artifactId&gt;reposirorio-myproj&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;quarkus.version&gt;0.19.1&lt;/quarkus.version&gt;
          &lt;surefire-plugin.version&gt;2.22.1&lt;/surefire-plugin.version&gt;
          &lt;compiler-plugin.version&gt;3.8.0&lt;/compiler-plugin.version&gt;
          &lt;docker-plugin.version&gt;0.28.0&lt;/docker-plugin.version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&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;scope&gt;import&lt;/scope&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;version&gt;${quarkus.version}&lt;/version&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-hibernate-orm&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
              &lt;artifactId&gt;quarkus-agroal&lt;/artifactId&gt;
          &lt;/dependency&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;io.quarkus&lt;/groupId&gt;
              &lt;artifactId&gt;quarkus-resteasy-jsonb&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- Testing: --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.quarkus&lt;/groupId&gt;
              &lt;artifactId&gt;quarkus-junit5&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&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;dependency&gt;
              &lt;groupId&gt;org.jboss.jandex&lt;/groupId&gt;
              &lt;artifactId&gt;jandex-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.0.6&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.oracle&lt;/groupId&gt;
              &lt;artifactId&gt;ojdbc7&lt;/artifactId&gt;
              &lt;version&gt;12.1.0.2.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;cl.entities&lt;/groupId&gt;
              &lt;artifactId&gt;libMyEntities&lt;/artifactId&gt;
              &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${compiler-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                      &lt;!-- the parameters=true option is critical so that RESTEasy works fine --&gt;
                      &lt;parameters&gt;true&lt;/parameters&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;!-- you need this specific version to integrate with the other build helpers --&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;plugin&gt;
                  &lt;!-- This is what injects the magic Quarkus bytecode --&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;groupId&gt;org.jboss.jandex&lt;/groupId&gt;
                  &lt;artifactId&gt;jandex-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.0.6&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;make-index&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jandex&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;!-- Optionally activate this profile to compile the demo into native! --&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;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&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;profile&gt;
              &lt;id&gt;eclipse&lt;/id&gt;
              &lt;activation&gt;
                  &lt;property&gt;
                      &lt;!-- This is a trick to have the profile automatically activated by Eclipse --&gt;
                      &lt;name&gt;m2e.version&lt;/name&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;pluginManagement&gt;
                      &lt;plugins&gt;
                          &lt;!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--&gt;
                          &lt;plugin&gt;
                              &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                              &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                              &lt;version&gt;1.0.0&lt;/version&gt;
                              &lt;configuration&gt;
                                  &lt;lifecycleMappingMetadata&gt;
                                      &lt;pluginExecutions&gt;
                                          &lt;pluginExecution&gt;
                                              &lt;pluginExecutionFilter&gt;
                                                  &lt;groupId&gt;io.fabric8&lt;/groupId&gt;
                                                  &lt;artifactId&gt;
                                                      docker-maven-plugin
                                                  &lt;/artifactId&gt;
                                                  &lt;versionRange&gt;
                                                      [0.28.0,)
                                                  &lt;/versionRange&gt;
                                                  &lt;goals&gt;
                                                      &lt;goal&gt;start&lt;/goal&gt;
                                                      &lt;goal&gt;stop&lt;/goal&gt;
                                                  &lt;/goals&gt;
                                              &lt;/pluginExecutionFilter&gt;
                                              &lt;action&gt;
                                                  &lt;ignore&gt;&lt;/ignore&gt;
                                              &lt;/action&gt;
                                          &lt;/pluginExecution&gt;
                                      &lt;/pluginExecutions&gt;
                                  &lt;/lifecycleMappingMetadata&gt;
                              &lt;/configuration&gt;
                          &lt;/plugin&gt;
                      &lt;/plugins&gt;
                  &lt;/pluginManagement&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>When a <code>make mvn clean install -DskipTests</code> (for skip tests) the console output says this:</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  5.440 s
  [INFO] Finished at: 2019-08-02T12:53:29-04:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.19.1:build (default) on project reposirorio-compromiso: Failed to build a runnable JAR: Failed to build a runner jar: Failed to augment application classes: Build failure: Build failed due to errors
  [ERROR]     [error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#build threw an exception: io.quarkus.deployment.configuration.ConfigurationError: Unable to properly register the hierarchy of the following JPA classes as they are not in the Jandex index:
  [ERROR]     - org.springframework.data.domain.Auditable
  [ERROR]     - org.springframework.data.domain.Persistable
  [ERROR] Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>I espected build succesfull.</p>
  
  <p>Thanks a lot.</p>