<!--==================================================================
createClassPathManifest:
This will create a target/conf/MANIFEST.MF file which contains
the "Class-Path" property in it which contains the list of all
jar files the project is dependent on.
==================================================================--> <goal name="jbrew:createClassPathManifest">
<!-- create target directory where new manifest will be created. -->
<mkdir dir="${maven.build.dir}/conf"/>
<!-- Get a variable with the classpath value -->
<j:set var="depsClassPath" value=""/>
<j:forEach var="dep" items="${pom.artifacts}">
<j:set var="depsClassPath" value="${depsClassPath} ${deploy.lib.dir}/${dep.name}"/>
</j:forEach>
<!-- create a dynamic manifest file for performing java -jar -->
<manifest file="${maven.build.dir}/conf/MANIFEST.MF">
<attribute name="Class-Path" value="${depsClassPath}"/>
</manifest>
</goal>
Then in your project.properties file you need to include this:
maven.jar.mainclass=com.evnt.eve.Eve <!-- specific to your project -->
maven.jar.manifest=target/conf/manifest.mf <!-- to use the above created manifest. -->
Hope that helps, Brent
Siegfried Göschl wrote:
Hi Michal,
I had a look at uberjar a few months ago but encountered performance problems due to the URLClassloader - it takes ages to pull in my JARs .... :-).
But it is too slow - my JAR is about 11.5 MByte and starting it takes now 150 seconds instead of 3 seconds. After loading all the classes there is still a performance degration of the factor 5 - my tests runs now in 19.5 sec instead of 3.8 seconds.Orginale Mail Snippet >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
As a workaround I'm using the javaapp plugin hosted on http://maven-
plugins.sourceforge.net/ ... the most recent version for Maven B10 is actually found within the CVS since I had no time to upload a new release of it.
Cheers,
Siegfried Goeschl
On 31 Jul 2003 at 22:26, Michal Maczka wrote:
take a look what uberjar plugin does.
Michal
-----Original Message----- From: Erik Husby [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:21 PM To: Maven Users List Subject: Re: Question: How to create a manifest classpath
Quoting Siegfried Göschl <[EMAIL PROTECTED]>:
Hi Erik,That is exactly what I am looking for -- thanks.
I'm not quite sure if I'm qualified to answer your question since this is the first time that I heard of a manifest classpath ... :-) ... but I asked Google.
And Google knows a few things about it - you might find the relevant code it the maven.ejb-plugin ...
Hope this helps,
Siegfried Goeschl
FYI a manifest classpath allows one easily package an application so that you can do the following:
cd somedirectory
java -jar application.jar
Assuming that the application jar and all its related jar files are in the directory "somedirectory".
On Windows this means you can double click on a jar file to launch the application. -- Erik Husby Team Lead for Software Quality Automation Whitehead Institute/MIT Center for Genome Research Rm 2192 320 Charles St Cambridge, MA 02141-2023 mobile: 781.354.6669 office: 617.258.9227 [EMAIL PROTECTED]
-------------------------------------------------------------------- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-------------------------------------------------------------------- -- Portal INTERIA.PL zaprasza... >>> http://link.interia.pl/f174b
--------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]