Hi Maciej,

I also had this problem, and it took a while to sort out. Here are the
ways I found ...

I've managed to get something into the Manifest.mf Class-Path without it
appearing in the WEB-INF/lib in M2 by placing dependencies as follows in
the war packaging pom ...

    <dependency> 
        <groupId>com.ubs.datait.rkyc.cim.j2eeclient</groupId> 
        <artifactId>cim-j2eeclient</artifactId> 
        <version>${rkyc-cim-version}</version> 
        <scope>compile</scope> 
              <exclusions> 
                <exclusion> 
                      <artifactId>cim-j2eeclient</artifactId> 
 
<groupId>com.ubs.datait.rkyc.cim.j2eeclient</groupId> 
                </exclusion> 
              </exclusions> 
              <optional>true</optional> 
    </dependency> 

And then your war plugin configuration should be

                        <plugins>
                                <plugin>
        
<groupId>org.apache.maven.plugins</groupId>
        
<artifactId>maven-war-plugin</artifactId>
                                        <version>2.0</version>
                                        <configuration>
                                                <archive>
                                                        <manifest>
        
<addClasspath>true</addClasspath>
                                                        </manifest>
                                                </archive>
                                        </configuration>
                                </plugin>

You could also look to use add a classpath and then explicitly exclude
jars with the <excludes>WEB-INF/lib/*.jar</excludes> construct within
the war configuration

The <excludes> tag will only exclude JARs in your workspace directory.
It does not prevent the JARs specified by dependencies to be added to
the lib directory. To do so add a scope tag with the value "provided" to
the dependency:

Alternatively, if you know exactly what you want the manifest class path
to look like you could also specify a special manifest.mf in the
<manifest> tag: 

 
<manifestFile>${basedir}/WebContent/META-INF/MANIFEST.MF</manifestFile> 

Or if you have a manifest file in the standard location
(src/main/webapp/META-INF/) Maven will use that. 
If you want Maven to create the manifest, simply delete the manifest in
the standard location. 


Hopefully you can use one of these solutions. BTW I am using WAS 6 and
am not aware of classloader problems - what problems are you referring
to ?

Rgds
Andy

-----Original Message-----
From: Maciej Mastalarczuk [mailto:[EMAIL PROTECTED] 
Sent: 27 June 2006 07:00
To: users@maven.apache.org
Subject: Scope and manifest class path with M2

Hi,

I am building a WAR file and I need M2 to put a jar in the manifest
class path, but not include it under WEB-INF/lib (this is due to the
classloader confiuration issues on WAS6).

Seems like a simple task, but is it possible? When I use scope
'provided' - it skips the class path entry in the maniftest. Any other
scope will cause the jar to end up in WEB-INF/lib

Regards

Maciej Mastalarczuk

_________________________________________________________________
Research and compare new cars side by side at carpoint.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwi
de%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F100
4813%2Fai%5F833884&_t=54321&_r=hotmail_endtext&_m=EXT


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


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


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

Reply via email to