thanks a lot. it works now. :)
Entner Harald wrote: > > No, it does not. It actually knows, which libraries are included and where > they are (this includes also transitive dependencies.) but when you run > java -jar only the generated jar is on the classpath, not the maven > repository. So you have to tell maven, to include these artifacts inside > the generated jar. > > Fortunately there are a lot of plugins who can help you with this (so you > don't have to include them manually.) I haven't used Maven for that > purpose very often, but i have seen this plugin [1], which should help > you. Maybe there is even an easier way, but i think this one is pretty > straightforward. The plugin Mark suggested would do the job as well i > think. So it is up to you which one to use. > > with regards, > > Harald > > > [1] > http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Make > > -----Ursprüngliche Nachricht----- > Von: jamborta [mailto:jambo...@gmail.com] > Gesendet: Dienstag, 13. Oktober 2009 12:06 > An: users@maven.apache.org > Betreff: Re: AW: AW: Running Jar file created by Maven > > > yes, i run with java -jar > > but when I run mvn install, I can see that it downloads all the > dependencies. i thought it takes care of that automatically. > > > Entner Harald wrote: >> >> How do you run the jar file? (outside netbeans). >> >> with java -jar .... ? >> >> If you do so, the jar files need to be included in the resulting jar >> file, >> or you have to add it to the classpath, via -cp ... >> >> > > -- > View this message in context: > http://www.nabble.com/Running-Jar-file-created-by-Maven-tp25869690p25870160.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > > -- View this message in context: http://www.nabble.com/Running-Jar-file-created-by-Maven-tp25869690p25870320.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org