On Thu, Nov 1, 2018 at 5:55 AM Karen Goh <[email protected]> wrote:
> > -------------------------------------------- > On Tue, 10/30/18, jieryn <[email protected]> wrote: > > Subject: Re: Need advice to put my bootstrap template in Maven archetype > web app > To: "Maven Users List" <[email protected]>, [email protected] > Date: Tuesday, October 30, 2018, 8:31 PM > > https://maven.apache.org/plugins/maven-war-plugin/usage.html > > Hi Jieryn, > > Just to clarify, so I have to place the WebContent folder which contents > all my bootstrap css etc under the resources ? > > I am confused cos the title is how to WAR plug in where is my question is > more on the Maven structure directory usage for 3rd party bootstrap > template. > In Maven, everything is done by plugins, even the "standard" things. Besides the things that are part of the Project Object Model (sources, resources, output directory, test sources, test resources, test output directory), the "standard layout" for Maven projects are actually simply the default configurations for those plugins. If you want to build a WAR file for a web app, you'll use <packaging>war</packaging> in your POM, which will trigger the plugin bindings for war packaging ( https://maven.apache.org/ref/3.6.0/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging). The maven-war-plugin is responsible for packaging the WAR file, and by default will take the "web resources" from src/main/webapp. In you case, you could either reconfigure the maven-war-plugin to use WebContent as the warSourceDirectory, or move the content of you WebContent folder into src/main/webapp (so you will have, for example, a src/main/webapp/WEB-INF/web.xml file instead of WebContent/WEB-INF/web.xml) See also https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html > > On > Sun, Oct 28, 2018 at 4:37 AM Karen Goh <[email protected]> > wrote: > > > > Hi, > > > > I have been > struggling for 2 days where to put my bootstrap template > that comes with pre-build template which includes css, fonts > etc. inside my maven web project without success. > > > > The problem - jsp is > not rendering the bootstrap layout. It was rendering ok > before I changed the project structure which meets the Maven > project standard structure. > > > > This is a 3rd party bootstrap template. > > > > After reading up the > maven project structure, I have tried to put it under > src/main/resources, tried under src, tried moving around all > parts of the directory but to no avail.... > > > > I also used the below > structure to move my WebContent which included this template > but it is still not working > > > > > https://stackoverflow.com/questions/15529184/where-to-place-twitter-bootstrap-files-in-a-maven-project > > > > Here's my pom.xml > : > > > > https://ibb.co/fesnGV > > > > https://ibb.co/m7GQ3A > > > > > > > Here's where my bootstrap ended now (still not working) > - where I put the jsp files and WebContent separately. > > > > https://ibb.co/fKArbV > > > > Please tell me where > should I put the bootstrap template. > > > > Thank you & regards, > > Karen > > > > > > > > > --------------------------------------------------------------------- > > 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] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
