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]

Reply via email to