[英]How to add build ear file containing only dependency jars in pom
我想使用maven创建只包含依赖项jar文件的耳朵。
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
</dependency>
......
......
......
</dependencies>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<jarModule>
<groupId>groupId</groupId>
<artifactId>artifcatId</artifactId>
<includeInApplicationXml>true</includeInApplicationXml>
</jarModule>
</modules>
...............
...............
</configuration>
</plugin>
</plugins>
</project>
Maven自动创建了application.xml,其中包含这些jar的条目,但是在部署时,我仍在控制台中收到消息-“在耳朵中找不到模块。”
你能帮助我,我在这里想念的是什么。
EAR文件应包含WAR,RAR,SAR和EJB JAR。 就EAR而言,包括基本库JAR在内的所有其他内容都不重要,而就Java EE Application Server而言,仅包含此类文件的EAR就毫无用处。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.