title: Can a maven dependency read a property-file in the main project?
body: <p>I have two maven projects let's call them A and B. B is a dependency in A. Project B is an annotation processor which, among other things, contains a property reader looking like this</p>
  <pre><code>public class PropertyReader {
      private final Properties properties;
  
      public PropertyReader() throws IOException {
          InputStream is = getClass().getClassLoader().getResourceAsStream(&quot;projectB.properties&quot;);
          this.properties = new Properties();
          this.properties.load(is);
      }
  
      public String getProperty(String propertyName) {
          return this.properties.getProperty(propertyName);
      }
  }
  </code></pre>
  <p>In project A I have <code>projectB.properties</code> stored under <code>src/main/resources</code>. When I try to build project A, I get the following error when creating the above InputStream:</p>
  <p><code>Fatal error compiling: java.lang.NullPointerException: inStream parameter is null</code></p>
  <p>How can my project B read a properties file which is located in project A?</p>