maven生成的war文件不包含scala库
我创建了一个 Maven 项目,其中包含使用 Scala 编写的 JAX-RS Web 服务。但是,我发现生成的war文件不包含任何scala库。
我将其部署到Jboss并运行后,错误显示找不到Scala库。
我假设 maven 会自动将任何相关库打包到 WEB-INF\lib 但 scala 不是这样。
为了打包 scala 库,我需要添加任何特定配置吗?
或者我应该将 scala 放置到 JBoss AS 本地的任何地方吗?
非常感谢!
更新:
我实际上已经找到了为什么 scala 库没有包含在战争中。这是因为我为 scala 依赖项定义了“提供”范围。
但是,如果我在战争中包含 scala,则部署将失败并出现非法参数异常。
我记得我曾经配置 jboss 以使用 scala 库的本地副本,但我忘记了如何执行此操作。
有人对此有任何想法吗?
非常感谢
I have got a maven project created which contains a JAX-RS web service written using Scala. However, I found that the war file generated does not contain any scala libraries.
After I deployed it to Jboss and run, errors show that Scala libraries could not be found.
I assume maven will automatically pack any relevant libraries to WEB-INF\lib but scala is not the case.
Is there any specific configurations I need to add in order for the scala library to be packed?
Or shall I place scala to anywhere local to the JBoss AS?
Many thanks!
Update:
I actually have found out why the scala libraries are not included in the war. It was because I defined a "provided" scope for the scala dependency.
However, if I include scala in the war, the deployment will fail with an illegal argument exception.
I brief remember I used to config jboss to use local copy of scala library, but I forgot how to do this.
Does anyone have any idea about this?
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论