Note however that this won't work if you have any dependencies that aren't on your classpath somewhere. Your jar will run but you'll error out very quickly due to JVM failure to find classes. ;-)
Basically, there is no completely trivial way to solve this problem that I'm aware of. But instead lots of little things you can do to help get your project running. Wayne On 4/27/06, Kees de Kooter <[EMAIL PROTECTED]> wrote: > You can create an "executable" jar by adding the following plugin > configuration: > > <plugin> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <archive> > <manifest> > <mainClass>your.main.clas</mainClass> > <addClasspath>true</addClasspath> > <classpathPrefix>lib/</classpathPrefix> > </manifest> > </archive> > </configuration> > </plugin> > > > On 4/27/06, Stefan Arentz <[EMAIL PROTECTED]> wrote: > > On 4/27/06, Wayne Fay <[EMAIL PROTECTED]> wrote: > > > > > > Maven is a project builder, not a project runner. There is no Maven > > > shortcut to run your main(). I have seen some people talk about > > > POMstrap so Google that and maybe you'll find something. > > > > > > Ok. Is there a way to package a jar then, that I can execute with java -jar? > > > > > > > As for your test problem, I have no idea what you're doing in your > > > configuration, this works properly out of the box. I assume you've > > > broken something in your pom.xml, or you're doing something > > > wacky/tricky in your tests. > > > > > > > > I was doing something stupid of course. And it does work out of the box. > > > > Thanks, > > > > S. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
