I hade the same problem a week ago :-) On 11/9/06, aXXa <[EMAIL PROTECTED]> wrote:
Konstantin, Brilliant! ....it works excellent when I added the <init-param> tag pointing out where to find the bean definition file in my <servlet> tag. Thanks! Konstantin Polyzois wrote: > > You can configure Spring to find it in WEB-INF/classes instead by using > the > following in your web.xml: > > <context-param> > <param-name>contextConfigLocation</param-name> > <param-value>/WEB-INF/classes/fenix-servlet.xml</param-value> > </context-param> > > > <listener> > <listener-class> > org.springframework.web.context.ContextLoaderListener</listener-class> > </listener> > > or if it is the DispatcherServlet use: > > <servlet-class>org.springframework.web.servlet.DispatcherServlet > </servlet-class> > <init-param> > <param-name>contextConfigLocation</param-name> > <param-value>/WEB-INF/classes/fenix-servlet.xml </param-value> > </init-param> > > So keep your file in > > src/main/resources/fenix-servlet.xml > > /Konstantin > > > On 11/9/06, aXXa <[EMAIL PROTECTED]> wrote: >> >> >> ...some more info... >> The reason why I want to move the file 'fenix-servlet.xml' (a Spring bean >> definition file) from src/main/resources to WEB-INF: >> When running tests Spring cannot seem to find the 'fenix-servlet.xml' >> file >> when it resides in the WEB-INF folder >> (${project.build.directory}/${project.build.finalName}/WEB-INF does not >> seem >> to be on the classpath?), but the tests work fine when the file reside in >> the resources folder. Tomcat on the other hand does not find the file >> when >> the file reside in the classes folder when running the web app, but wants >> it >> in the WEB-INF folder... >> >> >> aXXa wrote: >> > >> > All, >> > >> > In vain I have tried to configure the maven-resources-plugin to move >> only >> > ONE file from the resources directory >> ([project-root]/src/main/resources), >> > but I always end up in moving all files and subdirectories or no files >> at >> > all. >> > >> > Can some one please tell me what I'm doing wrong? >> > >> > Below is my attempt that resulted in ALL files and folders (including >> the >> > excluded log4j.properties file) were moved to the WEB-INF directory >> > <build> >> > <plugin> >> > <artifactId>maven-resources-plugin</artifactId> >> > <configuration> >> > >> > <outputDirectory>${project.build.directory}/${project.build.finalName >> }/WEB-INF/</outputDirectory> >> > <resources> >> > <includes> >> > <include>fenix-servlet.xml</include> >> > </includes> >> > <excludes> >> > <exclude>log4j.properties</exclude> >> > </excludes> >> > </resources> >> > </configuration> >> > </plugin> >> > </build> >> > >> >> -- >> View this message in context: >> http://www.nabble.com/-M2--move-resource-files-tf2600050s177.html#a7254955 >> Sent from the Maven - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/-M2--move-resource-files-tf2600050s177.html#a7256584 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]