quarkus-extensions should include its jandex index
See original GitHub issueDescribe the bug I start a quarkus-app with quarkus-extensions. It compiles and works, but I get this warning message:
[WARNING] [io.quarkus.deployment.steps.ReflectiveHierarchyStep]
Unable to properly register the hierarchy of the following classes
for reflection as they are not in the Jandex index:
- com.github.benmanes.caffeine.cache.Cache
- com.github.benmanes.caffeine.cache.Policy$Eviction
- io.reactivex.Scheduler
- io.reactivex.functions.Predicate
- io.reactivex.internal.fuseable.SimplePlainQueue
- javax.crypto.Cipher
- javax.crypto.KeyAgreement
- javax.crypto.SecretKey
- javax.enterprise.context.spi.Contextual
- javax.enterprise.context.spi.CreationalContext
- javax.enterprise.event.Event
- javax.management.MBeanAttributeInfo
- javax.management.MBeanInfo
- javax.management.MBeanOperationInfo
- javax.management.MBeanServer
- javax.management.ObjectName
- javax.naming.directory.DirContext
- javax.net.ssl.SSLContext
- javax.net.ssl.SSLServerSocket
- javax.persistence.EntityManager
- javax.security.auth.Subject
- javax.security.auth.callback.CallbackHandler
- javax.security.sasl.SaslClient
- javax.security.sasl.SaslClientFactory
- javax.security.sasl.SaslServer
- javax.security.sasl.SaslServerFactory
- javax.sql.DataSource
- javax.swing.JButton
- javax.swing.JFrame
- javax.swing.JLabel
- javax.swing.JPanel
- javax.swing.JTabbedPane
- javax.swing.JTable
- javax.swing.JTextArea
- javax.swing.JTextField
- javax.swing.table.AbstractTableModel
- javax.transaction.RollbackException
- javax.transaction.Synchronization
- javax.transaction.Transaction
- javax.transaction.TransactionManager
- javax.transaction.TransactionSynchronizationRegistry
- javax.transaction.UserTransaction
- javax.transaction.xa.XAResource
- javax.transaction.xa.Xid
- javax.ws.rs.client.Client
- javax.xml.namespace.QName
- org.apache.logging.log4j.Logger
- org.eclipse.microprofile.metrics.ConcurrentGauge
- org.eclipse.microprofile.metrics.Counter
- org.eclipse.microprofile.metrics.Gauge
- org.eclipse.microprofile.metrics.Histogram
- org.eclipse.microprofile.metrics.Metadata
- org.eclipse.microprofile.metrics.Meter
- org.eclipse.microprofile.metrics.Metered
- org.eclipse.microprofile.metrics.Metric
- org.eclipse.microprofile.metrics.MetricID
- org.eclipse.microprofile.metrics.MetricRegistry
- org.eclipse.microprofile.metrics.MetricType
- org.eclipse.microprofile.metrics.Snapshot
- org.eclipse.microprofile.metrics.Timer
- org.eclipse.microprofile.metrics.Timer$Context
- org.hibernate.Session
- org.infinispan.protostream.BaseMarshaller
- org.infinispan.protostream.FileDescriptorSource
- org.infinispan.protostream.ImmutableSerializationContext
- org.infinispan.protostream.SerializationContext
- org.infinispan.protostream.SerializationContextInitializer
- org.jboss.logging.DelegatingBasicLogger
- org.jboss.logging.Logger
- org.reactivestreams.Publisher
- org.reactivestreams.Subscriber
- org.slf4j.Logger
- org.w3c.dom.Node
As you can see, I guess, the listed classes came all from quarkus-extensions or any 3rd party lib defined in pom.xml
. Actually, 3rd party libs must be registered manually by application.properties
, e.g.:
quarkus.index-dependency.otherlib.group-id = otherlib
quarkus.index-dependency.otherlib.artifact-id = otherlib-impl
I must do this for each included library, because currently, quarkus automatically indexes only the main module but not the 3rd party libraries. Even with the definition in application.properties
, it could be possible that 3rd party libs need a META-INF/jandex.idx
to be resolvable by quarkus. How should I do that?
For example, even if I include a dependency in my application by pom.xml
and registering this dependency in application.properties
:
quarkus.index-dependency.{otherlib}.group-id = ..
quarkus.index-dependency.{otherlib}.artifact-id = ..
few dependencies are still present in the list of Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:..
I dont know why, because I already registered it within application.properties
.
Quarkus should also index all the dependencies defined in the lib-folder automatically on compile, without declaring it manually in application.properties
. Why not generating a master-jandex.idx
within my application on compile by scanning all dependencies and my application. With this, user does not need to include and struggle with jandex-maven-plugin
, beans.xml
or application.properties
only to register these dependencies.
To Reproduce Steps to reproduce the behavior:
- compile quarkus app with some extensions or 3rd party lib.
Environment (please complete the following information):
- Output of
java -version
: JDK12 - Quarkus version or git rev: 1.0 FINAL
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
It’s magic, because everyone knows that #5871=#6477
@geoand How can https://github.com/quarkusio/quarkus/issues/5871 be a duplicate of https://github.com/quarkusio/quarkus/issues/5871 ?