maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maciej Mastalarczuk" <>
Subject RE: Scope and manifest class path with M2
Date Fri, 30 Jun 2006 01:27:04 GMT
Hi Andy,

Thanks a lot for the information. I was out of office and didn't have any 
time to try it, but it looks like this is what I need. I was unaware of the 
'exclusions' possibility for the dependencies.

The 'classloader issues' I meant aren't perhaps problems. I must have 
expressed myself wrongly. I simply need to load some classes needed by WAR 
the EAR level. Despite WAS classloaders being apparently fine, loading them 
in both places doesn't always work althought with PARENT_LAST you would 
expect the classes in one classloader not to bleed through to the other one. 
I have it sorted out, but needed to battle a bit particularly with some JSF 
dependencies. Ended up having to remove them from WAR and load them on the 
EAR level (???).

Thanks a lot for your help and regards


>Reply-To: "Maven Users List" <>
>To: <>
>Subject: RE: Scope and manifest class path with M2
>Date: Tue, 27 Jun 2006 08:13:04 +0100
>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 Class-Path without it
>appearing in the WEB-INF/lib in M2 by placing dependencies as follows in
>the war packaging pom ...
>     <dependency>
>         <groupId></groupId>
>         <artifactId>cim-j2eeclient</artifactId>
>         <version>${rkyc-cim-version}</version>
>         <scope>compile</scope>
>               <exclusions>
>                 <exclusion>
>                       <artifactId>cim-j2eeclient</artifactId>
>                 </exclusion>
>               </exclusions>
>               <optional>true</optional>
>     </dependency>
>And then your war plugin configuration should be
>			<plugins>
>				<plugin>
>					<version>2.0</version>
>					<configuration>
>						<archive>
>							<manifest>
>							</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 in the
><manifest> tag:
>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 ?
>-----Original Message-----
>From: Maciej Mastalarczuk []
>Sent: 27 June 2006 07:00
>Subject: Scope and manifest class path with M2
>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
>Maciej Mastalarczuk
>Research and compare new cars side by side at
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>Visit our website at
>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:
>For additional commands, e-mail:

Be quick, these Dell end of financial year deals canít last!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message