简体   繁体   中英

Why are my Google App Engine classes not enhanced when using IntelliJ?

My project is built with gradle. If I run the test from the command line everything works:

./gradlew test --tests '*.UserTest'

But when I try to run the tests from within Intelli it fails to run because my classes aren't enhanced .

javax.jdo.JDOUserException: Persistent class "Class com.example.Foo does not seem to have been enhanced. You may want to rerun the enhancer and check for errors in the output." has no table in the database, but the operation requires it. Please check the specification of the MetaData for this class.

Running the task appengineEnhance makes no difference.

It turns out that by default, IntelliJ will use the platform runner for running the tests. You need to select the gradle runner instead.

preferences > build[...] > build tools > gradle > runner and select Delegate IDE build/run actions to gradle

在此处输入图片说明

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