You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Hansen <ma...@javector.com> on 2005/11/22 04:11:27 UTC

lots of samples - how to structure maven tree??

I've got lots of sample that need to be packaged into lots of little 
WARs, EARs, etc.

My file tree is set up like

base
   src
     java
       samples
         chap1
           sec1
             MyServlet.java
           sec2
              AotherServlet.java
         chap2
           sec1
              HelloWorld.java
           sec2
              GoodbyeWorld.java
   maven.xml
   project.xml


How do I use maven to build separate WARs (or EARs or whatever) for
   chap1/sec1
   chap1/sec2
   chap2/sec1
   chap2/sec2

?????

Do I need to restructure like this - with lots of individual maven poms?

base
   chap1
     sec1
       maven.xml
       project.xml
       MyServlet.java
     sec2
        maven.xml
        project.xml
        AnotherServlet.java

.... etc.

Thanks,

Mark


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


Re: lots of samples - how to structure maven tree??

Posted by Edwin Punzalan <ep...@exist.com>.
Hi,

Yes, you need to give each package a pom with the corresponding packaging.


Mark Hansen wrote:

> I've got lots of sample that need to be packaged into lots of little 
> WARs, EARs, etc.
>
> My file tree is set up like
>
> base
>   src
>     java
>       samples
>         chap1
>           sec1
>             MyServlet.java
>           sec2
>              AotherServlet.java
>         chap2
>           sec1
>              HelloWorld.java
>           sec2
>              GoodbyeWorld.java
>   maven.xml
>   project.xml
>
>
> How do I use maven to build separate WARs (or EARs or whatever) for
>   chap1/sec1
>   chap1/sec2
>   chap2/sec1
>   chap2/sec2
>
> ?????
>
> Do I need to restructure like this - with lots of individual maven poms?
>
> base
>   chap1
>     sec1
>       maven.xml
>       project.xml
>       MyServlet.java
>     sec2
>        maven.xml
>        project.xml
>        AnotherServlet.java
>
> .... etc.
>
> Thanks,
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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