Maven可以将模块部署到JBoss吗? [英] Can Maven Deploy a Module to JBoss?

查看:89
本文介绍了Maven可以将模块部署到JBoss吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Maven项目,我们正在使用该项目将多个War部署到JBoss服务器.我们最近注意到,我们几次战争所依赖的一个罐子使用Xerial.当Xerial启动时,它尝试加载本机驱动程序,但是只有第一个成功加载本机驱动程序,而其余的则失败,并退回纯Java实现,因为本机驱动程序已经在类加载器中.我们真的很想通过能够在所有战争中加载本机驱动程序来重新获得性能.

We have a Maven project that we are using to deploy several wars to a JBoss server. We recently noticed that one of the jars that a couple of our wars depend on, uses Xerial. When Xerial starts it tries to load up a native driver, but only the first one successfully loads the native driver and the rest fail and fall back on a pure Java implementation because the native driver is already in a classloader. We would really like to gain the performance back by being able to load the native driver on all the wars.

在我看来,最好的方法是将我们依赖的jar作为模块添加到JBoss服务器,然后使服务依赖于它.

It looks to me like the best way to do this would be add the jar we depend on to the JBoss server as a module, and then have the services depend on it.

我的问题是,有没有办法使我们的Maven构建做到这一点?还是我们以完全错误的方式来解决这个问题?

My question is, is there a way we can get our Maven build to do this? Or are we going about this in the completely wrong way?

推荐答案

看了几天,并与几个比我更熟悉JBoss-Maven交互的人交谈之后,事实证明答案是我的问题是目前无法完成.没有Maven插件能够将模块部署到JBoss.这在很大程度上是因为这些模块仅在JBoss启动时才由JBoss加载,尽管如果有人感到特别有野心并想编写自己的Maven插件,则理论上可以解决该问题.

After a few days of looking, and talking to a couple of people who were much more familiar with JBoss-Maven interaction than me, it turns out the answer to my question is that it cant currently be done. There is no Maven plugin capable of deploying a Module to JBoss. This is largely in part to the fact that the modules are only loaded by JBoss when it starts, although if anyone is feeling particularly ambitious and wants to write their own Maven plugin, it could theoretically be worked around.

@Robert Scholte留下的答案是一个很好的答案,我从中学到了,但是实际上并没有回答我的问题.

The answer @Robert Scholte left is a good one, and I learned from it, however it didn't actually answer my question.

这篇关于Maven可以将模块部署到JBoss吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆