m2Eclipse的dependencyManagement部分不显示图形 [英] m2Eclipse dependencyManagement section doesn't show graph

查看:85
本文介绍了m2Eclipse的dependencyManagement部分不显示图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这是错误还是预期的功能,但是如果m2Eclipse的POM编辑器中的依赖项位于其中,则它具有出色的图形表示("Dependency Graph"选项卡)和树("Dependency Heirarchy"选项卡).依赖项本身.但是,当您将它们移到"dependencyManagement"节点(对基于模块的项目很有用)时,这些选项卡将不再起作用.

I don't know if this is a bug or intended functionality, but the POM editor for m2Eclipse has a wonderful graph representation ('Dependency Graph' tab) and tree ('Dependency Heirarchy' tab) if the dependencies are in the dependency section all by themselves. However, when you move them into the 'dependencyManagement' node (useful for module based projects) these tabs no longer work.

有人知道这是否是错误,预期的功能等吗?

Does anyone know if this is a bug, intended functionality, etc?

编辑#1:依赖项管理部分中的依赖项不在父级的依赖项管理部分之外声明.它们在那里共享子模块.为了保持一致性(我们在此建模的地方发布了一些标准).

EDIT #1: The dependencies in the dependency management section are NOT declared outside of the dependency management section in the parent. They are there to share amongst the child modules; to keep consistency (there was some standard posted somewhere that we're modeling this on).

编辑#2:该工具在子模块级别起作用.我指的是它在父级上不起作用.

EDIT #2: The tooling works at the child module level. I am referring to it not working at the parent level.

TIA

推荐答案

我有在dependencyManagement下声明了依赖项的POM,它们只是按预期显示在 Dependency Graph Dependency中层次结构标签.

I have POMs with dependencies declared under dependencyManagement and they are just shown as expected in the Dependency Graph and Dependency Hierarchy tabs.

例如,我有一个具有以下内容的父POM:

For example, I have a parent POM with:

  <dependencyManagement>
    <dependencies>
      <!-- SL4J API -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <!-- SLF4J JDK14 Binding  -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-jdk14</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency> 
      ...
    </dependencyManagement>

还有一个带有以下内容的儿童POM:

And a child POM with:

  <dependencies>
    ...
    <!-- Logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
    </dependency>
    ...
  </dependencies>

孩子的依赖关系图可以正常工作:

您在dependencyManagement下移动的依赖项是否也实际上被声明为依赖项?您可以显示简化的pom.xml来说明问题吗?

Are the dependencies you moved under dependencyManagement actually also declared as dependencies? Can you show a simplified pom.xml illustrating the problem?

该工具在子模块级别起作用.我指的是它在父级上不起作用.

The tooling works at the child module level. I am referring to it not working at the parent level.

dependencyManagement元素中声明的依赖项不是项目的dependencies(如果我在dependencyManagement中声明了foo,我仍然不依赖于foo).如果父级未声明任何dependencies,则无任何显示.

Dependencies declared in the dependencyManagement element are not dependencies of the project (if I declare foo in the dependencyManagement, I'm still not depending on foo). If the parent doesn't declare any dependencies, there is nothing to show.

这篇关于m2Eclipse的dependencyManagement部分不显示图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆