Maven jar not able to read the data from TestData sheets from src/test/resources folder
<p>I have a maven test automation project developed using selenium and testng.
This is what I am doing with my framework:</p>

<ol>
<li>I have main class in src/main/java and within the main class I trigger methods to dynamically create and run the testng xml.</li>
<li>The tests to be run are determined from the XMLFlag.xls and TestNG.xlsx sheets in src/test/resources.</li>
<li>I am able to successfully run the test scripts using "mvn test" command.</li>
</ol>

<p>Now I want to run my entire project by creating a jar.
I am able to create a jar with all dependencies using "maven-assembly-plugin" but I am unable to run the scripts because the test data sheets in src/test/resources are not identified.</p>

<p>I am getting an error message as below:-</p>

<blockquote>
  <p>Error message : .\src\test\resources\XMLFlag.xls (The system cannot
  find the path specified)</p>
</blockquote>

<p>Can you guys kindly help me out!
 <a href="http://i.stack.imgur.com/V9eR2.png" rel="nofollow">Project Structure </a></p>

<p>I have mentioned the paths to XMLFlag.xls and TestNG.xlsx in my code as below:</p>

<pre><code>FileInputStream fis = new FileInputStream(".\\src\\test\\resources\\XMLFlag.xls");
FileInputStream fis = new FileInputStream(".\\src\\test\\resources\\TestNG.xlsx");
</code></pre>

<p>I would like the jar to read the required test data from these sheets and execute the scripts.</p>

<p>Thank you.</p>