我需要在 Proguard 中为 运行 ObjectDB 保留什么?
What do I need to keep in Proguard to run ObjectDB?
我正在使用 Proguard to minimize the size of my shaded/uber Jar. This was working great until I included a dependency on ObjectDB。我需要保留什么才能使 ObjectDB 工作?
我在调用 Persistence.createEntityManagerFactory()
时得到以下输出。
javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver log
WARNING: javax.persistence.spi::No valid providers found using:
javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver log
WARNING: javax.persistence.spi::com.objectdb.jpa.Provider - jar:file:/C:/Documents/JProjects/TimeClock/target/TimeClock-1.5.0.jar!/META-INF/services/javax.persistence.spi.PersistenceProvider
javax.persistence.PersistenceException: No Persistence provider for EntityManager named db.odb
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:85)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
使用以下 Proguard 选项:
-keep class com.objectdb.jpa.Provider {<fields>; <methods>;}
我正在使用 Proguard to minimize the size of my shaded/uber Jar. This was working great until I included a dependency on ObjectDB。我需要保留什么才能使 ObjectDB 工作?
我在调用 Persistence.createEntityManagerFactory()
时得到以下输出。
javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver log
WARNING: javax.persistence.spi::No valid providers found using:
javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver log
WARNING: javax.persistence.spi::com.objectdb.jpa.Provider - jar:file:/C:/Documents/JProjects/TimeClock/target/TimeClock-1.5.0.jar!/META-INF/services/javax.persistence.spi.PersistenceProvider
javax.persistence.PersistenceException: No Persistence provider for EntityManager named db.odb
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:85)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
使用以下 Proguard 选项:
-keep class com.objectdb.jpa.Provider {<fields>; <methods>;}