maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maciej Mastalarczuk" <mmasta...@hotmail.com>
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

Maciej


>From: Andrew-A.Davies@ubs.com
>Reply-To: "Maven Users List" <users@maven.apache.org>
>To: <users@maven.apache.org>
>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 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:mmastalar@hotmail.com]
>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: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>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: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>

_________________________________________________________________
Be quick, these Dell end of financial year deals canít last! 
http://clk.atdmt.com/OMA/go/dau0100000064oma/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message