简体   繁体   中英

jPos JUnit Tests Fail in Eclipse

When I attempt to run unit tests in eclipse for jPos I receive error messages concerning missing resource bundles:

org.jpos.core.ConfigurationException: org.jpos.security.SMException: java.util.MissingResourceException: Can't find bundle for base name org/jpos/q2/buildinfo, locale en_US (java.util.MissingResourceException: Can't find bundle for base name org/jpos/q2/buildinfo, locale en_US) (org.jpos.security.SMException: java.util.MissingResourceException: Can't find bundle for base name org/jpos/q2/buildinfo, locale en_US (java.util.MissingResourceException: Can't find bundle for base name org/jpos/q2/buildinfo, locale en_US))

Also gradle fails complaining about invalid signing keys when building the project.

Download and install the buildship gradle plugin for eclipse and import jPos as a gradle project. (This will bring in the main jpos project and a few other related projects)

Run ./gradlew build from the root jPos folder to generate the missing resource files. (Alternatively run the build task from within eclipse)

Now we can add the newly generated resources to the runtime classpath of eclipse. Right click on the jpos-jpos project and select "Configure build path". Then add the build/resources/main folder to your classpath and then you should be able to run the tests from within eclipse.


To fix the signing key issue, comment out the signing plugin, signing configuration, and uploadArchives configuration in the root build.gradle project. Though this doesn't solve the underlying issue for why signing isn't working (probably requires key generation/configuration) it will at least allow the project to be built.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM