Hello Prabhu, Your problem isn't 100% clear to me yet. I'll try to anwser, but please explain more about your problem if this doesn't help.
When you use maven the jar-files should not be within your project directory structure. The jar-files are in your local M2-repository and by declaring dependencies in your pom those jar-files will be made available on the classpath during builds by maven. Only during the packaging of your project do the files get included into your war-file by maven. You should not add any jar-files to your WEB-INF/lib manually. If you need to add some jar-files to your project, which isn't available in the central repository, then you should install them into your local repository by using mvn install:install-file. [1] After that you can add a normal dependencies declaration to your pom.xml of both project B or C. If I understand your problem correctly, then you want to have your project C have the same jar-files available as project B. Since your project B is a war-project, that seams are bit strange to me unless project C also is a war-project. If C is also a war-project, then you might want to look at Overlays of the maven-war-plugin. [2] If your project B and C need to share some dependencies, your could define those dependencies elsewhere (along project A or a new module D) and make both project B and project C depend on that artifact with the share dependencies. I hope this helps. [1] : http://maven.apache.org/plugins/maven-install-plugin/usage.html [2] : http://maven.apache.org/plugins/maven-war-plugin/overlays.html With kind regards, Marco Beelen ~Software Engineer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl -----Original Message----- From: prabho [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2008 11:44 PM To: [email protected] Subject: RE: How to omit/include a jar file during packaging Thanks a lot. I am having a problem in including a jar file though. I have the following directory structure. Dir A/ - lib/ - pom.xml Dir B/ - WEB-INF/lib - pom.xml (includes dependency for Dir A) Dir C/ - pom.xml I want to place the jar files in Dir B/WEB-INF/lib directory and make it accessible to Dir C ?? How can I do this ?? Regards Prabhu > > -----Original Message----- > From: prabho [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2008 4:15 PM > To: [email protected] > Subject: How to omit/include a jar file during packaging > > > Hi all, > > I am trying to create a WAR file with class files and other jar files. > As I have conflict with an external jar file, I am supposed to omit my > jar file while packaging. Can you please let me know how to achieve > that? > > Any help is greatly appreciated. > > Thanks > Prabhu > -- > View this message in context: > http://www.nabble.com/How-to-omit-include-a-jar-file-during-packaging- > tp > 18009940p18009940.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ********************************************************************** > For information, services and offers, please visit our web site: > http://www.klm.com. This e-mail and any attachment may contain > confidential and privileged material intended for the addressee only. > If you are not the addressee, you are notified that no part of the > e-mail or any attachment may be disclosed, copied or distributed, and > that any other action related to this e-mail or attachment is strictly > prohibited, and may be unlawful. If you have received this e-mail by > error, please notify the sender immediately by return e-mail, and > delete this message. > > Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or > its employees shall not be liable for the incorrect or incomplete > transmission of this e-mail or any attachments, nor responsible for > any delay in receipt. > Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal > Dutch Airlines) is registered in Amstelveen, The Netherlands, with > registered number 33014286 > ********************************************************************** > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/How-to-omit-include-a-jar-file-during-packaging-tp 18009940p18018894.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ********************************************************************** For information, services and offers, please visit our web site: http://www.klm.com. This e-mail and any attachment may contain confidential and privileged material intended for the addressee only. If you are not the addressee, you are notified that no part of the e-mail or any attachment may be disclosed, copied or distributed, and that any other action related to this e-mail or attachment is strictly prohibited, and may be unlawful. If you have received this e-mail by error, please notify the sender immediately by return e-mail, and delete this message. Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for the incorrect or incomplete transmission of this e-mail or any attachments, nor responsible for any delay in receipt. Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch Airlines) is registered in Amstelveen, The Netherlands, with registered number 33014286 ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
