You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by daniel echalar <da...@gmail.com> on 2012/11/13 20:24:10 UTC

how to include a directory for a web application generated with an archetype

Hi,

II have created a maven project using a webapp archetype, the result is
that in my generated directory structure, there is not the src/main/java
directory, (there is where I want to put my servlets), so ,how can I do
that?

Thanks

Re: how to include a directory for a web application generated with an archetype

Posted by Wayne Fay <wa...@gmail.com>.
> ok, some link to know better the best practices of J2ee, thanks!

Perhaps saying "J2ee best practice" is not 100% accurate. Rather, this
is a Maven best practice for J2ee projects. I'm unsure about what J2ee
recommends at this point.

I just searched for "maven ear war example" and found lots of links
and discussion on this topic including some blogs, Stackoverflow,
links to documentation etc.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: how to include a directory for a web application generated with an archetype

Posted by daniel echalar <da...@gmail.com>.
ok, some link to know better the best practices of J2ee, thanks!

On 13 November 2012 19:39, Wayne Fay <wa...@gmail.com> wrote:

> > directory, try to create it. The Archetype you used is perhaps broken
> > or doesn't behave as you wanted. Add your dir manually.
>
> It isn't broken. J2EE best practices tell you make a Jar project
> (module) with your Java source code, and bring it into your War
> project as a dependency. So the archetype does not construct
> src/main/java for Webapps as it should not be needed.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: how to include a directory for a web application generated with an archetype

Posted by Wayne Fay <wa...@gmail.com>.
> directory, try to create it. The Archetype you used is perhaps broken
> or doesn't behave as you wanted. Add your dir manually.

It isn't broken. J2EE best practices tell you make a Jar project
(module) with your Java source code, and bring it into your War
project as a dependency. So the archetype does not construct
src/main/java for Webapps as it should not be needed.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: how to include a directory for a web application generated with an archetype

Posted by Thomas Sundberg <ts...@kth.se>.
On 13 November 2012 20:26, daniel echalar <da...@gmail.com> wrote:
> Hi,
>
> II have created a maven project using a webapp archetype, the result is
> that in my generated directory structure, there is not the src/main/java
> directory, (there is where I want to put my servlets), so ,how can I do
> that?

Depending on your os, mkdir or something similar. If you are missing a
directory, try to create it. The Archetype you used is perhaps broken
or doesn't behave as you wanted. Add your dir manually.

/Thomas


-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: how to include a directory for a web application generated with an archetype

Posted by daniel echalar <da...@gmail.com>.
>
> Hi,
>
> II have created a maven project using a webapp archetype, the result is
> that in my generated directory structure, there is not the src/main/java
> directory, (there is where I want to put my servlets), so ,how can I do
> that?
>
> Thanks
>
>

Re: how to include a directory for a web application generated with an archetype

Posted by daniel echalar <da...@gmail.com>.
Hi,

II have created a maven project using a webapp archetype, the result is
that in my generated directory structure, there is not the src/main/java
directory, (there is where I want to put my servlets), so ,how can I do
that?

Thanks