iteye_19183 2009-07-16 05:17
浏览 1023
已采纳

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 05:18
    关注

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

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

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部