With evenisse's help I just figured this out today and submitted a patch to the war plugin documentation, cf MWAR-61.

I assume that what you want is for the EJB jar to be in the war's manifest classpath and your mention of putting the ear on the m. cp is a typo?

Here's my configuration that works for me:

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.apache.geronimo.itest</groupId>
            <artifactId>jar</artifactId>
            <version>${pom.version}</version>
            <optional>true</optional>
        </dependency>
    </dependencies>


The build/plugin configuration generates the manifest cp, and the <optional>true</optional> prevents maven from bundling the dependency into WEB-INF/lib.

Hope this is what you are looking for,
david jencks



On Jul 8, 2006, at 11:39 PM, Markus Wolf wrote:

Hi,

I have a problem creating my EAR file containing a WAR and a EJB.
First I setup my WAR-pom to have the EAR as provided dependency, but
then it is not possible to add it to the manifests classpath.
Then I read through the mailinglist and found an exclude configuration
should help. But no matter how I configure my excludes they are ignored...

I've checked the version of the war plugin as well and I'm using 2.0.1.
Is there anything I've overlooked in my pom.xml?

...
<dependencies>
  <dependency>
    <groupId>de.esw.services</groupId>
    <artifactId>emediaservices-core</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>runtime</scope>
  </dependency>
  <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8.1</version>
    <scope>test</scope>
  </dependency>
</dependencies>
<build>
  <finalName>emediaservices-web</finalName>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
        <excludes>
          <exclude>WEB-INF/lib/*.jar</exclude>
        </excludes>
        <archive>
          <manifest>
            <addClasspath>true</addClasspath>
          </manifest>
        </archive>
      </configuration>
    </plugin>
  </plugins>
</build>
...

Any ideas?
Thanks
Markus Wolf
--

emedia-solutions wolf
Wedeler Landstrasse 63
22559 Hamburg
(040) 550 083 70

 web: http://www.emedia-solutions-wolf.de
mail: [EMAIL PROTECTED]
 pgp: http://wwwkeys.de.pgp.net


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to