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?

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,

Stefan

[0] http://en.wikipedia.org/wiki/EAR_(file_format)

--
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]

Reply via email to