Do you have a pre-existing MANIFEST.MF in your webapp source?  The first
example doesn't look like it was generated by Maven 2; you should see a
Plexus Archiver entry.  If you remove the custom manifest entry, does
the Class-Path entry appear?

-----Original Message-----
From: David J. M. Karlsen [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 21, 2006 5:50 AM
To: Maven Users List
Subject: [m2] Strange manifest.mf behaviour with maven-war-plugin

Hi!

I've declared a entry like this in my POM:

<plugin>
        
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<!--  <version>2.0.1-SNAPSHOT</version> -->
<configuration>
        <archive>
        <manifest>
<addClasspath>true</addClasspath>
        </manifest>
        <manifestEntries>
                <buildNumber>${buildNumber}</buildNumber>
        </manifestEntries>
        </archive>
</configuration>
</plugin>


I've also declared two dependencies with scope provided (so that they 
are loaded from my ear - and not included in the war).

I then run the clean package goals

if I go to target/${artifactId}-${version}/META-INF (the "exploded" 
directory)
MANIFEST.MF contains this:

Manifest-Version: 1.0
Created-By: Apache Maven
Built-By: AB62939
Build-Jdk: 1.5.0_07
Class-Path: spring-web-1.2.8.jar spring-webmvc-1.2.8.jar



But if I look into the target/artifact.war *file* it contains:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: AB62939
Build-Jdk: 1.5.0_07
Extension-Name: dnbnorapi-war
Specification-Title: Display statistics and send transactions to Felix
   via web-gui
Implementation-Title: dnbnorapi-war
Implementation-Version: 1.0-SNAPSHOT
buildNumber: 44



Notice the missing classpath entry.
Thus starting the war fails due to the missing classpath.


-- 
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

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