surfire ${argLine} 参数报错

本文记录了一次使用Maven进行项目构建时遇到的问题,主要错误为NoClassDefFoundError及ClassNotFoundException,涉及JDK版本和参数配置问题。文章详细展示了错误堆栈跟踪,并探讨了可能的原因与解决方案。

 T E S T S
-------------------------------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: ${argLine}
Caused by: java.lang.ClassNotFoundException: ${argLine}
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: ${argLine}.  Program will exit.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.920s
[INFO] Finished at: Wed Oct 25 15:16:56 CST 2017
15.981: [GC [PSYoungGen: 370331K->40190K(536000K)] 488760K->158618K(862208K), 0.0464780 secs] [Times: user=0.27 sys=0.05, real=0.05 secs] 
16.028: [Full GC (System) [PSYoungGen: 40190K->0K(536000K)] [PSOldGen: 118428K->50488K(326208K)] 158618K->50488K(862208K) [PSPermGen: 28192K->28192K(59200K)], 0.1741760 secs] [Times: user=0.17 sys=0.00, real=0.17 secs] 
[INFO] Final Memory: 57M/842M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project phonepad: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was /bin/sh -c cd /opt/jenkinsslave/workspace/ftis20171025 && /usr/java/jdk1.6.0_45/jre/bin/java '${argLine}' -Xms896m -Xmx1550m -Xss1m -XX:PermSize=64M 							-XX:MaxPermSize=512m -javaagent:/opt/.m2/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/opt/jenkinsslave/workspace/ftis20171025/target/jacoco.exec -jar /opt/jenkinsslave/workspace/ftis20171025/target/surefire/surefirebooter676387084464067202.jar /opt/jenkinsslave/workspace/ftis20171025/target/surefire/surefire1951440153164636820tmp /opt/jenkinsslave/workspace/ftis20171025/target/surefire/surefire_08507274780822118877tmp
[ERROR] -> [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/PluginExecutionException

离线模式添加这个参数有问题,jdk 版本较低也有问题。



评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值