AutoFirma ins and outs (4). Errors in tests in afirma-core, jmulticard-jse
1. The package org.xml.sax is accessible from more than one module: <unnamed>, java.xml and TestMIMEDetection failure
This error is produced in the afirma-core project to solve the error in TestMIMEDetection. At fist to solve it, the "Apache xerces" dependecy is added to the build.gradle,
In StackOverflow explains that a package is both in the Modulepath and in the Classpath. The ModulePath is the jdk or jre that is being used and the Classpath is formed by the libraries that are imported. Usually, the packages that begin with "java." or "javax." cannot be included in the Classpath as they should be in the jdk. In the menu option "Configure build path" you can see this option.
The dependencies in the build.gradle are:
api libs.jmimemagic
api libs.xerces
The library that has conflictive dependencies is "xerces".
To solve this problem in Gradle click on "Project and External Dependencies" to see the libraries.
Here are two views, the first without the "xerces" lib and the second with the "xerces" lib
In the next image, you can see that "xml-apis" has been added by the "xerces" lib. That includes the conflictive "javax." packages.
Now the build.gradle file should be as follows. Note the highlighted code.
dependencies { testImplementation libs.junit api libs.jmimemagic api libs.xerces } configurations { // @see: https://stackoverflow.com/a/59294690/7704658 all*.exclude group: 'xml-apis' }
Now the TestMIMEDetection is not failing!
2. TestCeres430Signature, TestDnieSignature, failures (jmulticard-jse project)
If you don't have the DNIe installed, this test will fail. So comment on the code of this test!
3. TestJseCryptoHelper failure (jmulticard-jse project)
I don't know the cause of the problem of this test. So I will comment on the code
Now if you run
./gradlew build
there are no problems
Comments
Post a Comment