Thanks for the reply Wayne.  I added the <addClasspath> line to my ear pom 
but it made no difference.  Both the webapp and the EAR have classpath 
entries in their manifest file but projects in the webapp still cannot 
find the resources in the EAR.  Back to my original structure:

projectEAR
|--- moduleA.jar
|--- moduleB.jar
|--- JSPs.war
      |--- WEB-INF
           |--- lib
                |--- moduleC.jar
                |--- moduleD.jar

We know that moduleC is dependent on moduleA, but since A is not in the 
webapp manifest, C cannot find A even though A is in the EAR manifest.  Is 
this assumption correct?

So using Maven, I put a dependency with a compile scope, moduleA will be 
in the webapp manifest but its jar will also be included in the webapp. So 
really I just want the classpath entry without including the jar in the 
webapp.  Is there a way to do this?

Hopefully someone knows how to do this.  Thanks again.


_Mang Lau





"Wayne Fay" <[EMAIL PROTECTED]> 
02/17/2006 05:39 PM
Please respond to
"Maven Users List" <[email protected]>


To
"Maven Users List" <[email protected]>
cc

Subject
Re: [M2] Adding jars to classpath in war manifest






This is what I'm using rather successfully...

in the webapp/pom.xml
  <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>

in the ear/pom.xml
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

Give this a try, Mang, and let us know...

Wayne


On 2/17/06, Mang Jun Lau <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've seen people ask this or a similar question before but I don't think
> it has ever been answered.  If it has then can some kind soul point me 
in
> the right direction?
>
> Here's the situation:
>
> I have an EAR and a WAR inside the EAR.  The EAR also contains JARs.  So
> here's a directory structure:

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


Reply via email to