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
.
精彩评论