2008/7/23 Stefan Seidel <[EMAIL PROTECTED]>:

>
> Kent Närling wrote:
>
>> I do understand the dependency and packaging concepts, but I failed to get
>> it working by refering to another artifact even though i ran "mvn install"
>> on the dependent artifact. (ok, it only installed it in my local
>> repository,
>> but that shouldn't matter?)
>> But this is the way it is supposed to work apparently?
>>
> This is the way maven in general works, what did you expect?
>

My comment was not meant to indicate that this was a stupid way, just a
confirmation that I must have misunderstood it.
Sorry, my bad formulation of words.

I think I see now that I forgot for a moment that it is ONLY pom projects
that can have sub-projects/modules which in combination with the references
to "modules" in the plugin docs mislead me, sorry for the troll question.

In my head I was imagining an EAR project with the ejb:s, war:s etc being
modules to the parent EAR project, which wouldn't have been entirely
unlogical either? ;-)


>
>> So, the EAR packaging is actually just an artifact packaging a bunch of
>> other artifacts into an EAR package?
>>
> Yes. Are you sure you understand what EAR means? See [0]. Again, what did
> you expect?


>  The documentation for the EAR plugin describes this badly... also, what
>> packaging types should the referred packages have? I assume jar?
>>
> In a normal Enterprise Application, it is common to have at least one EJB
> and one WAR. Thus, the dependent projects should have packaging ejb and war,
> respectively.
>
> IMHO the EAR plugin doc is not perfect, but clear enough iff you know what
> an EAR is and what it is used for.
>
> So actually, to get you started, your EAR pom could look something like
> this:
>
> ...
>  <packaging>ear</packaging>
> ...
>  <dependencies>
>    <dependency>
>      ...
>      <type>ejb</type>
>    </dependency>
>    <dependency>
>      ...
>      <type>war</type>
>    </dependency>
>    ...
>  </dependencies>
> ...
>
> This should be all that is needed for starters. If you need to configure
> special things the application.xml, you can add:
>
>  <build>
>    <plugins>
>      <plugin>
>        <artifactId>maven-ear-plugin</artifactId>
>        <configuration>
>          <webModule>
>            ...
>            <contextRoot>/myWebApp</contextRoot>
>          </webModule>
>          ...
>          <jarModule>
>            ...
>            <includeInApplicationXml>true</includeInApplicationXml>
>          </jarModule>
>          ...
>        </configuration>
>      </plugin>
>    </plugins>
>  </build>
>
> regards,


Ok, this in combination  with vedanta's example makes this much clearer for
me, thanks!

I think a complete example project scetch (similar to yours above) would be
very valuable in the plugin documentation!

//Kent


>
> Stefan
>
> [0] 
> http://en.wikipedia.org/wiki/EAR_(file_format)<http://en.wikipedia.org/wiki/EAR_%28file_format%29>
>
> --
> best regards,
>
> Stefan Seidel
> software developer
> ________________________
> VUB Printmedia GmbH
> Chopinstraße 4
> D-04103 Leipzig
> Germany
> tel.    +49 (341) 9 60 50 07
> fax.    +49 (341) 9 60 50 92
> mail.   [EMAIL PROTECTED]
> web.    www.vub.de
>
> HRB Köln 24015
> UStID DE 122 649 251
> GF Dr. Achim Preuss Neudorf,
> Dr. Christian Preuss Neudorf
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Kent Närling

System Architect
SEAMLESS
Dalagatan 100, 8 tr, 113 43 Stockholm, Sweden
Phone: +46 8 5648 7800, fax: +46 8 5648 7823
Mobile: +46 70 836 9925
Mail: [EMAIL PROTECTED]
www.seamless.se

Reply via email to