Mark is a graph advocate and field engineer for Neo Technology, the company behind the Neo4j graph database. As a field engineer, Mark helps customers embrace graph data and Neo4j building sophisticated solutions to challenging data problems. When he's not with customers Mark is a developer on Neo4j and writes his experiences of being a graphista on a popular blog at http://markhneedham.com/blog. He tweets at @markhneedham. Mark is a DZone MVB and is not an employee of DZone and has posted 527 posts at DZone. You can read more from them at their website. View Full User Profile

IntelliJ: Adding resources with unusual extensions onto the classpath

06.10.2011
| 4623 views |
  • submit to reddit

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 IntelliJk 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:

Intellij

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!

 

From http://www.markhneedham.com/blog/2011/06/09/intellij-adding-resources-with-unusual-extensions-onto-the-classpath/

Published at DZone with permission of Mark Needham, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

Sirikant Noori replied on Sat, 2012/03/31 - 2:39pm

The description above the pattern field contains a tip about '!' usage, so in the end probably the best pattern that can be used in the Idea is this:

!?*.java

Everything that is not .java source file is resource.

jsp

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.