TDD
Hi,
I'm trying to be a good TDD developer using test-first principles in a new installation of IntelliJ 8 on OS X, however, being a relative novice with IntelliJ, I find that the two of us (me and IntelliJ) are not playing well together.
I have a project that consists of several modules, one of which compiles to an EJB jar file with an MDB. However, the tests I am writing, and trying to run, are in a completely independent module and not using the MDB or any JavaEE features for that matter. This module does not depend on the EJB Module, though there is a runtime dependency the other way around, but again, this is not anything that appears as part of the unit tests I am trying to write.
That being said, when I I attempt to run my test class by right-clicking on it and saying "Run MyClassTest.java" it compiles the entire project and is giving me an error that says it cannot find the ejb-jar.xml file which should be located at dist/stage/META-INF/ejb-jar.xml. But this is an unmanaged, generated upon compile, directory that is not part of the project's source tree.
I'm hoping someone can help me understand what I am doing wrong or what I need to change in order to get back to some productive TDD in IntelliJ.
Thanks,
John
请先登录再写评论。
Hello johndubchak,
You can check the settings of EJB facets added to your modules. Some facet
may refer to this ejb-jar.xml as to deployment descriptor. If it is actually
not, remove it from descriptors list.
Alexander.
Hello johndubchak,
Please make sure that your JUnit run configuration has "Search for tests"
option set to "In single module" or "Across module dependencies", and the
selected module is the one containing the test class. Then IDEA will not
attempt to build your EJB module.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"