But the problem is that I configure my webapp with property files. Some properties point to other files. Won't those links be wrong in any case since the files will be in a new directory? I suppose I could use separate configurations for development and live but it seems like a lot of work. I don't really understand why the structure needs to be different. /Ludwig
-----Original Message----- From: Joe Hindsley [mailto:[email protected]] Sent: den 20 november 2009 17:02 To: Maven Users List Subject: Re: [WAR-plugin] Can I put my resources in their original folder? Hi Ludwig, I would recommend putting those directories and files in the src/main/webapp directory. The maven war plugin puts everything under src/main/webapp into the base of the war. In your case: src/main/webapp/external-resource.jpg src/main/webapp/image2/external-resource2.jpg would give you the war layout: ./external-resource.jpg ./image2/external-resource2.jpg Hope this helps, Joe Hindsley Ludwig Magnusson wrote: > The first example on this page > <http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering- > webresources.html> > http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-w > ebresources.html says that resources outside the src folder will be placed > in the root of the war > > > > Ex, with this filestructure: > > |-- pom.xml > > |-- resource2 > > | |-- external-resource.jpg > > | `-- image2 > > | `-- external-resource2.jpg > > //more structure > > > > And this configuration of the war-plugin > > <configuration> > <webResources> > <resource> > <!-- this is relative to the pom.xml directory --> > <directory>resource2</directory> > </resource> > </webResources> > </configuration> > > > > The war file will be structured like this: > > > > //more structure > > |-- external-resource.jpg > |-- image2 > | `-- external-resource2.jpg > > > > Is it possible to structure the war-file like the original filestructure? > > I.e having all the extra resources in the resource2-folder, and that folder > in the root of the war-file? > > /Ludwig > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
