0

I want to set up a new bare EAR with an EJB project and a WAR project. All libraries, in my understanding, should be in EarContent/APP-INF/lib and be exported as "EAR libraries" in both dependant projects. However, just putting JARs in the lib directory accomplishes nothing.

I read that I must edit the MANIFEST.MF file to include classpath for the JARs; to avoid manually editing the file, I read here -> http://pl.cs.jhu.edu/oose/resources/j2ee-tutorial/page.php?p=6 that I should find Deployment Assembly->Manifest Entries and from there add the required JARs. Problem is, I don't have the Manifest Entries tab nor any "Add manifest entries" button, or similar!

So, how do I automatically generate manifest entries? Or, is there some other optimal way to add libraries to an EAR project and its dependencies?

Alessandro
  • 601
  • 3
  • 11
  • 26

2 Answers2

0

My fault. The "Ear libraries" property was incorrectly set to "lib" while it should have been "APP-INF/lib".

This makes EAR libraries work as expected, but still I don't have the "Manifest Entries" option!

Alessandro
  • 601
  • 3
  • 11
  • 26
  • Why do you need the option if the the EAR (and its libraries) works as expected and it has ultimately solved your initial issue(s)? – Jacek Laskowski Mar 13 '13 at 00:25
  • It probably is just something that was removed in later versions of Eclipse, but I still find it strange. – Alessandro Mar 13 '13 at 16:13
-1

Use maven for dependency management and packaging, it will generate the ear for you

Gab
  • 7,869
  • 4
  • 37
  • 68
  • Even though it might solve the problem of dependency management it surely doesn't solve the initial problem. It reminds me answers like "If you Java app is slow use C or even assembler" (!) – Jacek Laskowski Mar 13 '13 at 00:27