在Maven中,我将在哪里设置安全策略,如此Ant build.xml中所示......
module_eval
...如果我的pom.xml包含此配置文件:
<target name="runComputer" description="Run a computer">
<java classname="system.Computer" fork="true">
<jvmarg value="-Djava.security.policy=policy"/>
</java>
</target>
答案 0 :(得分:3)
exec-maven-plugin的文档有一个例子:
<configuration>
<mainClass>com.example.Main</mainClass>
<arguments>
<systemProperties>
<systemProperty>
<key>java.security.policy</key>
<value>policy</value>
</systemProperty>
</systemProperties>
</arguments>
</configuration>