我在互联网上搜索了很长一段时间,但我无法弄清楚如何配置 maven-war 插件或类似的东西,以便系统依赖项包含在内置战争中(WEB-INF/lib 文件夹)
在 jar-build 的情况下,我使用 maven 依赖插件:
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
但我无法理解在战争建设的情况下要做什么。我试过使用 maven-war 插件,但它不包括构建中的系统依赖项。
[更新]
我有类型的依赖:
<dependency>
<groupId>LoginRadius</groupId>
<artifactId>LoginRadius</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${basedir}\lib\LoginRadius-1.0.jar</systemPath>
</dependency>
在我的 POM 中,并且在构建战争时这些依赖项不包含在 WEB-INF/lib 中。