Hi again,

check every dependency scope in the poms...however try to set common
dependencies up in the super-pom and use the <parent> tag to address it from
the module poms...

as to send my poms, here is a (simple yet working) of my config.

super-pom:

[...]
    <groupId>ejb3maven</groupId>
    <artifactId>ejb3maven</artifactId>
    <version>0.0.1</version>
    <name>EJBDeployer</name>
[...]
    <packaging>pom</packaging>
    <modules>
        <module>wsappclient</module>
        <module>ejb</module>
        <module>web</module>
        <module>ear</module>
    </modules>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
[...]

ejb module:

[...]
  <parent>
    <groupId>ejb3maven</groupId>
    <artifactId>ejb3maven</artifactId>
    <version>0.0.1</version>
  </parent>
    <groupId>ejb3maven</groupId>
    <artifactId>ejb3maven-ejb</artifactId>
    <packaging>ejb</packaging>
    <version>0.0.1</version>

[...]

 <dependencies>
      <dependency>
          <groupId>jboss-ejb3-embeddable_alpha3</groupId>
          <artifactId>antlr-2.7.5H3</artifactId>
          <version>1.0alpha3</version>
      </dependency>

      <dependency>
              <groupId>commons-collections</groupId>
              <artifactId>commons-collections</artifactId>
              <version>3.2</version>
          </dependency>

      <dependency>
          <groupId>jboss-ejb3-embeddable_alpha3</groupId>
          <artifactId>hibernate-all</artifactId>
          <version>1.0alpha3</version>
      </dependency>
      <dependency>
          <groupId>jboss-ejb3-embeddable_alpha3</groupId>
          <artifactId>jboss-ejb3-all</artifactId>
          <version>1.0alpha3</version>
      </dependency>
      <dependency>
          <groupId>jboss-ejb3-embeddable_alpha3</groupId>
          <artifactId>thirdparty-all.jar</artifactId>
          <version>1.0alpha3</version>
      </dependency>
      <dependency>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging-api</artifactId>
          <version>1.1</version>
      </dependency>

</dependencies>

[...]

hope this helps...

Regards
--
Daniele De Francesco

On Wed, Apr 23, 2008 at 11:08 AM, Martin Höller <[EMAIL PROTECTED]> wrote:

> Hi all!
>
> I'm having problems with a multimodule project with EJB3 dependencies. It
> seems maven is not able to include EJB3 modules in the classpath of other
> child-modules when not in the local repository. The simplest project
> struture to reproduce is the following:
>
> parent (packagin pom)
>  |
>  +-- child1 (packagin jar)
>  |
>  `-- child2 (packagin ejb)
>
> where child1 depends on child2. When I execute "mvn package" (with an
> empty
> local repository) from the parent child2 is packaged and then I get a
> missing dependency in child1 on child2:
>
>
> INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) at.co.xss.mhtest.multimodule:child2:jar:1.0-SNAPSHOT
> [...]
>
> However, when I execute "mvn install" instead everything compiles and
> packages fine.
>
> The problem seems to be that maven is not able to include the classes of
> the
> child2 module in the classpath of child1 when it is compiling child1. When
> a "mvn install" is executed, the final jar is in the local repo and
> correctly included in the classpath, so this shows no problems.
>
> Is this behaviour with EJB3 modules intentional, am I missing something
> here
> or is this a bug?
>
> Thanks for your suggestions,
> - martin
>
>
>

Reply via email to