Author: klape
Date: 2012-07-19 12:24:39 -0400 (Thu, 19 Jul 2012)
New Revision: 16505
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
Log:
[JBPAPP-8052] WSProviderPlugin.testClassLoader() doesn't work on Mac OS X
Modified:
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2012-07-19
15:48:22 UTC (rev 16504)
+++
framework/branches/jbossws-framework-3.1.2/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2012-07-19
16:24:39 UTC (rev 16505)
@@ -260,17 +260,32 @@
public void testClassLoader() throws Exception
{
// Work around the sure jre settings
- String javaHome = System.getProperty("java.home");
- String jdkHome = javaHome.substring(0, javaHome.indexOf(FS + "jre"));
+ String javaHome = System.getProperty("java.home");
+ boolean isMacOs = System.getProperty("os.name").equals("Mac OS
X");
+ String targetDir = createResourceFile("").getParent();
- String targetDir = createResourceFile("").getParent();
- URLClassLoader loader = new URLClassLoader(
- new URL[]
+ URL[] urls = null;
+ if(isMacOs)
+ {
+ urls = new URL[]
{
new URL("file:"+targetDir+FS+"test-libs" + FS +
"jaxws-classloading-service.jar"),
new URL("file:"+targetDir+FS+"test-libs" + FS +
"jaxws-classloading-types.jar"),
+ };
+ }
+ else
+ {
+ String jdkHome = javaHome.substring(0, javaHome.indexOf(FS + "jre"));
+ urls = new URL[]
+ {
+ new URL("file:"+targetDir+FS+"test-libs" + FS +
"jaxws-classloading-service.jar"),
+ new URL("file:"+targetDir+FS+"test-libs" + FS +
"jaxws-classloading-types.jar"),
new URL("file:"+jdkHome+FS+"lib" + FS +
"tools.jar")
- },
+ };
+ }
+
+ URLClassLoader loader = new URLClassLoader(
+ urls,
getArtefactClassLoader()
);
Show replies by date