1

So we have a project that is basically nothing but test files and other projects depend on it to run tests. Problem in the past has been that these items are being unpacked in locations outside of the target directory. That means you end up with modified files and new files, none of which are committed. The files are XML and are used to generate other files. What is the Maven standard location for these files? I'm looking here and I don't see anything that jumps out at me as a conventional location. I can wing it, of course, but I'd prefer to use a standard if it exists:

https://cwiki.apache.org/confluence/display/MAVEN/Maven+Properties+Guide

I'm considering this location:

${project.build.directory}/generated-test-resources/resources
  • What does it mean: Other projects depend on it? So test files which are needed by tests of project A are located in a project B ? – khmarbaise Oct 09 '17 at 18:14

1 Answers1

1

The standard directory for test resoures like xml files is:

/src/test/resources

The way to include these test-only kind of projects is by using test-jar as described here.

Niklas P
  • 3,427
  • 2
  • 15
  • 19
  • Yup. We are doing that already. ..but the problem is that it has plain text files in it and they need to be extracted in order to be useful to the tests. I'm looking for any kind of standard or convention that "Says, put it here!!" – user447607 Oct 11 '17 at 04:17
  • Why do plain text files need to be extracted to be useful to the tests? Are they zipped and need be unzipped/extracted? Why can't they be used from that directory? – Niklas P Oct 11 '17 at 05:01
  • Yes, they are being unpacked from a jar file. –  Oct 11 '17 at 20:00