I had a similar problem once. I have located all the neccessary directories (conf, deploy, deployers etc.) under "src/test/resources" of my maven project I want to test, then the embedded jboss starts correctly.
I once tried to put the directories into a "test environment" jar, but that doesn't work, because the embedded jboss want real directories.
Hopes that helps.
I already have these directories under "src/test/resources". I assumed the whole point of building a jar file was so you don't have to rely on directories outside the jar file. Am I wrong?
So am I the only one using Embedded JBoss for unit testing? Am I also the only one trying to use Maven to build and run tests with EJ?
we are using maven, testng and embedded jboss for testing. But as I mentioned we have the configuration and deployment directories in the articfact we are testing under "src/test/resources".
Could you explain a little more your structure? Is there a reason why you have all your test code in a separate sub project?
Sorry, I guess I wasn't clear. All my test code is in the same project and being built by maven into two jar: on contain production code, one containing test code. The structure of my project is as follows:
I have all the embedded jboss stuff under the src/test/resources directory. However, when Maven builds my project, it is not copying the stuff from the src/test/resources directory into the target/test-classes directory.
Hold the Phone!
I was wrong. The test resources are being copied over and the file being complained about in the stack trace is really there.
After wading through the stack trace, I came across this little tid-bit:
Caused by: java.net.MalformedURLException: unknown protocol: vfsfile
I'm assuming I've missed something from my classpath.