[ http://jira.codehaus.org/browse/SUREFIRE-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Rosenvold closed SUREFIRE-34. -------------------------------------- Resolution: Fixed Fix Version/s: (was: Backlog) 2.8.2 Assignee: Kristian Rosenvold Fixed in r1102423 >From the docs: * Using a security manager (JUnit3 only) As long as forkMode!=never and you use JUnit3, you can run your tests with a java security manager active. The classname of the security manager must be sent as a system property variable to the JUnit3 provider. JUnit4 uses mechanisms internally that are not compatible with the tested security managers and is not supported by surefire. +---+ [...] <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${surefire.version}</version> <configuration> <systemPropertyVariables> <surefire.security.manager>java.lang.SecurityManager</surefire.security.manager> </systemPropertyVariables> </configuration> </plugin> [...] +---+ You can still also use the "jboss" method as described above, but you need no exceptions when running JUnit3 in this manner. If you want to run with TestNG/JUnit4 you probably have to use the policy file method. > Using security manager in a fork mode causes an AccessControlException > ---------------------------------------------------------------------- > > Key: SUREFIRE-34 > URL: http://jira.codehaus.org/browse/SUREFIRE-34 > Project: Maven Surefire > Issue Type: Bug > Components: process forking > Affects Versions: 1.5.3 (2.1.3 plugin) > Reporter: Vincent Siveton > Assignee: Kristian Rosenvold > Priority: Critical > Fix For: 2.8.2 > > Attachments: SUREFIRE-34.diff > > > Using securityManager in a forkmode causes > java.security.AccessControlException in the createClassLoader() method > Same things with setSystemProperties() > Example: > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <configuration> > <forkMode>pertest</forkMode> > <argLine>-Djava.security.manager</argLine> > </configuration> > </plugin> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira