IntelliJ: Adding resources with unusual extensions onto the classpath
We’re making use of MarkLogic and therefore xquery on the project I’m currently working on and recently wanted to add our xquery setup files onto the classpath so they could be used in a test.
We added them into 'src/main/resources' and set that as a source path in IntelliJ assuming that was all we needed to do.
Despite doing that our test kept failing because it couldn’t locate the files on the classpath.
Charles eventually came across the compiler resource patterns settings which are accessible from the Preferences > Compiler menu:
We had to add "*.xqy" to the end of the list of patterns to get our files picked up.
We came across another file extension that we needed to be on the classpath about 10 minutes later and obviously solved it much quicker that time!
About the author
I'm currently working on short form content at ClickHouse. I publish short 5 minute videos showing how to solve data problems on YouTube @LearnDataWithMark. I previously worked on graph analytics at Neo4j, where I also co-authored the O'Reilly Graph Algorithms Book with Amy Hodler.