You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sreyan Chakravarty <sr...@gmail.com> on 2015/08/05 20:03:57 UTC

WebApp archetype not generating proper directory structure

Okay I am using Maven within Eclipse a project which uses Hibernate. I am
using the maven-archetype-webapp(version 1.0) for the project. I am getting
the following directory structure for my src folder-:

src
|---main
     |----resources
     |----webapp
           |----WEB-INF
           |      |---web.xml
           |----index.jsp

Where is the src/main/java folder ? As given here (
https://maven.apache.org/plugins-archives/maven-archetype-plugin-1.0-alpha-7/examples/webapp.html
)

Where are the tests folder ?

Also there is only one archetype relating to webapp present. That too in
the Internal catalog.

How do I get the correct structure ? What am I doing wrong ?

Re: WebApp archetype not generating proper directory structure

Posted by Sreyan Chakravarty <sr...@gmail.com>.
Yup it does automatically create them.

On Thu, Aug 6, 2015 at 5:53 PM, Anders Hammar <an...@hammar.net> wrote:

> >
> > also check these folders have been created in which case both folders
> must
> > be created if they do'nt exist:
> > WEB-INF/classes
> > WEB-INF/lib
> >
>
> Please ignore this reply! It's not applicable; Maven (the war plugin) will
> create these during build.
>
> /Anders
>
>
>
> >
> > Regards,
> > Martin
> >
> >
> > > Date: Wed, 5 Aug 2015 22:14:00 +0200
> > > Subject: Re: WebApp archetype not generating proper directory structure
> > > From: anders@hammar.net
> > > To: users@maven.apache.org
> > >
> > > I'm guessing that that archetype does not create an src/main/java
> folder.
> > > Just create it yourself if you need it. Very often you separate your
> Java
> > > code into a separate project from your webapp project.
> > >
> > > /Anders
> > >
> > > On Wed, Aug 5, 2015 at 8:03 PM, Sreyan Chakravarty <
> > sreyan.mailing@gmail.com
> > > > wrote:
> > >
> > > > Okay I am using Maven within Eclipse a project which uses Hibernate.
> I
> > am
> > > > using the maven-archetype-webapp(version 1.0) for the project. I am
> > getting
> > > > the following directory structure for my src folder-:
> > > >
> > > > src
> > > > |---main
> > > >      |----resources
> > > >      |----webapp
> > > >            |----WEB-INF
> > > >            |      |---web.xml
> > > >            |----index.jsp
> > > >
> > > > Where is the src/main/java folder ? As given here (
> > > >
> > > >
> >
> https://maven.apache.org/plugins-archives/maven-archetype-plugin-1.0-alpha-7/examples/webapp.html
> > > > )
> > > >
> > > > Where are the tests folder ?
> > > >
> > > > Also there is only one archetype relating to webapp present. That too
> > in
> > > > the Internal catalog.
> > > >
> > > > How do I get the correct structure ? What am I doing wrong ?
> > > >
> >
>

Re: WebApp archetype not generating proper directory structure

Posted by Anders Hammar <an...@hammar.net>.
>
> also check these folders have been created in which case both folders must
> be created if they do'nt exist:
> WEB-INF/classes
> WEB-INF/lib
>

Please ignore this reply! It's not applicable; Maven (the war plugin) will
create these during build.

/Anders



>
> Regards,
> Martin
>
>
> > Date: Wed, 5 Aug 2015 22:14:00 +0200
> > Subject: Re: WebApp archetype not generating proper directory structure
> > From: anders@hammar.net
> > To: users@maven.apache.org
> >
> > I'm guessing that that archetype does not create an src/main/java folder.
> > Just create it yourself if you need it. Very often you separate your Java
> > code into a separate project from your webapp project.
> >
> > /Anders
> >
> > On Wed, Aug 5, 2015 at 8:03 PM, Sreyan Chakravarty <
> sreyan.mailing@gmail.com
> > > wrote:
> >
> > > Okay I am using Maven within Eclipse a project which uses Hibernate. I
> am
> > > using the maven-archetype-webapp(version 1.0) for the project. I am
> getting
> > > the following directory structure for my src folder-:
> > >
> > > src
> > > |---main
> > >      |----resources
> > >      |----webapp
> > >            |----WEB-INF
> > >            |      |---web.xml
> > >            |----index.jsp
> > >
> > > Where is the src/main/java folder ? As given here (
> > >
> > >
> https://maven.apache.org/plugins-archives/maven-archetype-plugin-1.0-alpha-7/examples/webapp.html
> > > )
> > >
> > > Where are the tests folder ?
> > >
> > > Also there is only one archetype relating to webapp present. That too
> in
> > > the Internal catalog.
> > >
> > > How do I get the correct structure ? What am I doing wrong ?
> > >
>

RE: WebApp archetype not generating proper directory structure

Posted by Martin Gainty <mg...@hotmail.com>.
also check these folders have been created in which case both folders must be created if they do'nt exist:
WEB-INF/classes
WEB-INF/lib

Regards,
Martin


> Date: Wed, 5 Aug 2015 22:14:00 +0200
> Subject: Re: WebApp archetype not generating proper directory structure
> From: anders@hammar.net
> To: users@maven.apache.org
> 
> I'm guessing that that archetype does not create an src/main/java folder.
> Just create it yourself if you need it. Very often you separate your Java
> code into a separate project from your webapp project.
> 
> /Anders
> 
> On Wed, Aug 5, 2015 at 8:03 PM, Sreyan Chakravarty <sreyan.mailing@gmail.com
> > wrote:
> 
> > Okay I am using Maven within Eclipse a project which uses Hibernate. I am
> > using the maven-archetype-webapp(version 1.0) for the project. I am getting
> > the following directory structure for my src folder-:
> >
> > src
> > |---main
> >      |----resources
> >      |----webapp
> >            |----WEB-INF
> >            |      |---web.xml
> >            |----index.jsp
> >
> > Where is the src/main/java folder ? As given here (
> >
> > https://maven.apache.org/plugins-archives/maven-archetype-plugin-1.0-alpha-7/examples/webapp.html
> > )
> >
> > Where are the tests folder ?
> >
> > Also there is only one archetype relating to webapp present. That too in
> > the Internal catalog.
> >
> > How do I get the correct structure ? What am I doing wrong ?
> >
 		 	   		  

Re: WebApp archetype not generating proper directory structure

Posted by Anders Hammar <an...@hammar.net>.
I'm guessing that that archetype does not create an src/main/java folder.
Just create it yourself if you need it. Very often you separate your Java
code into a separate project from your webapp project.

/Anders

On Wed, Aug 5, 2015 at 8:03 PM, Sreyan Chakravarty <sreyan.mailing@gmail.com
> wrote:

> Okay I am using Maven within Eclipse a project which uses Hibernate. I am
> using the maven-archetype-webapp(version 1.0) for the project. I am getting
> the following directory structure for my src folder-:
>
> src
> |---main
>      |----resources
>      |----webapp
>            |----WEB-INF
>            |      |---web.xml
>            |----index.jsp
>
> Where is the src/main/java folder ? As given here (
>
> https://maven.apache.org/plugins-archives/maven-archetype-plugin-1.0-alpha-7/examples/webapp.html
> )
>
> Where are the tests folder ?
>
> Also there is only one archetype relating to webapp present. That too in
> the Internal catalog.
>
> How do I get the correct structure ? What am I doing wrong ?
>