[英]EAR archive inside another EAR using Maven?
您可以将耳朵档案放在另一个耳朵档案中吗? 我尝试将耳朵依赖项添加到指定工件类型为的耳朵模块
<type>ear</type>
与Maven 3.3.3,但我明白了
Failed to initialize ear modules: Unknown artifact type[ear]
如果我未指定工件类型,那么maven将查找jar工件,但找不到它。 有办法吗? 如果不是,是否有理由禁止内耳存档?
EAR
档案只能包含WAR
, JAR
和RAR
(资源档案)模块。
如果您在Maven中有一个EAR项目,则应该像这样添加EJB依赖项:
<dependency>
<type>ejb</type>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>...</version>
</dependency>
并类似地配置maven-ear-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
...
<modules>
<ejbModule>
<groupId>...</groupId>
<artifactId>...</artifactId>
</ejbModule>
</modules>
</configuration>
</plugin>
对于WAR
依赖性,您需要使用<type>war</type>
和<webModule>
代替。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.