Just to clarify. WEB-INF/classes will include both compiled classes and resources. So between WEB-INF/classes and jars under WEB-INF/lib there is no difference both are in the web app class path. To me it seems that the reason you want to package your classes/resources into jar first and then put it into WEB-INF/lib is that you want to distribute this jar for other purposes. And this is where multi module projects come in.
-Rk -----Original Message----- From: Jankiraman, Radhakrishnan Sent: Tuesday, August 17, 2010 5:59 PM To: 'Maven Users List' Subject: RE: Maven war build ignores resources folder By default classes would be automatically included in the WEB-INF/classes. So why would you want to package it as a jar and then include in WEB-INF/lib ? Does it matter how the classes are packaged in the war ? If you are looking to make this jar available for other purposes, then this code is re-usable and shouldn't be part of the war codebase. You might want to take a look at multi module projects and set up a separate maven project for these classes and then included that project as a dependency for your war project. -Rk -----Original Message----- From: SACHIN :) [mailto:mishra_sac...@hotmail.com] Sent: Tuesday, August 17, 2010 5:08 PM To: Maveb Users Subject: RE: Maven war build ignores resources folder Hi Yes, you are correct Jeff, the resources content ends up in the jar file under WEB-INF/lib. Is it a way to exclude the resources content from the jar and put it in the WEB-INF/classes WHEN the war is build? Thanks Sachin > From: jeffma...@jeffmaury.com > Date: Tue, 17 Aug 2010 10:32:06 +0200 > Subject: Re: Maven war build ignores resources folder > To: users@maven.apache.org > > Because you set archiveClasses to true, I suspect your resources files are > in the JAR created. Take a look at WEB-INF/lib instead. > > Regards > Jeff MAURY > > On Tue, Aug 17, 2010 at 6:26 AM, SACHIN :) <mishra_sac...@hotmail.com>wrote: > > > > > Hi > > > > I am new to maven and currently stuck so any help will be appreciated. > > > > I have a Maven web-app project and I need to build a jar file, which then > > gets included in the war. I got this to work by using the > > <archiveClass>true</archiveClass> for the war plugin. > > > > However, my resources folder content is no longer available on the class > > path ie. /WEB-INF/classes/ is empty in the war file. > > > > how can I get the resources folder content in the war WEB-INF/classes/ SO > > THAT they are available in the classpath? These are some xml config files. > > > > > > target/classes content is as expected but only when the war file is build > > the xml config files disappers! > > > > Thanks > > > > > > > -- > "Legacy code" often differs from its suggested alternative by actually > working and scaling. > - Bjarne Stroustrup > > http://www.jeffmaury.com > http://riadiscuss.jeffmaury.com > http://www.twitter.com/jeffmaury --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org