Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding properties files to EAR classpath (Bonus points for including maven!)

 
Phil Potter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings all,

My google-fu has failed, so I thought I'd ask around and see if anyone would be kind enough to offer any helpful advice.

I'm struggling to add a properties file to my EAR's classpath.

I have (for the sake of argument) a log4j.xml which lives @ META-INF/log4j.xml.

I create a META-INF/MANIFEST.MF file inside my EAR with the following contents:

Manifest-Version: 1.0

Archiver-Version: Plexus Archiver

Created-By: Apache Maven

Built-By: catch

Build-Jdk: 1.6.0_20

Class-Path: META-INf/log4j.xml

However, I still can't access the properties file. If I move the file to the root of the EAR (and remove the contents of the Class-Path entry) I can access the EAR.

For extra points, what's the magic setting to get the maven-ear-plugin to pick this up and add it to the classpath? Or do I need to manually specify my MANIFEST.MF and not rely on maven to generate it?

Any tips or tricks greatly appreciated.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Catch Try, Please change your name according to the Naming Policy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic