Hello,

If you would like to include your project's dependecies in your package, you
could use the dependency plugin available at codehaus (
http://mojo.codehaus.org/dependency-maven-plugin/introduction.html).

Cheers!
Nap

On 2/28/06, Gerard Garrigan <[EMAIL PROTECTED]> wrote:
>
> Thanks very much for all the help on the issue. It's working now with
> the classpath - batch file approach.
>
> Thanks again,
>
> Ger
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Lee Meador
> Sent: 24 February 2006 21:53
> To: Maven Users List
> Subject: Re: [m2] Failure to recognise a jar
>
> You can either put the needed jars in the classpath environment variable
> or
> you can build it into a command line that you package into a batch file
> or
> script that you run to run the application.
>
> Or, if you know where the other jars are going to be, relative to your
> jar,
> you can add entries to the manifest file that is inside your jar.
>
> Someone else will have to tell you how to do that in Maven for a
> standalone
> jar. You might google the class-path entry in the manifest file and
> learn a
> bit about the way that works. Make sure you read about standalone jars
> instead of j2ee "jars" because the rules are a little different.
>
> -- Lee
>
> On 2/24/06, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > IIRC this was called Uberjar back in m1. To be honest, not sure of the
> > M2 response to that, as I'm only doing WARs and EARs and they are all
> > bundled properly in those package types.
> >
> > http://classworlds.codehaus.org/uberjar.html
> >
> > Wayne
> >
> >
> > On 2/24/06, Gerard Garrigan <[EMAIL PROTECTED]>
> wrote:
> > > I have the app running now in Eclipse alright. There may have been a
> > > problem with the mvn eclipse:eclipse command.
> > >
> > > The requirement is to have my application in a jar file and you can
> run
> > > it from the command prompt. I notice when  you package up the app
> the
> > > resulting jar contains no dependencies (ie the dependencies jars).
> What
> > > is needed to get the jar running from the command prompt?
> > >
> > > -----Original Message-----
> > > From: Thorsten Heit [mailto:[EMAIL PROTECTED]
> > > Sent: 24 February 2006 17:44
> > > To: Maven Users List
> > > Subject: Re: [m2] Failure to recognise a jar
> > >
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > > I have the variables included in eclipse and the dependencies in
> the
> > > > pom. However I'm still having the same trouble.
> > >
> > > Have you checked that Eclipse really uses the correct jars in the
> > > project settings under "Java Build Path->Libraries"? On my machine
> > > (Eclipse 3.2M5) I see a blue ball besides every jar that is listed
> > > there, and every entry begins with M2_REPO.
> > >
> > > And can you check that M2_REPO is defined correctly in the global
> > > classpath settings (Window->Preferences->Java->Build Path->Classpath
> > > Variables)?
> > >
> > >
> > > > By setting the classpath variable in the command prompt do mean
> adding
> > > > the required jars to the CLASSPATH environment variable?
> > >
> > > Yes.
> > >
> > >
> > > > If so is there any way that maven can include the required jars in
> a
> > > lib
> > > > folder when it packages the project as a jar? Or even just the
> > > specific
> > > > classes it needs from the jars?
> > >
> > > Sorry, don't know. Perhaps Maven generates an entry in the created
> jar's
> > > manifest...?
> > >
> > >
> > > Regards
> > >
> > > Thorsten
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.2.1 (MingW32)
> > >
> > > iD8DBQFD/0X4QvObkgCcDe0RAtJIAKCqnrB6Q7ZJEIRR70V6lkVIbBnq7wCeO2P6
> > > aU9YK3dH+rw45aL/hzrYw/w=
> > > =fiHq
> > > -----END PGP SIGNATURE-----
> > >
> > >
> ---------------------------------------------------------------------
> > > 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]
> >
> >
>
>
> --
> -- Lee Meador
> Sent from gmail. My real email address is [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to