开发者

Maven test failure xml FileNotFoundException

开发者 https://www.devze.com 2023-01-01 00:28 出处:网络
My Maven build is failing on Hudson with a FileNotFoundException, I do not get the same failure through NetBeans. The FileNotFoundException is for some xml files in the same packages as my test classe

My Maven build is failing on Hudson with a FileNotFoundException, I do not get the same failure through NetBeans. The FileNotFoundException is for some xml files in the same packages as my test classes themselves. It would appear these are not getting copied as part of the build in the same way the class开发者_如何学运维 files are. Do I have to add something to my POM for the xml files to be copied?

If any more information is required please let me know, I wanted to keep the question short incase it was something simple.


My Maven build is failing on Hudson with a FileNotFoundException, I do not get the same failure through NetBeans.

That's possible and you should always run Maven before to commit. Having code that compile under your IDE is not enough, the Maven build is the "master".

The FileNotFoundException is for some xml files in the same packages as my test classes themselves

If your XML files are located next to you tests classes in src/test/java, then they won't get copied to target/test-classes. Test resources should go in src/test/resources if you want them to end up in target/test-classes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号