问题描述
我正在构建一个桌面应用程序(使用Maven OpenJDK11)。我正在使用具有以下配置的ProGuard:
@proguard_jmods.cfg
#-dontshrink
-dontoptimize
#-dontobfuscate
-optimizations !class/unBoxing/enum
-repackageclasses ''
-renamesourcefileattribute SourceFile
-keepattributes *Annotation*,Signature,Annotation,InnerClasses,EnclosingMethod,SourceFile,LineNumberTable
-adaptresourcefilenames
-dontnote
-dontwarn com.ctc.wstx.**,com.github.**,com.jolBox.bonecp.**,com.mchange.v2.**,com.sun.istack.**,com.sun.tools.**,com.healthmarketscience.**,org.codehaus.**,org.iq80.snappy.**,com.sun.xml.**,com.thoughtworks.xstream.**,de.l3s.boilerpipe.**,javax.activation.**,javax.transaction.**,net.sf.ehcache.**,opennlp.tools.util.**,org.apache.cxf.**,org.apache.log4j.**,org.apache.poi.**,org.apache.sis.**,org.apache.**,org.dom4j.**,org.codehaus.plexus.**,javax.enterprise.**,org.glassfish.**,org.jdesktop.**,org.quartz.**,com.sun.org.**,javax.imageio.Metadata.**,javax.xml.**,javax.jws.**,org.w3c.dom.**,org.xml.sax.**,au.com.bytecode.**,com.fasterxml.jackson.**,com.google.common.**,com.google.gson.**,com.googlecode.mp4parser.**,com.itextpdf.**,com.mchange.v1.**,com.microsoft.schemas.**,com.strobel.assembler.**,com.strobel.compilerservices.**,examples.RCallerScriptEngineExample1.**,examples.RCallerScriptEngineExample2.**,examples.RCallerScriptEngineExample3.**,javassist.util.HotSwapAgent.**,javassist.util.HotSwapper.**,javax.rmi.CORBA.**,javax.rmi.PortableRemoteObject.**,org.bouncycastle.**,org.cyberneko.**,org.eclipse.jetty.**,org.etsi.uri.**,org.jboss.com.**,org.jdom2.**,org.jfree.**,org.joda.time.**,org.terracotta.quartz.**,ucar.nc2.grib.**,com.jmatio.io.**,javax.script.**,com.sun.**,java.rmi.**,opennlp.tools.sentiment.**,java.lang.**,java.util.**,sun.misc.Unsafe.**,sun.**,org.w3.**,net.sf.ehcache.distribution.**,org.apache.http.**,org.apache.any23.**,com.graphbuilder.curve.**,com.strobel.decompiler.**,com.uwyn.jhighlight.**,rg.codehaus.stax2.**,org.openxmlformats.schemas.**,org.springframework.**,org.slf4j.**,com.MysqL.**,org.pushingpixels.**,org.hibernate.**,org.jboss.**,net.bytebuddy.**,javax.persistence.**,org.eclipse.**,java.awt.datatransfer.**,java.sql.**,org.objectweb.**,org.apache.any23.**
-ignorewarnings
-verbose
-printseeds seed
# Keep - Applications. Keep all application classes,along with their 'main' methods.
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
-keep interface *
-keepnames class ** implements com.xxx.xx.utils.ISerialisable
-keepclassmembers class ** implements com.xxx.xx.utils.ISerialisable {
<fields>;
}
-keep class com.xxx.x.services.** {
<fields>;
<methods>;
}
-keep class com.xxx.x.exe.** {
<fields>;
<methods>;
}
-keep public class com.xxx.x.utils.** {
<fields>;
<methods>;
}
-keep public class com.xxx.x.nalpeiron.** {
<fields>;
<methods>;
}
-keep,allowshrinking class ** extends com.xxx.x.utils.ISerialisable
# Keep - Applications. Keep all application classes,along with their 'main' methods.
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
以“ Maven安装”运行方式时,出现以下异常:
[proguard] Preverifying...
[proguard] Unexpected error while performing partial evaluation:
[proguard] Class = [org/apache/poi/hpbf/extractor/PublisherTextExtractor]
[proguard] Method = [main([Ljava/lang/String;)V]
[proguard] Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [org/apache/poi/hpbf/extractor/PublisherTextExtractor] (with 1 kNown super classes) and [java/lang/Throwable] (with 2 kNown super classes))
[proguard] Unexpected error while preverifying:
[proguard] Class = [org/apache/poi/hpbf/extractor/PublisherTextExtractor]
[proguard] Method = [main([Ljava/lang/String;)V]
[proguard] Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [org/apache/poi/hpbf/extractor/PublisherTextExtractor] (with 1 kNown super classes) and [java/lang/Throwable] (with 2 kNown super classes))
[proguard] java.lang.IllegalArgumentException: Can't find common super class of [org/apache/poi/hpbf/extractor/PublisherTextExtractor] (with 1 kNown super classes) and [java/lang/Throwable] (with 2 kNown super classes)
我尝试将org / apache / poi / hpbf / extractor / PublisherTextExtractor添加到配置中,但是没有用。
有什么想法请解决这个问题吗?谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)