在maven / linux / tomcat上没有很好地解释Javaagent路径

时间:2014-04-21 12:49:57

标签: java linux maven urlencode maven-surefire-plugin

我不知道我的CI服务器上发生了什么,但也许有人可以提供帮助。

我使用jacoco代理配置了一个maven项目weaved surefire test: 工作代理行(在我的笔记本电脑上正确处理)包括路径:

javaagent:/var/lib/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.7.0.201403182114/org.jacoco.agent-0.7.0.201403182114-runtime.jar=destfile=/var/lib/jenkins/jobs/Osgiliath enterprise/workspace/net.osgiliath.framework/net.osgiliath.features.karaf-features/net.osgiliath.features.karaf-features.itests/net.osgiliath.features.karaf-features.itests.cdi/target/jacoco-ut.exec,append=true,includes=net.osgiliath.features.karaf-features.itests.cdi.*,excludes=*.itests.*:*.mock.*:*.model.*:*.coverage.*"

问题是当我在我的CI服务器上启动这些测试时(Fedora 19,Oracle Java 1.7,surefire 2.17,Tomcat,Maven 3.2.1由Jenkins提供),相同的行不能很好地解释为surefire或failafe,它成为:Error: Could not find or load main class "-javaagent:.var.lib.jenkins..m2.repository.org.jacoco.org.jacoco.agent.0.7.0.201403182114.org.jacoco.agent-0.7.0.201403182114-runtime.jar=destfile=.var.lib.jenkins.jobs.Osgiliath enterprise.workspace.target.jacoco-it.exec,append=true,includes=net.osgiliath.messaging.*,excludes=*.itests.*:*.mock.*:*.model.*:*.coverage.*"

注意argLine路径中的点而不是斜线。

有人知道这个问题可以从何而来?这真的很烦人,因为我无法将CI服务器用于这种项目。

提前谢谢

2 个答案:

答案 0 :(得分:0)

好的,这是我的linux上的编码问题:X13 ...而不是UTF-8。

我现在看到绿色按钮:D

答案 1 :(得分:0)

我的开发团队遇到了类似的错误。但在我们的例子中,它不仅仅是用构建机器的编码修复(编码从一开始就是UTF-8)。我们还必须将surefire配置放入一个行。