Dependencies 为什么maven不这样做;加上「;所有依赖项?(关于spring示例)

Dependencies 为什么maven不这样做;加上「;所有依赖项?(关于spring示例),dependencies,maven,Dependencies,Maven,我将sprig依赖项添加到我的maven pom中 <dependency> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> <version>2.5.6.SEC01</version> </dependency> org.springframework 春

我将sprig依赖项添加到我的maven pom中

<dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring</artifactId>
        <version>2.5.6.SEC01</version>
</dependency>

org.springframework
春天
2.5.6.SEC01
我“运行”maven下载所有依赖项。 在SpringPOM文件(来自本地.m2存储库)中,我可以看到许多依赖项(大约20个)

。。。。。
奥帕林
奥帕林
1
真的
asm
asm
2.2.3
真的
.....
但当我通过Assebly插件收集所有LIB或使用“依赖项”任务列出所有LIB时,我发现maven只“使用”spring和commons-lang,而不使用任何其他LIB


我只想知道发生了什么,或者我做错了什么?为什么maven不“添加”spring pom中的所有依赖项?

这些依赖项在pom中被标记为可选(
true
)。因此它们不会被包括在内。

这些依赖项在pom中被标记为可选(
true
)。因此,它们不包括在内。

请发布pom.xmlcommons-logging而不是commons-lang请发布pom.xmlcommons-logging而不是commons-lang
        .....
     </organization>
 <dependencies>
    <!-- External Dependencies -->
  <dependency>
   <groupId>aopalliance</groupId>
   <artifactId>aopalliance</artifactId>
   <version>1.0</version>
   <optional>true</optional>
  </dependency>
  <dependency>
   <groupId>asm</groupId>
   <artifactId>asm</artifactId>
   <version>2.2.3</version>
   <optional>true</optional>
  </dependency>
        .....