【问题标题】:Why is maven dependency being added automatically to pom when using Eclipse (STS 3.5.1)?为什么在使用 Eclipse (STS 3.5.1) 时会自动将 maven 依赖添加到 pom?
【发布时间】:2014-08-13 09:09:57
【问题描述】:

我没有添加以下 maven 依赖项(我是项目中唯一的开发人员):

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-remote-shell</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>

这是怎么回事?

【问题讨论】:

  • 我也遇到过类似的情况。甚至多次具有不同的依赖关系。还没找到原因。你在 OSX 上吗?可能是一种捷径?
  • 我也遇到了多个依赖项的问题。例如 net.wimpi:telnetd-x:2.1.1。我在 OSX 上。
  • 您在 STS 中创建了什么样的项目?
  • 如果是“Spring Starter Project”,那很正常。 “Spring Starter 项目”使用 Spring Boot,并且该依赖项来自 Spring Boot。
  • 看看this JIRA issue。听起来很像你的问题。那里指定了一种解决方法。试一试,看看效果如何。

标签: eclipse spring maven spring-tool-suite


【解决方案1】:

来自链接的JIRA issue@AndreiStefan 的解决方法:

打开“窗口>>首选项” 转到“Java >> 编辑器内容辅助 >> 高级” 您将看到一个“Jar Type Search”提案提供者。在顶部和底部禁用它。 这应该在您的整个工作区中禁用它。

【讨论】:

  • 是的,这似乎成功了。自从我问这个问题后,依赖就没有回来了。
猜你喜欢
  • 2011-06-25
  • 1970-01-01
  • 2011-08-30
  • 2012-09-17
  • 1970-01-01
  • 2015-12-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多