On Thu, Mar 10, 2011 at 04:50, Mark <[email protected]> wrote: > Can you please explain the assembly plugin method?
Take a look at: http://thomassundberg.wordpress.com/2011/03/05/create-an-executable-jar-from-maven/ /Thomas > > Thanks > > On 3/9/11 6:03 PM, Benson Margulies wrote: >> >> maven-shade-plugin, or just use the assembly plugin to colocate the >> dependencies and ask the jar plugin to add a manifest to the main jar. >> >> On Wed, Mar 9, 2011 at 8:53 PM, Mark<[email protected]> wrote: >>> >>> Say I have the following dependency: >>> >>> <dependency> >>> <groupId>org.apache.mahout.commons</groupId> >>> <artifactId>commons-cli</artifactId> >>> <version>2.0-mahout</version> >>> </dependency> >>> >>> And my main class makes use of these classes: >>> >>> public static void main(String[] args) throws Exception { >>> DefaultOptionBuilder optionBuilder = new DefaultOptionBuilder(); >>> .... >>> } >>> >>> Now when I compile my jar everything is ok however when I try to run my >>> application I get a ClassNotFound exception. How can I jar up my code >>> with >>> the required dependencies and add its classpath? >>> >>> Thanks alot. >>> >>> >>> >>> --------------------------------------------------------------------- >>> 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] > > -- Thomas Sundberg M. Sc. in Computer Science Mobile: +46 70 767 33 15 Blog: http://thomassundberg.wordpress.com/ Twitter: @thomassundberg Better software through faster feedback --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
