我正在为 Java Web 应用程序创建一个 WAR。问题是在 WAR 中,在 /WEB-INF/lib 中只包含了几个 JAR。
这是我的 POM.xml:
<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">
<!--
*****THIS IS AN AUTOGENERATED POM; PLEASE DO NOT MODIFY OR COMMIT ANY CHANGES*****
-->
<parent>
...
</parent>
...
<scm>
...
</scm>
<packaging>war</packaging>
<dependencies>
<dependency>
...
</dependency>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javancss.fail>false</javancss.fail>
<checkstyle.fail>false</checkstyle.fail>
<cobertura.fail>true</cobertura.fail>
<pmd.fail>true</pmd.fail>
<findbugs.fail>false</findbugs.fail>
</properties>
</project>
例如,我有来自不同 Spring 模块的 5 个依赖项,但我只看到一个包。
我所有的依赖项都有一个“编译”范围。
为什么会这样?
问候。