maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenney Westerhof <ken...@apache.org>
Subject Re: Generating ejb-client jar
Date Tue, 20 Jun 2006 09:40:34 GMT
On Tue, 20 Jun 2006, Jo Vandermeeren wrote:

Hi,

Several things:

- Here's what I've got in a working pom:

<project>
  <modelVersion>4.0.0</modelVersion>
  <name>Project EJB</name>
  <groupId>com.mycompany</groupId>
  <artifactId>project-ejb</artifactId>
  <packaging>ejb</packaging>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-ejb-plugin</artifactId>
        <configuration>
          <generateClient>true</generateClient>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

the excludes you specified are the default - all **/*Bean.java are
excluded.

- You specified **/mtracker-ejb/*Bean.java as an exclude.

  You should know that this applies to src/target/classes/, and so
  'mtracker-ejb' will be seen as the part of a package.
  But package names cannot have '-' in them so this is illegal.
  (I'm pretty sure you cannot find a 'mtracker-ejb' subdirectory anywhere
  in target/classes/).

  Maven scans target/classes, applies your filter, and then creates the
  archive.

- But all the above does not matter - the default includes still apply.

  Try running 'mvn -X install' on your ejb project. You should see exactly
  what files are included and what jars are created:

[INFO] [ejb:ejb]
[INFO] Building ejb project-ejb-1.0-SNAPSHOT
[INFO] Building jar: ...../target/project-ejb-1.0-SNAPSHOT.jar
[DEBUG] adding directory META-INF/
[DEBUG] adding entry META-INF/MANIFEST.MF
[DEBUG] adding directory com/
<snip>
[INFO] Building ejb client project-ejb-1.0-SNAPSHOT-client
[INFO] Building jar: .../target/project-ejb-1.0-SNAPSHOT-client.jar
[DEBUG] adding directory META-INF/
[DEBUG] adding entry META-INF/MANIFEST.MF
[DEBUG] adding directory com/
<snip>
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------


If you can't figure out what happens, please send the output of mvn
-X install.

HTH,

-- Kenney



> Hi there,
>
> I'm playing around with the "Better builds with maven" book..
> I'm following chapter 4..
>
> I have defined a parent POM that contains 2 modules: mtracker-ejb and
> mtracker-web..
> The web module should depend on the ejb-client jar of the ejb module.
>
> ** But I can't seem to get the EJB module to produce the ejb-client jar
> artifact..
>
> I have this in my EJB module's POM:
>
> <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-ejb-plugin</artifactId>
>                 <configuration>
>                     <generateClient>true</generateClient>
>                     <clientExcludes>
>                         <clientExclude>**/mtracker-ejb/*Bean.class
> </clientExclude>
>                     </clientExcludes>
>                 </configuration>
>             </plugin>
> [...]
>
>
> This snippet is in the web module's POM:
>
> <dependencies>
>         <dependency>
>             <groupId>mtracker</groupId>
>             <artifactId>mtracker-ejb</artifactId>
>             <version>${pom.version}</version>
>             <type>ejb-client</type>
>         </dependency>
> [...]
>
>
> When I do a "mvn install" on the EJB module, it does not generate an
> ejb-client module
>
> ** Also, IntelliJ doesn't seem to recognize this module as an EJB module,
> although the EJB module's POM has packaging set to "ejb"..
>
>
> Any help on this would be appreciated..
>
>
> Regards,
> Jo
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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


Mime
View raw message