title: How to include resources in IntelliJ Gradle JavaFx project?
body: <p>I am building a JavaFx project in IntelliJ using the Gradle project structure and a JavaFx Gradle plugin:</p>
  
  <p><a href="https://bitbucket.org/shemnon/javafx-gradle/overview" rel="nofollow">Gradle JavaFx Plugin</a></p>
  
  <p>I was wondering how to include resource files on the classpath.  Specifically, I am currently trying to define a log4j2 configuration JSON file that log4j2 will load at runtime.  I am currently getting the following message when I run my application:</p>
  
  <blockquote>
    <p>ERROR StatusLogger No log4j2 configuration file found.  Using default
    configuration: logging only errors to the console.</p>
  </blockquote>
  
  <p>I currently have the log4j2.json file located in src/main/resources/log4j2.json</p>
  
  <p>I am able to load FXML files using <code>getClass().getResources().load(...)</code> from my <code>Application</code> class, so it appears that files within the "resources" directory are being packaged, but it seems they are not accessible via the classpath that log4j2 is using to load a configuration file.</p>
  
  <p>Any idea what I need to do to have log4j2.json and other similar files available to the source code with a JavaFx project using the Gradle plugin?</p>