• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Catch Try, Please change your name according to the Naming Policy
 
reply
    Bookmark Topic Watch Topic
  • New Topic