iteye_19183 2009-07-16 13:17
浏览 1020
已采纳

mvn install时提示 软件包 org.apache.log4j 不存在

D:\maven\simple-weather>mvn install
[INFO] Scanning for projects...

[INFO] -------------------------------------------------------------------------

[INFO] Building simple-weather
[INFO] task-segment: [install]

[INFO] -------------------------------------------------------------------------

[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 5 source files to D:\maven\simple-weather\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\WeatherForm
atter.java:[7,24] 软件包 org.apache.log4j 不存在

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\WeatherForm
atter.java:[13,23] 找不到符号
符号: 类 Logger
位置: 类 org.sonatype.mavenbook.weather.WeatherFormatter

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\YahooParser
.java:[7,24] 软件包 org.apache.log4j 不存在

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\YahooParser
.java:[14,23] 找不到符号
符号: 类 Logger
位置: 类 org.sonatype.mavenbook.weather.YahooParser

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\YahooRetrie
ver.java:[7,24] 软件包 org.apache.log4j 不存在

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\YahooRetrie
ver.java:[11,23] 找不到符号
符号: 类 Logger
位置: 类 org.sonatype.mavenbook.weather.YahooRetriever

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\Main.java:[
5,24] 软件包 org.apache.log4j 不存在

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\WeatherForm
atter.java:[13,36] 找不到符号
符号: 变量 Logger
位置: 类 org.sonatype.mavenbook.weather.WeatherFormatter

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\YahooParser
.java:[14,36] 找不到符号
符号: 变量 Logger
位置: 类 org.sonatype.mavenbook.weather.YahooParser

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\YahooRetrie
ver.java:[11,36] 找不到符号
符号: 变量 Logger
位置: 类 org.sonatype.mavenbook.weather.YahooRetriever

D:\maven\simple-weather\src\main\java\org\sonatype\mavenbook\weather\Main.java:[
12,16] 找不到符号
符号: 变量 PropertyConfigurator
位置: 类 org.sonatype.mavenbook.weather.Main

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Jul 16 13:00:39 CST 2009
[INFO] Final Memory: 5M/10M
[INFO] ------------------------------------------------------------------------

D:\maven\simple-weather>

  • 写回答

2条回答 默认 最新

  • wanghaolovezlq 2009-07-16 13:18
    关注

    simple-weather这个工程依赖log4j啊,你没加入吧

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵