本文介绍了Maven 2&包装ejb vs jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我正在使用ejb 3.1,那么

If i'm working with ejb 3.1, what's the différence between

<packaging>jar</packaging>

<packaging>ejb</packaging>
...
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ejb-plugin</artifactId>
    <version>2.3</version>
    <configuration>
        <ejbVersion>3.1</ejbVersion>
    </configuration>
</plugin>


推荐答案

如 ,

除了在EJB版本为2.0+时验证是否存在EJB部署描述符之外,插件在生成jar期间不执行任何特定于EJB的处理

"The plugin doesn't do any EJB specific processing during the generation of the jar except for validating the existence of an EJB deployment descriptor if the EJB version is 2.0+ "

由于你有ejb 3.1,ejb-jar.xml文件是可选的,因此除非你想生成Martin评论中提到的客户端存根和实用程序类,否则它赢了如果你使用jar包装会有很大的不同。

Since you have ejb 3.1 the ejb-jar.xml file is optional hence unless you want to generate client stubs and utility classes as mentioned in Martin' comments , it won't make much a difference if you use jar packaging .

这篇关于Maven 2&amp;包装ejb vs jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 16:15