You can configure the maven-surefire-plugin to have your options on the <argLine> element under a new profile.

<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-surefire-plugin</artifactId>
 <version>2.3.1</version>
 <configuration>
 <includes>
 <include>**/*TestCase.java</include>
 </includes>
 <reportFormat>brief</reportFormat>
 <useFile>false</useFile>
 <forkMode>once</forkMode>
<argLine>-ea -Xmx256m -Djava.security.manager -Djava.security.policy=tuscany.policy -Djava.security.debug=policy</argLine>
 </configuration>
 </plugin>

Thanks,
Raymond

--------------------------------------------------
From: "Dan Becker" <[EMAIL PROTECTED]>
Sent: Thursday, May 15, 2008 12:32 PM
To: <tuscany-dev@ws.apache.org>
Subject: Running vtests with security on

Since I am not much of a Maven expert, I thought I would run this by the
Tuscany community to see if I am going down the right path or to see if
there are better ideas.

Normally when I test with any Tuscany sample or test with Java 2
security enabled, I use the JVM options -Djava.security.manager
-Djava.security.policy=tuscany.policy -Djava.security.debug=policy. The
tuscany.policy file enables certain parts of Tuscany code to access
sensitive API calls, such as reading system properties or writing to the
file system. When I run Tuscany JUnit tests in Eclipse, I add these
options to the JUnit "Run As" dialog settings.

The Tuscany vtests run when you execute Maven on the vtest pom with the
test goal. I was thinking of adding a profile that specifies the
additional properties above. Also, I would provide an example
tuscany.policy file that provides the proper permissions for the Tuscany
code base. This when you wanted to run vtests with security on, you
would invoke this profile along with the test goal.

Any additional suggestions or comments?

--
Thanks, Dan Becker

Reply via email to