[jboss-dev-forums] [Design of POJO Server] - Re: Regression on VirtualFile.toURL()
wolfc
do-not-reply at jboss.com
Thu Feb 19 06:25:44 EST 2009
"adrian at jboss.org" wrote : ...
| My emphasis.
|
| On your unit tests, you are just constructing your VFS contexts wrongly.
| You need to include "external references" in your VFS context by including the parent
| within the VFS context you construct.
|
| e.g. we support "external references" if you put them in deploy/
| because the deployment file is constructed as
|
|
| | VFS context = VFS.getVFS("deploy");
| | VirtualFile deployment = context.getRoot().getChild(deploymentName);
| |
|
| so that deployment can see the whole deploy folder.
|
| But a deployment that explicitly lists its URL in the scanner won't have a parent
| because there is no equivalent of the "deploy" folder for them.
The use case doesn't have any 'weird' manifest entries. It's a maven project with src/test/resources/META-INF/persistence.xml. Now you would want to test this before moving on. But I see your point, the unit test should take 'target' as it's root and 'test-classes' as the deployment unit.
I had lib/common.jar in src/test/resources/lib which is unrealistic, in real life it should come in via the dependency plugin to target/lib.
As for Ales's proposal:
a.ear/b/c/d/persistence.jar with jar reference ../e/common.jar must lead to a.ear/b/c/e/common.jar. So starting from the root is not an option. Without relativity the universe comes to an end.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211419#4211419
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211419
More information about the jboss-dev-forums
mailing list