Are sure that /target/test-classes/testing.policy isn't computed as an
absolute path : c:/target/test-classes/testing.policy
Did you try ? : -Djava.security.policy=target/test-classes/testing.policy

Arnaud

On 9/22/06, diyfiesta <[EMAIL PROTECTED]> wrote:


Hi Folks,

Bit stuck on trying to run my tests with a security manager enabled and a
specific policy file. I added the security manager system property and
policy setting using the following in the properties file
(project.properties) and have the policy file set as a <resource> under
for
the unit tests (it physically exists where I expect it to).

maven.junit.jvmargs=-Djava.security.manager
-Djava.security.policy=/target/test-classes/testing.policy

but I just can't get it to see the policy file (and so the tests fail with
permission problems).

It works fine if I hard code it like this;

maven.junit.jvmargs=-Djava.security.manager
-Djava.security.policy=c:\\temp\\testing.policy

but that obviously doesn't work unless I first copy the file there first
(which I don't want to do).

I thought the VM is run from ${basedir} so my orginal setting should work?
I've tried it as just testing.policy thinking it would spot it on the
classpath, and even ${basedir}/blar/blar/testing.policy but then it just
fails with class not found (wierd!).

Any tips folks? :)

Thanks a million in advance,
Toby
--
View this message in context:
http://www.nabble.com/-M1--Running-tests-with-jvmargs-%28security-policy%29-tf2319941.html#a6454630
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to