Exclude files from jar intellij

I'm working on something that adds on to a project that I can't run easily for testing, so I have some test files that emulate it through command prompt(roughly), and I was wondering how I could exclude those files from the final jar. They're already in a test directory. The main problem is they wont compile when I'm making a build, because I need to change the type from my test class to the actual production class which breaks things in the test class.
Was this page helpful?