赞
踩
我有一个我在Jenkins上运行的maven项目。项目包含项目根目录下资源文件夹中的config.properties文件。有时当我编译&运行该项目,我收到一个错误:Exception: java.io.FileNotFoundException: property file 'config.properties' not found in the classpath
用日食,当我做一个'项目>清洁',我摆脱了这个错误。但是,因为我使用批处理文件在Jenkins中运行此项目,所以我不能'项目>清理'。作为一个肮脏的解决方法,我在eclipse中打开该项目,做一个'项目>清理',然后在Jenkins上重新构建该项目,此后工作正常。
在Jenkins的批处理文件中运行它时,我怎样才能'Project'Clean'?
更新:
这就是我的项目结构。 config.properties文件保存了我的环境详细信息,执行测试。
pom.xml中:
maven-compiler-plugin
3.3
1.8
1.8
org.apache.maven.plugins
maven-surefire-plugin
2.18.1
100
testng.xml
UTF-8
project.local
project
file:${project.basedir}/lib
junit
junit
3.8.1
test
commons-io
commons-io
2.4
org.jsoup
jsoup
1.8.3
org.apache.poi
poi
3.9
org.apache.poi
poi-scratchpad
3.9
org.apache.poi
poi-ooxml
3.9
org.testng
testng
6.8.5
test
org.apache.httpcomponents
httpclient
4.4.1
com.fasterxml.jackson.core
jackson-databind
2.6.3
com.relevantcodes
extentreports
2.41.2
com.local
ewsc
1.0
com.local
msgparser
1.14
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。