kwart / totp-me

TOTP authenticator for Java ME enabled devices. It's an implementation of the RFC 6238 - TOTP: Time-Based One-Time Password Algorithm.
Apache License 2.0
32 stars 12 forks source link

Building fails #30

Open AiyionPrime opened 1 year ago

AiyionPrime commented 1 year ago

Building the MIDP-2.0 variant works like a charm.

Trying to build MIDP-1.0 not so much. I'm not building Java regularly, so maybe I just miss something obvious:

$ mvn clean package -Dwtk.home=/opt/sun-wtk
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< org.jboss.totp:totp-me >-----------------------
[INFO] Building TOTP ME 1.9
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ totp-me ---
[INFO] Deleting /home/aiyion/Documents/com/github/kwart/totp-me/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:copy-resources (copy-resources) @ totp-me ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ totp-me ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to /home/aiyion/Documents/com/github/kwart/totp-me/target/classes
[INFO] Copying 1 resource to ../filtered-src
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ totp-me ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/aiyion/Documents/com/github/kwart/totp-me/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ totp-me ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/aiyion/Documents/com/github/kwart/totp-me/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ totp-me ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/aiyion/Documents/com/github/kwart/totp-me/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ totp-me ---
[INFO] Surefire report directory: /home/aiyion/Documents/com/github/kwart/totp-me/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.jboss.totp.TOTPMIDletTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.064 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ totp-me ---
[INFO] Building jar: /home/aiyion/Documents/com/github/kwart/totp-me/target/totp.jar
[INFO] 
[INFO] --- j2me-maven-plugin:2.0.4:package (default) @ totp-me ---
[INFO] Building j2me me package: /home/aiyion/Documents/com/github/kwart/totp-me/target/totp-me.jar
[INFO] merge artifact: lcrypto-j2me scope:compile
[INFO] Expanding: /home/aiyion/.m2/repository/org/bouncycastle/lcrypto-j2me/1.60/lcrypto-j2me-1.60.jar into /tmp/archived-file-set.679152872.tmp
[INFO] Building jar: /home/aiyion/Documents/com/github/kwart/totp-me/target/totp-me.jar
 [proguard] **************************************************************
 [proguard] * Antenna 1.0.1 initialized for project "TOTP ME"            *
 [proguard] * Using Sun Wireless Toolkit 2.5 (CLDC-1.0; MIDP-1.0)        *
 [proguard] **************************************************************
[INFO] execute ProGuard [-injars, '/home/aiyion/Documents/com/github/kwart/totp-me/target/totp-me.jar_proguard_base.jar'(!META-INF/maven/**), -outjars, '/home/aiyion/Documents/com/github/kwart/totp-me/target/totp-me.jar', -include, '/home/aiyion/Documents/com/github/kwart/totp-me/proguard.conf', -libraryjars, /opt/sun-wtk/lib/midpapi10.jar:/opt/sun-wtk/lib/cldcapi10.jar, -keep public class org.jboss.totp.TOTPMIDlet, -printmapping, '/home/aiyion/Documents/com/github/kwart/totp-me/target/proguard_map.txt', -printseeds, '/home/aiyion/Documents/com/github/kwart/totp-me/target/proguard_seeds.txt']
[INFO] proguard jar: /home/aiyion/.m2/repository/net/sf/proguard/proguard/4.3/proguard-4.3.jar
 [proguard] ProGuard, version 4.3
 [proguard] Reading program jar [/home/aiyion/Documents/com/github/kwart/totp-me/target/totp-me.jar_proguard_base.jar] (filtered)
 [proguard] Reading library jar [/opt/sun-wtk/lib/midpapi10.jar]
 [proguard] Reading library jar [/opt/sun-wtk/lib/cldcapi10.jar]
 [proguard] Note: duplicate definition of library class [com.sun.cldc.i18n.j2me.UTF_8_Reader]
 [proguard] Note: there were 1 duplicate class definitions.
 [proguard] Warning: org.bouncycastle.pqc.crypto.gmss.util.WinternitzOTSignature: can't find referenced method 'double ceil(double)' in class java.lang.Math
 [proguard] Warning: org.bouncycastle.asn1.test.ExtendedFailInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.ExtendedFailInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.OtherMsgTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.OtherMsgTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: java.math.test.BigIntegerTest: can't find referenced method 'int nextInt(int)' in class java.security.SecureRandom
 [proguard] Warning: org.bouncycastle.asn1.test.PopLinkWitnessV2Test: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.PopLinkWitnessV2Test: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.GetCRLTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.GetCRLTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.crypto.test.RNGUtils: can't find referenced method 'int nextInt(int)' in class java.util.Random
 [proguard] Warning: org.bouncycastle.asn1.test.GetCertTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.GetCertTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.CMCPublicationInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.CMCPublicationInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.pqc.crypto.gmss.GMSSLeaf: can't find referenced method 'double ceil(double)' in class java.lang.Math
 [proguard] Warning: org.bouncycastle.crypto.CryptoServicesRegistrar: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.crypto.CryptoServicesRegistrar: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.ModCertTemplateTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.ModCertTemplateTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.ControlsProcessedTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.ControlsProcessedTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.IdentityProofV2Test: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.IdentityProofV2Test: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.pqc.crypto.gmss.GMSSRootSig: can't find referenced method 'double ceil(double)' in class java.lang.Math
 [proguard] Warning: org.bouncycastle.asn1.test.EncryptedPOPTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.EncryptedPOPTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.x509.PKIXNameConstraintValidator: can't find referenced method 'boolean equalsIgnoreCase(java.lang.String)' in class java.lang.String
 [proguard] Warning: org.bouncycastle.asn1.test.DecryptedPOPTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.DecryptedPOPTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.LraPopWitnessTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.LraPopWitnessTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.CMCUnsignedDataTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.CMCUnsignedDataTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.pqc.math.linearalgebra.IntegerFunctions: can't find referenced method 'float abs(float)' in class java.lang.Math
 [proguard] Warning: org.bouncycastle.pqc.math.linearalgebra.IntegerFunctions: can't find referenced class java.lang.Float
 [proguard] Warning: org.bouncycastle.pqc.math.linearalgebra.IntegerFunctions: can't find referenced class java.lang.Float
 [proguard] Warning: org.bouncycastle.pqc.math.linearalgebra.GF2Polynomial: can't find referenced method 'boolean equalsIgnoreCase(java.lang.String)' in class java.lang.String
 [proguard] Warning: org.bouncycastle.asn1.test.TaggedContentInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.TaggedContentInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.PendInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.PendInfoTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.pqc.crypto.gmss.GMSSPrivateKeyParameters: can't find referenced method 'double floor(double)' in class java.lang.Math
 [proguard] Warning: org.bouncycastle.asn1.test.PKIDataTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: org.bouncycastle.asn1.test.PKIDataTest: can't find referenced class java.lang.NoClassDefFoundError
 [proguard] Warning: there were 45 unresolved references to program class members.
 [proguard]          Your input classes appear to be inconsistent.
 [proguard]          You may need to recompile them and try again.
 [proguard]          Alternatively, you may have to specify the options 
 [proguard]          '-dontskipnonpubliclibraryclasses' and/or
 [proguard]          '-dontskipnonpubliclibraryclassmembers'.
 [proguard] Error: Please correct the above warnings first.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.090 s
[INFO] Finished at: 2023-01-30T16:14:24+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.pyx4me:j2me-maven-plugin:2.0.4:package (default) on project totp-me: Obfuscation failed (result=1) -> [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

Thanks in advance!