我用maven构建的ear没有生成它的APP-INF/lib
正如我在标题中所说,当我构建ear时,工件(wars和ejbs)被复制到ear内,但APP-INF/lib丢失了,我不知道可能是什么原因。
这是 pom.xml 的一部分:
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<earSourceDirectory>${basedir}/contentEar</earSourceDirectory>
<defaultLibBundleDir>APP-INF/lib</defaultLibBundleDir>
<modules>
<webModule>
<groupId>my.webs</groupId>
<artifactId>web</artifactId>
<bundleFileName>web.war</bundleFileName>
</webModule>
<ejbModule>
<groupId>my.test.doc</groupId>
<artifactId>myEjb</artifactId>
<bundleFileName>myEjb.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
<executions>
<execution>
<id>build-ear</id>
<phase>package</phase>
<goals>
<goal>ear</goal>
</goals>
</execution>
</executions>
</plugin>
另外我应该说在 /contentEar 文件夹中只有 application.xml 和清单文件。
如果您对此有任何想法,请帮助我......
As I said in title when i build ear the artifacts (wars and ejbs) are copied inside ear but the APP-INF/lib is missing, and i don't know what could be the reason.
This is a part of pom.xml:
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<earSourceDirectory>${basedir}/contentEar</earSourceDirectory>
<defaultLibBundleDir>APP-INF/lib</defaultLibBundleDir>
<modules>
<webModule>
<groupId>my.webs</groupId>
<artifactId>web</artifactId>
<bundleFileName>web.war</bundleFileName>
</webModule>
<ejbModule>
<groupId>my.test.doc</groupId>
<artifactId>myEjb</artifactId>
<bundleFileName>myEjb.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
<executions>
<execution>
<id>build-ear</id>
<phase>package</phase>
<goals>
<goal>ear</goal>
</goals>
</execution>
</executions>
</plugin>
Also i should say that in /contentEar folder there are only application.xml and manifest files.
Please if you have an idea about this, help me...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Maven 应该在 APP-INF/lib 中放入什么?预期结果是什么?从文档中:
但我没有看到任何
jarModule
在您的配置中。您是否可能将一些 JAR 库声明为依赖项?请澄清。以下帖子也可能有帮助:
And what should Maven put in
APP-INF/lib
? What is the expected result? From the documentation:But I don't see any
jarModule
in your configuration. Did you maybe declare some JAR libraries as dependencies? Please clarify.The following post might also help: