繁体   English   中英

maven ear 插件没有从其中一场战争的 WEB-INF/lib 中复制所有 jar 文件

[英]maven ear plugin not copying all jar files from WEB-INF/lib of one of the war

我们的产品有四个以上的web模块; 单个模块的 maven 脚本通过引入 pom.xml 中提到的所有依赖项来构建各个 web 模块的 war 文件。 我们也在做一个第三方模块的覆盖,将额外的 jar 文件复制到 WEB-INF/lib 文件夹中。

最后,为了简化分发,我们尝试创建一个单一的企业存档 (ear) 文件,其中包含所有战争文件及其依赖项。

maven-ear 插件,我们使用的只是复制子模块的 pom.xml 中提到的 jar 文件,而不是覆盖结果复制的那些。

对此非常感谢的任何帮助。

 <?xml version="1.0" encoding="UTF-8"?> <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/xsd/maven-4.0.0.xsd"> <parent> <artifactId>web</artifactId> <groupId>org.dept.prod</groupId> <version>2.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>singleear</artifactId> <version>2.0-SNAPSHOT</version> <packaging>ear</packaging> <properties> <mod.version>7.12.0.Final</mod.version> </properties> <dependencies> <dependency> <groupId>org.dept.prod</groupId> <artifactId>common</artifactId> <version>2.0-SNAPSHOT</version> <type>jar</type> </dependency> <dependency> <groupId>org.dept.prod</groupId> <artifactId>module1</artifactId> <version>2.0-SNAPSHOT</version> <type>war</type> </dependency> <dependency> <groupId>org.dept.prod</groupId> <artifactId>module2</artifactId> <version>2.0-SNAPSHOT</version> <type>war</type> </dependency> <dependency> <groupId>org.dept.prod</groupId> <artifactId>module3</artifactId> <version>2.0-SNAPSHOT</version> <type>war</type> </dependency> <dependency> <groupId>org.dept.prod</groupId> <artifactId>module4</artifactId> <version>2.0-SNAPSHOT</version> <type>war</type> </dependency> <dependency> <groupId>org.3rdparty.module</groupId> <artifactId>other</artifactId> <version>xxxFinal</version> <scope>runtime</scope> </dependency> <!-- Dependencies used by project --> </dependencies> <build> <plugins> <plugin> <artifactId>maven-ear-plugin</artifactId> <version>3.0.2</version> <configuration> <skinnyWars>true</skinnyWars> <defaultLibBundleDir>lib/</defaultLibBundleDir> <modules> <webModule> <groupId>org.dept.prod</groupId> <artifactId>module1</artifactId> <bundleFileName>/module1.war</bundleFileName> <contextRoot>/module1</contextRoot> </webModule> <webModule> <groupId>org.dept.prod</groupId> <artifactId>module2</artifactId> <bundleFileName>/module2.war</bundleFileName> <contextRoot>/module2</contextRoot> </webModule> <webModule> <groupId>org.dept.prod</groupId> <artifactId>module3</artifactId> <bundleFileName>/module3.war</bundleFileName> <contextRoot>/module3</contextRoot> </webModule> <webModule> <groupId>org.dept.prod</groupId> <artifactId>module4</artifactId> <bundleFileName>/module4.war</bundleFileName> <contextRoot>/module4</contextRoot> </webModule> </modules> </configuration> </plugin> </plugins> </build> </project>

<skinnyWars>true</skinnyWars>

此属性不会将库复制到 war 模块中

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM