I'm using this code in order to read a file content in a Maven module. The file is stored in one directory up to the working directory.
String configFilePath = System.getProperty("user.dir") + "../conf/gce-configuration.xml";
File configFile = new File(configFilePath);
Then when I try to read file it gives me file not found error.
file cannot be found : /home/xxxx/bin../conf/gce-configuration.xml
I tried different ways but still I'm getting this error. What I'm doing wrong here?
Edit: It seems like I forgot to mention the file name in assembly/bin.xml in maven module. So the xml file does not include to package. My bad!