简体   繁体   English

没有Maven的情况下如何使用Arquillian?

[英]How can I use Arquillian without Maven?

I'm making my first Java EE project and can't figure how to test my EJB. 我正在做我的第一个Java EE项目,并且不知道如何测试EJB。 I've read that Arquillian is really useful to do integration tests, but it seems like using it without Maven is difficult. 我读过Arquillian对进行集成测试确实很有用,但似乎在没有Maven的情况下使用它很困难。 Could someone tell me if there is a way to use it or a tutorial? 有人可以告诉我是否有使用方法或教程吗?

Are you using any sort of dependency management tool, eg Ivy? 您是否正在使用任何类型的依赖项管理工具,例如Ivy? I really recommend using one, since it makes things much easier. 我真的建议使用一个,因为它使事情变得容易得多。

That said, Arquillian does not use Maven itself, so you can use it without Maven. 就是说,Arquillian本身并不使用Maven,因此无需Maven就可以使用它。 You will just have to figure out which dependencies you need. 您只需要弄清楚您需要哪些依赖项。 You can either work it out by just looking at the Maven POM files, or you could start with a sample Maven based setup and use the maven-dependency-plugin to export the libraries you need. 您可以只查看Maven POM文件来解决问题,也可以从基于Maven的示例安装程序开始,然后使用maven-dependency-plugin导出所需的库。 See also https://gist.github.com/mojavelinux/2363038 . 另请参阅https://gist.github.com/mojavelinux/2363038

Personally I would recommend to just use a dependency management tool, be it Maven or Ivy. 我个人建议仅使用依赖管理工具,无论是Maven还是Ivy。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM