Maven 打包错误:%JAVA_HOME%/../lib/tools.jar

前提条件:

1、确保你安装的JDK是1.4及以上版本。

2、确保你的Eclipse使用的JDK和你安装的是同一个版本的

以上两点保证了,修改起来绝对神速。

修改Eclipse.ini文件配置:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-Xmx512m

我的环境是JDK1.7_51,-Dosgi.requiredJavaVersion=1.6 导致打包失败。

打包成功的日志:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building fmcgwms Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for sun.misc:BASE64Decoder:jar:1.2 is missing, no dependency information available
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ fmcgwms ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO] Copying 56 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ fmcgwms ---
[INFO] Compiling 1 source file to C:\DEVELOPER_WORKSPACE\DEVELOPERS\ECLIPSE\eclipse_luna_SR2\workspace\fmcgwms\target\classes
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ fmcgwms ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ fmcgwms ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ fmcgwms ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ fmcgwms ---
[INFO] Packaging webapp
[INFO] Assembling webapp [fmcgwms] in [C:\DEVELOPER_WORKSPACE\DEVELOPERS\ECLIPSE\eclipse_luna_SR2\workspace\fmcgwms\target\fmcgwms-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\DEVELOPER_WORKSPACE\DEVELOPERS\ECLIPSE\eclipse_luna_SR2\workspace\fmcgwms\src\main\webapp]
[INFO] Webapp assembled in [1524 msecs]
[INFO] Building war: C:\DEVELOPER_WORKSPACE\DEVELOPERS\ECLIPSE\eclipse_luna_SR2\workspace\fmcgwms\target\fmcgwms-0.0.1-SNAPSHOT.war
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored 
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true')
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.043s
[INFO] Finished at: Tue Aug 16 14:09:51 CST 2016
[INFO] Final Memory: 19M/177M
[INFO] ------------------------------------------------------------------------

 

转载于:https://my.oschina.net/boonya/blog/733379

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值