-
1. Re: Embedded JBoss, Maven, and the ubiquitous Jar
hubaer Feb 4, 2008 9:57 AM (in response to drathnow)Hi Dave,
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.
Regards
Marco -
2. Re: Embedded JBoss, Maven, and the ubiquitous Jar
drathnow Feb 4, 2008 1:00 PM (in response to drathnow)Marco,
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?
Dave. -
3. Re: Embedded JBoss, Maven, and the ubiquitous Jar
drathnow Feb 12, 2008 12:13 PM (in response to drathnow)
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? -
4. Re: Embedded JBoss, Maven, and the ubiquitous Jar
hubaer Feb 13, 2008 3:54 AM (in response to drathnow)Hi Dave,
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?
Marco -
5. Re: Embedded JBoss, Maven, and the ubiquitous Jar
drathnow Feb 13, 2008 11:18 AM (in response to drathnow)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:
src/main/java
src/main/resources
src/test/java
src/test/resources
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.
Any suggestions? -
6. Re: Embedded JBoss, Maven, and the ubiquitous Jar
drathnow Feb 13, 2008 11:53 AM (in response to drathnow)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.
Any suggestions? -
7. Re: Embedded JBoss, Maven, and the ubiquitous Jar
drathnow Feb 13, 2008 12:06 PM (in response to drathnow)After wading through the stack trace, I came across this little tid-bit:
Caused by: java.net.MalformedURLException: unknown protocol: vfsfile
at java.net.URL.(URL.java:574)
at java.net.URL.(URL.java:464)
at java.net.URL.(URL.java:413)
at org.jboss.virtual.plugins.context.file.FileHandler.(FileHandler.java:75)
at org.jboss.virtual.plugins.context.file.FileHandler.(FileHandler.java:89)
at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSys
temContext.java:253)
at org.jboss.virtual.plugins.context.file.FileSystemContext.createVirtualFileHandler(FileSys
temContext.java:186)
at org.jboss.virtual.plugins.context.file.FileSystemContext.(FileSystemContext.java:15
0)
at org.jboss.virtual.plugins.context.file.FileSystemContext.(FileSystemContext.java:12
4)
I'm assuming I've missed something from my classpath.
at org.jboss.virtual.plugins.context.file.FileSystemContext.(FileSystemContext.java:11
3) -
8. Re: Embedded JBoss, Maven, and the ubiquitous Jar
drathnow Feb 13, 2008 1:41 PM (in response to drathnow)
Problem solved. With that last exception, I found this:
http://www.jboss.org/?module=bb&op=viewtopic&t=102426
Thanks for all the help.