I'm creating a plugin to de reflected and call by main application. This plugin uses xml file and I want to make it embedded resource. I build plugin as artifact (JAR). My actions:
1) Put xml file to directory 'trunk/res' configured as 'source root'
;
2) Performed 'make module'
action for the module in which directory 'trunk/res' is;
3) Into the plugin I access xml file through file path dom = db.parse("trunk//res//resource.xml");
But when I call plugin from the main application I get this exception about system cannot find the file 'MainApp/trunk/trunk/res/resource.xml'
.
I guess I don't extract resource properly, but how to do it correctly?