我正在尝试通过JMX创建一个UI工具来启动/停止Jboss EAP 5.1上的webapp(war),但是我遇到了安全问题
public class jmx_console {
//
private static final Logger log = Logger.getLogger(jmx_console.class);
//
public static String startAndStopQueueManager(String jnpUrl, String qmUrl, String action, String username, String password) throws NamingException, MalformedObjectNameException, InstanceNotFoundException, MBeanException, ReflectionException,
IOException, AttributeNotFoundException {
//
log.debug("username: " + username);
log.debug("password: " + password);
log.debug("action: " + action);
log.debug("qmUrl: " + qmUrl);
log.debug("jnpUrl: " + jnpUrl);
//
System.setProperty("java.security.policy", "client.policy");
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
//
Properties ht = new Properties();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
ht.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); …Run Code Online (Sandbox Code Playgroud) 我有一个基于Adobe框架的简单Eclipse Web Project。现在,我必须将项目升级到新版本的框架,并且希望使用Maven来管理依赖项,打包和ecc。
问题在于,在Adobe文档中写到,我必须使用很多自己的jar(69)。我看到了Maven System_Dependencies,但是我正在寻找更智能的东西来添加所有69个这样的条目。
通常,我将创建一个Eclipse UserLibrary并将其添加到Eclipse BuildPath中,但是在这种情况下,我不知道如何将它们添加到maven类路径中以正确地编译和打包项目