HHH-5693 Update creation of URLClassloader for resource loading

This is necessary, because of changes of the loction of the test classes.
It used to be target/test-classes, now it is target/classes/test
This commit is contained in:
Hardy Ferentschik 2010-10-26 11:08:32 +02:00
parent 7eedcfea4e
commit 461354be09
1 changed files with 8 additions and 7 deletions

View File

@ -76,13 +76,14 @@ public abstract class PackagingTestCase extends TestCase {
File myPath = new File( myUrl.getFile() );
// navigate back to '/target'
targetDir = myPath
.getParentFile() // target/classes/org/hibernate/ejb/test/packaging
.getParentFile() // target/classes/org/hibernate/ejb/test
.getParentFile() // target/classes/org/hibernate/ejb
.getParentFile() // target/classes/org/hibernate
.getParentFile() // target/classes/org
.getParentFile() // target/classes/
.getParentFile(); // target
.getParentFile() // target/classes/test/org/hibernate/ejb/test/packaging
.getParentFile() // target/classes/test/org/hibernate/ejb/test
.getParentFile() // target/classes/test/org/hibernate/ejb
.getParentFile() // target/classes/test/org/hibernate
.getParentFile() // target/classes/test/org
.getParentFile() // target/classes/test
.getParentFile() // target/classes
.getParentFile(); // target
File testPackagesDir = new File( targetDir, "bundles" );
try {
bundleClassLoader = new URLClassLoader( new URL[] { testPackagesDir.toURL() }, originalClassLoader );