My project directory structure (in Eclipse):
MyProject/
src/main/Java
src/main/resources
stories
file.story
In Main class i have return below line which return null while excuting main class through MAVEN
String folderName = "stories";
URL appURL = ClassLoader.getSystemClassLoader().getResource(folderName);
While executing through maven, appURL returns NULL.
By reading one post on Stackoverflow i got to kanow that, i am running the webapp on server but there is no reference to the resources on the server so we need to add some code in POM.xml file. i have added below code in POM.xml file but still its not working :(
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>stories</include>
</includes>
</resource>
</resources>
Looking for help.