Tweaking basedir usage to be by File.toURI() not by File.getAbsolutePath(), which causes problems with paths with spaces
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1186 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
509d5f6608
commit
830d8691f6
|
@ -43,10 +43,10 @@ public class JettyPolicyRuntimeTest extends TestCase
|
|||
|
||||
super.setUp();
|
||||
|
||||
evaluator.put("jetty.home",MavenTestingUtils.getBasedir().getAbsolutePath());
|
||||
evaluator.put("basedir",MavenTestingUtils.getBasedir().getAbsolutePath());
|
||||
|
||||
System.out.println("basedir: "+MavenTestingUtils.getBasedir().getAbsolutePath());
|
||||
evaluator.put("jetty.home",MavenTestingUtils.getBaseURI().toASCIIString());
|
||||
evaluator.put("basedir",MavenTestingUtils.getBaseURI().toASCIIString());
|
||||
|
||||
System.out.println("basedir: " + MavenTestingUtils.getBaseURI().toASCIIString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -175,7 +175,7 @@ public class JettyPolicyRuntimeTest extends TestCase
|
|||
|
||||
URL url = MavenTestingUtils.toTargetURL("test-policy/jetty-test-policy.jar");
|
||||
|
||||
System.out.println( "Test URL: " + url.toString());
|
||||
System.out.println("Test URL: " + url.toString());
|
||||
|
||||
URLClassLoader loader ;
|
||||
if (Thread.currentThread().getContextClassLoader() != null )
|
||||
|
@ -209,7 +209,7 @@ public class JettyPolicyRuntimeTest extends TestCase
|
|||
|
||||
assertTrue("system property access was granted",true);
|
||||
|
||||
// ap.dump(System.out);
|
||||
// ap.dump(System.out);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public class PolicyContextTest
|
|||
{
|
||||
_runningOnWindows = System.getProperty( "os.name" ).startsWith( "Windows" );
|
||||
|
||||
System.setProperty( "basedir", getWorkingDirectory() );
|
||||
System.setProperty( "basedir", MavenTestingUtils.getBaseURI().toASCIIString() );
|
||||
|
||||
super.setUp();
|
||||
}
|
||||
|
@ -128,13 +128,7 @@ public class PolicyContextTest
|
|||
|
||||
private String getWorkingDirectory()
|
||||
{
|
||||
String cwd = System.getProperty( "basedir" );
|
||||
|
||||
if ( cwd == null )
|
||||
{
|
||||
cwd = System.getProperty( "user.dir" );
|
||||
}
|
||||
return cwd;
|
||||
return MavenTestingUtils.getBasedir().getAbsolutePath();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
keystore "file://${basedir}/target/test-policy/jetty-policy.keystore", "jks";
|
||||
keystore "${basedir}/target/test-policy/jetty-policy.keystore", "jks";
|
||||
|
||||
grant signedBy "jetty-policy-bad", codeBase "file://${basedir}/target/test-policy/jetty-test-policy-1.0-SNAPSHOT.jar"
|
||||
grant signedBy "jetty-policy-bad", codeBase "${basedir}/target/test-policy/jetty-test-policy-1.0-SNAPSHOT.jar"
|
||||
{
|
||||
permission java.util.PropertyPermission "${{alias:jetty-policy}}", "read";
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
keystore "file://${basedir}/target/test-policy/jetty-policy.keystore", "jks";
|
||||
keystore "${basedir}/target/test-policy/jetty-policy.keystore", "jks";
|
||||
|
||||
grant principal "jetty-policy"
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
keystore "file://${basedir}/target/test-policy/jetty-policy-nobody.keystore", "jks";
|
||||
keystore "${basedir}/target/test-policy/jetty-policy-nobody.keystore", "jks";
|
||||
|
||||
grant signedBy "jetty-policy", codeBase "file://${basedir}/target/test-policy/jetty-test-policy.jar"
|
||||
grant signedBy "jetty-policy", codeBase "${basedir}/target/test-policy/jetty-test-policy.jar"
|
||||
{
|
||||
permission java.util.PropertyPermission "foo", "read";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
keystore "file://${basedir}/target/test-policy/jetty-policy.keystore", "jks";
|
||||
keystore "${basedir}/target/test-policy/jetty-policy.keystore", "jks";
|
||||
|
||||
grant signedBy "jetty-policy-bad", codeBase "file://${basedir}/target/test-policy/jetty-test-policy.jar"
|
||||
grant signedBy "jetty-policy-bad", codeBase "${basedir}/target/test-policy/jetty-test-policy.jar"
|
||||
{
|
||||
permission java.util.PropertyPermission "foo", "read";
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue