0 Replies Latest reply on May 16, 2014 3:35 PM by Filipe Ferraz

    Is possible to reference a library from module or deployment folder inside a war?

    Filipe Ferraz Newbie

      I have some war applications that use commons libraries and I'm trying to reference the jar file from the applications.

      I have the following scenarios:

      1) The app1.war and app2.war have a MANIFEST.MF file referencing a module (module1). In persistence.xml I use the option <jar-file></jar-file> to reference the jar. In this scenario I don't find a way to reference the jar from the module. I have to list all entities in persistence.xml file to work.

           Problem: If I change the library in module and some entities are excluded the applications has to be updated (not necessary if in jar-file option I give the path to the jar in library folder).

      2) The app1.war and app2.war have a MANIFEST.MF file referencing a library (library.jar) in deployment folder (Dependencies: deployment.library.jar). In persistence.xml I try to use <jar-file>deployment/library.jar</jar-file> but don't work. I have to list all entities in persistence.xml file to work.

           Problem: The same of 1.

       

      Anyone know a solution or can help solve this problems?