使用m2e插件将项目导入eclipse后,构建路径包含未由pom.xml文件中的依赖项指定的条目。为什么呢?
依赖关系显示在以下文件中
pom.xml:
<dependencies>
<dependency>
<groupId>${spring.group}</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>${spring.group}</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.0</version>
<scope>test</scope>
</dependency>
</dependencies>
编辑:
当我发布这个问题时,我是maven的新手(我还是),但在阅读了transitive dependencies
后,我发现了我的问题的答案。