Maven启动编译错误,请高人帮忙看看,已经困恼我好几天啦。

NickCheng 2013-12-30 05:45:16
Maven项目启动的时候报错(警告)如下:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - cn.com.etianan.ebusiness:online:war:0.0.2-SNAPSHOT
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory E:\etianan\online\target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'GBK' encoding to copy filtered resources.
[INFO] Copying 54 resources
[INFO] snapshot cn.com.etianan.ebusiness:basicBizInfo:0.0.2-SNAPSHOT: checking for updates from nexus
[WARNING] repository metadata for: 'snapshot cn.com.etianan.ebusiness:basicBizInfo:0.0.2-SNAPSHOT' could not be retrieved from repository: nexus due to an error: Error transferring file: Connection reset
[INFO] Repository 'nexus' will be blacklisted
[WARNING] POM for 'jfree:jfreechart-experimental:pom:1.0.9:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'jfree:jfreechart-swt:pom:1.0.9:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 57 source files to E:\etianan\online\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[68,45] 找不到符号
符号: 类 GeZhUser
位置: 软件包 cn.com.etianan.ebusiness.sale.domain
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[73,45] 找不到符号
符号: 类 GeZhUserProposal
位置: 软件包 cn.com.etianan.ebusiness.sale.domain
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[74,45] 找不到符号
符号: 类 GeZhUserProposalId
位置: 软件包 cn.com.etianan.ebusiness.sale.domain
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\CreateImageServlet.java:[16,15] 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\NoCarMobileSaleAction.java:[3017,41] 找不到符号
符号: 方法 sendActiveCode2(cn.com.etianan.ebusiness.service.user.personal.domain.GeUserPersonal,java.lang.String,java.lang.String)
位置: 接口 cn.com.etianan.ebusiness.service.user.personal.service.facade.GeUserPersonalService
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[1380,36] 找不到符号
符号: 方法 findBussinessSaleManInfoByChannel(java.lang.String,java.lang.String)
位置: 接口 cn.com.etianan.ebusiness.sale.service.facade.CarProposalService
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[1835,2] 找不到符号
符号: 类 GeZhUser
位置: 类 cn.com.etianan.ebusiness.sale.web.WapCarProposalAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[1835,22] 找不到符号
符号: 类 GeZhUser
位置: 类 cn.com.etianan.ebusiness.sale.web.WapCarProposalAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[1993,2] 找不到符号
符号: 类 GeZhUser
位置: 类 cn.com.etianan.ebusiness.sale.web.WapCarProposalAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[1993,22] 找不到符号
符号: 类 GeZhUser
位置: 类 cn.com.etianan.ebusiness.sale.web.WapCarProposalAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[2082,7] 找不到符号
符号: 类 BASE64Decoder
位置: 类 cn.com.etianan.ebusiness.sale.web.WapCarProposalAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\WapCarProposalAction.java:[2082,41] 找不到符号
符号: 类 BASE64Decoder
位置: 类 cn.com.etianan.ebusiness.sale.web.WapCarProposalAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2409,12] 警告:sun.misc.BASE64Encoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2409,49] 警告:sun.misc.BASE64Encoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2621,12] 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2621,49] 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2744,9] 找不到符号
符号: 类 GeZhUserProposal
位置: 类 cn.com.etianan.ebusiness.service.user.personal.web.GeOrderAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2744,64] 找不到符号
符号: 类 GeZhUserProposal
位置: 类 cn.com.etianan.ebusiness.service.user.personal.web.GeOrderAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2748,5] 找不到符号
符号: 类 GeZhUserProposal
位置: 类 cn.com.etianan.ebusiness.service.user.personal.web.GeOrderAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2748,45] 找不到符号
符号: 类 GeZhUserProposal
位置: 类 cn.com.etianan.ebusiness.service.user.personal.web.GeOrderAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2749,5] 找不到符号
符号: 类 GeZhUserProposalId
位置: 类 cn.com.etianan.ebusiness.service.user.personal.web.GeOrderAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[2749,31] 找不到符号
符号: 类 GeZhUserProposalId
位置: 类 cn.com.etianan.ebusiness.service.user.personal.web.GeOrderAction
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[3129,18] 软件包 cmb.netpayment 不存在
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[3129,52] 软件包 cmb.netpayment 不存在
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[3139,42] 找不到符号
符号: 方法 findGeOrderByStatus(java.lang.String)
位置: 接口 cn.com.etianan.ebusiness.sale.service.facade.GeOrderService
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeUserPersonalAction.java:[799,40] 找不到符号
符号: 方法 sendActiveCode2(cn.com.etianan.ebusiness.service.user.personal.domain.GeUserPersonal,java.lang.String,java.lang.String)
位置: 接口 cn.com.etianan.ebusiness.service.user.personal.service.facade.GeUserPersonalService
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeUserPersonalAction.java:[888,36] 找不到符号
符号: 方法 sendActiveCodeToMail(java.lang.String,java.lang.String,java.lang.String)
位置: 接口 cn.com.etianan.ebusiness.service.user.personal.service.facade.GeUserPersonalService
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\CreateImageServlet.java:[82,5] 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\sale\web\CreateImageServlet.java:[82,33] 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\common\payment\web\NoCarMobilePaymentAction.java:[1178,11] 警告:sun.misc.BASE64Encoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\common\payment\web\NoCarMobilePaymentAction.java:[1178,48] 警告:sun.misc.BASE64Encoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\common\payment\web\NoCarMobilePaymentAction.java:[1220,11] 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
[ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\common\payment\web\NoCarMobilePaymentAction.java:[1220,48] 警告:sun.misc.BASE64Decoder 是 Sun 的专用 API,可能会在未来版本中删除
[INFO] 33 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
...全文
14384 19 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
在本机搭建一个nexus库,意义不大。nexus就相当于maven的私服。在本机用没特别大的意义。不如直接下载文件到本地简单。
  • 打赏
  • 举报
回复
groupId:artifactId:type:classifier)' must be unique 不唯一,所以操作下面的错了。
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 5 楼 huxiweng 的回复:
[quote=引用 4 楼 czp0608 的回复:] [quote=引用 3 楼 huxiweng 的回复:] 试试在确保Java代码和编译都没有问题的前提下,利用projec->clean->cleanAll清理,然后在尝试下。 试试升级maven版本
麻烦你再看看这是怎么回事呀? 现在一直动不了,就一直29%,这种情况咋处理?[/quote] 没报错就再等等。有外部的引用库吗?[/quote] 没有引用外部的库,目前只想在本地跑起来。
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 1 楼 fangmingshijie 的回复:
maven改升级了,什么版本?据说2.3以后就没这个问题了。
http://maven.apache.org/download.cgi maven 2.2.1以上版本都是3以上的了,下了个3.1.1的,再走又报错了。 [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for cn.com.etianan.ebusiness:online:war:0.0.2-SNAPSHOT [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:basicBizInfo:jar -> duplicate declaration of version (?) @ line 197, column 15 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:claimService:jar -> duplicate declaration of version (?) @ line 250, column 15 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:productDirectory:jar -> duplicate declaration of version (?) @ line 254, column 15 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:permission:jar -> duplicate declaration of version (?) @ line 279, column 15 [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cn.com.etianan.ebusiness:payment:jar -> duplicate declaration of version (?) @ line 287, column 15 [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.mortbay.jetty:maven-jetty-plugin @ line 360, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building online 0.0.2-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] Downloading: http://localhost:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom [INFO] Downloading: http://maven-beabuild-plugin.googlecode.com/svn/maven2/releases/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom [INFO] Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:10.535s [INFO] Finished at: Tue Dec 31 11:21:09 GMT+08:00 2013 [INFO] Final Memory: 2M/4M [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to nexus (http://localhost:8081/nexus/content/groups/public): Connection to http://localhost:8081 refused: Connection refused: connect -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
teemai 2013-12-31
  • 打赏
  • 举报
回复
引用 4 楼 czp0608 的回复:
[quote=引用 3 楼 huxiweng 的回复:] 试试在确保Java代码和编译都没有问题的前提下,利用projec->clean->cleanAll清理,然后在尝试下。 试试升级maven版本
麻烦你再看看这是怎么回事呀? 现在一直动不了,就一直29%,这种情况咋处理?[/quote] 没报错就再等等。有外部的引用库吗?
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 3 楼 huxiweng 的回复:
试试在确保Java代码和编译都没有问题的前提下,利用projec->clean->cleanAll清理,然后在尝试下。 试试升级maven版本
麻烦你再看看这是怎么回事呀? 现在一直动不了,就一直29%,这种情况咋处理?
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 18 楼 eastoneking 的回复:
[quote=引用 13 楼 czp0608 的回复:] [quote=引用 10 楼 eastoneking 的回复:] 源代码里是不是有中文? 改改源代码的编码格式,或者删了中文部分看看效果。
你是指什么的源代码呢?我所跑项目的、还是maven的?[/quote] 从 [ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[73,45] 找不到符号 这个部分看,GeOrderAction.java这个文件的73行45字符无法识别。 以前,我的项目合并了别人的代码,一部分gbk一部分utf8编码,用maven的时候就会报这个错。

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
上面是pom里面指定源代码字符集的地方 还有base64那个最好换一个实现,jdk里就用,不用sun的包的,apache-commons也有,都很简单。[/quote] 好的,谢谢,现在的问题已经不是这个了,升级maven之后!
临碣 2013-12-31
  • 打赏
  • 举报
回复
引用 13 楼 czp0608 的回复:
[quote=引用 10 楼 eastoneking 的回复:] 源代码里是不是有中文? 改改源代码的编码格式,或者删了中文部分看看效果。
你是指什么的源代码呢?我所跑项目的、还是maven的?[/quote] 从 [ERROR] \etianan\online\src\main\java\cn\com\etianan\ebusiness\service\user\personal\web\GeOrderAction.java:[73,45] 找不到符号 这个部分看,GeOrderAction.java这个文件的73行45字符无法识别。 以前,我的项目合并了别人的代码,一部分gbk一部分utf8编码,用maven的时候就会报这个错。

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
上面是pom里面指定源代码字符集的地方 还有base64那个最好换一个实现,jdk里就用,不用sun的包的,apache-commons也有,都很简单。
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
“groupId:artifactId:type:classifier”这个是什么呀?没看懂!
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 15 楼 fangmingshijie 的回复:
没有pom.xml?
有pox.xml,是没有搜索到“http://localhost:8081/nexus/content/groups/public” 这个路径地址。我感觉是在pox.xml配置的,但没有搜索到。不过有

<repository>
			<id>nexus</id>
			<name>Team Nexus Repository</name>
			<url>http://10.0.12.37:9081/nexus/content/groups/public</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
等配置 但都已经注释了。
  • 打赏
  • 举报
回复
没有pom.xml?
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 12 楼 fangmingshijie 的回复:
pom文件内容里有没有 <repositories> <repository> <id>nexus</id> <name>local private nexus</name> <url>http://localhost:8081/nexus/content/groups/public</url> </repository> </repositories> 这些东西?
eclipse搜索没有搜到,不知在哪配了呀! 跟settings.xml有关吗?
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 10 楼 eastoneking 的回复:
源代码里是不是有中文? 改改源代码的编码格式,或者删了中文部分看看效果。
你是指什么的源代码呢?我所跑项目的、还是maven的?
  • 打赏
  • 举报
回复
pom文件内容里有没有 <repositories> <repository> <id>nexus</id> <name>local private nexus</name> <url>http://localhost:8081/nexus/content/groups/public</url> </repository> </repositories> 这些东西?
NickCheng 2013-12-31
  • 打赏
  • 举报
回复
引用 9 楼 fangmingshijie 的回复:
在本机搭建一个nexus库,意义不大。nexus就相当于maven的私服。在本机用没特别大的意义。不如直接下载文件到本地简单。
我本地没有搭建nexus库,代码都是迁移过来的,文件都已经下载到m2.\repository下啦,目前暂时是想在本地运行起来,之后再搭建测试服务器的。 对maven不熟悉啊,不知道为啥还好出现 http://localhost:8081/nexus/content/groups/public): Connection to http://localhost:8081 refused: Connection refused.
临碣 2013-12-31
  • 打赏
  • 举报
回复
源代码里是不是有中文? 改改源代码的编码格式,或者删了中文部分看看效果。
teemai 2013-12-30
  • 打赏
  • 举报
回复
试试在确保Java代码和编译都没有问题的前提下,利用projec->clean->cleanAll清理,然后在尝试下。 试试升级maven版本
NickCheng 2013-12-30
  • 打赏
  • 举报
回复
引用 1 楼 fangmingshijie 的回复:
maven改升级了,什么版本?据说2.3以后就没这个问题了。
版本是:apache-maven-2.2.1 好的,先升级再试下啦,谢谢!
  • 打赏
  • 举报
回复
maven改升级了,什么版本?据说2.3以后就没这个问题了。

67,550

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧