使用哪个Maven GlassFish插件? [英] Which Maven GlassFish plugin to use?

查看:123
本文介绍了使用哪个Maven GlassFish插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图通过Maven在GlassFish V3中集成部署java .war 的工具。虽然我找到了一些插件,但它们都不是非常活跃的:



我从 Eskato's Blog ,它是2008年3月写的,所以我不知道GlassFish Maven集成的状态是什么,我也找不到合适的插件可以使用。通过 Maven GlassFish插件,我取得了一些成功,但它仍然无法正常工作完全适合它所支持的所有目标,这使得一些命令无效。



其他人能否成功整合Glassfish V3和Maven?如果是这样,你用什么资源来完成它? 更新 CARGO-491 已经修复,我相应地更新了我的答案。总而言之,现在基本上有三种选择:第一种选择是使用Maven GlassFish插件

Maven GlassFish插件。此插件允许与本地或远程GlassFish安装以及Maven构建生命周期内的Glassfish域和组件部署管理。



Maven嵌入式GlassFish插件



第二种选择是使用 Maven Embedded Glassfish插件。正如其名称所述,该插件不依赖于现有的安装,而是使用嵌入式GlassFish,与插件在同一个JVM中运行。如果你想保持构建的可移植性(任何人都可以获得你的POM并运行一个包含GlassFish的构建,而无需安装它),这个插件是非常好的,它具有与普通GlassFish安装几乎相同的功能,除了集群当然(可以使用如果需要,预配置 domain.xml )。例如,使用GlassFish Maven插件和JavaDB Embedded 进行测试。



Maven Cargo Plugin



由Kohsuke Kawagushi发起的工作最终被整合到Cargo中,并从Cargo 1.0.1开始, a href =http://cargo.codehaus.org/Glassfish+3.x =noreferrer>现在支持GlassFish 3.x 。因此,使用 Maven Cargo插件是第三种选择。这对于想要以不可知的方式与容器进行交互的构建很有意思。但我不确定Cargo是否允许GlassFish特定插件的所有灵活性(例如,JMS资源的部署等)。


I've been trying to integrate deploying java .war's in GlassFish V3 through Maven. While I have found a few plugins, none of them look to be very active:

And I got the most information out of Eskato's Blog, it was written March 2008, so I don't know what the state of GlassFish Maven integration is, nor can I find a suitable plugin to work with. With the Maven GlassFish Plugin I have had some success, but it still doesn't work entirely well for all goals it says it supports, which makes some of the commands ineffective.

Has anyone else been able to integrate Glassfish V3 and Maven successfully? If so, what resources did you use to get it done?

解决方案

Update: CARGO-491 has been fixed and I've updated my answer accordingly. To summarize, there are now basically three options:

Maven GlassFish Plugin

A first option would be to use the Maven GlassFish Plugin. This plugin allows to interact with a local or remote GlassFish install and the management of Glassfish domains and component deployments from within the Maven build lifecycle.

Maven Embedded GlassFish Plugin

The second option would be to use the Maven Embedded Glassfish Plugin. As stated by its name, this plugin doesn't rely on an existing install but uses an embedded GlassFish, running in the same JVM as the plugin. This plugin is extremely nice if you want to keep your build portable (anybody can get your POM and run a build involving GlassFish without having it installed) with almost the same features as a normal GlassFish install, except clustering of course (you can use a preconfigured domain.xml if you want). See Testing with the GlassFish Maven plugin and JavaDB Embedded for an example.

Maven Cargo Plugin

The work initiated by Kohsuke Kawagushi as been finally integrated in Cargo and, starting with Cargo 1.0.1, GlassFish 3.x is now supported. Using the Maven Cargo plugin is thus a third option. This would be interesting for builds that want to interact with containers in an agnostic way. But I'm not sure Cargo allows all the flexibility of the GlassFish specific plugin(s) (e.g. deployment of JMS resources, etc).

这篇关于使用哪个Maven GlassFish插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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