This was recently discussed in the following thread:
Subject: How to access a file that's inside an executable jar assembly
From: Ed Young
Date: Fri, Apr 27, 2007 at 11:51 AM
To: Maven Users List
Check the archive or Nabble.
Wayne
On 5/3/07, sudhakar <[EMAIL PROTECTED]> wrote:
I'm using Eclipse with the Eclipse maven 2 plugin to develop a Java EE
application. My code reads in a properties file located in the
src/main/resources/ directory.
FileInputStream in = new
FileInputStream("src/main/resources/META-INF/config.properties");
I can run "mvn package" from with Eclipse and the tests run fine
indicating that the config.properties file is being read in correctly.
Now when I deploy to the server and access the application I get a
config.properties file not found error message in the server log.
I noticed that the config.properties is located in the META-INF
directory in the project root on the server.
If I relocate the META-INF folder to the projects root in the eclipse
project, maven does not include it in the jar package. I'm not sure what
is the correct way to do this and would appreciate any pointers.
Thanks
-sud
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]