缺少工件log4j:log4j:bundle:1.2.16在Eclipse中使用Maven时的简单示例

时间:2021-12-04 23:13:48

I have created simple project from maven-archetype-quickstart under Eclipse Indigo, then I went to pom.xml gui editor and in dependencies tab added dependency on log4j-1.2.16 by search in appropriate dialog.

我在Eclipse Indigo下创建了maven-archetype-quickstart的简单项目,然后我去了pom.xml gui编辑器,在依赖选项卡中通过搜索在相应的对话框中添加了对log4j-1.2.16的依赖。

Now my pom.xml includes tags

现在我的pom.xml包含标签

<dependency>
    <groupId>log4j</groupId>
    <artifactId>log4j</artifactId>
    <version>1.2.16</version>
    <type>bundle</type>
</dependency>

But Eclipse underlines first <dependency> tag and says Missing artifact log4j:log4j:bundle:1.2.16.

但Eclipse强调了第一个 标记,并说Missing artifact log4j:log4j:bundle:1.2.16。

Why?

为什么?

The Maven plugin for Eclipse is m2e - Maven Integration for Eclipse version 1.0.100.20110804-1717

Eclipse的Maven插件是m2e - Maven Integration for Eclipse版本1.0.100.20110804-1717

1 个解决方案

#1


31  

Remove

去掉

<type>bundle</type>

and it will be fine.

这没关系。

log4j:log4j is actually of type jar.

log4j:log4j实际上是jar类型。

#1


31  

Remove

去掉

<type>bundle</type>

and it will be fine.

这没关系。

log4j:log4j is actually of type jar.

log4j:log4j实际上是jar类型。