You could do this without assembly plugin.
Just copy all dependencies with maven-dependency-plugin to some folder and
than add this folder as classpath prefix in maven-jar-plugin.
example for second part
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>you.main.class</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
2009/11/17 eyal edri <[email protected]>
> Hi,
>
> i'm trying to figure out how can i create a working executable JAR that has
> dependencies
> (in-house maven projects plus external lib such as Log4J).
>
> I tried using the assembly plugin by creating a "jar-with-dependencies".
>
> but this creates a big JAR with all the dependencies included.
>
> I want to be able to install commons dependencies in a commons directory
> (/usr/lib/maven-projects/ for e.g.),
> and that every project that depends on them can use them.
>
> What should i do in the pom file of the infrastructure project and the
> project that depends on it?
>
> i've read almost all the complete "maven-definite-guide", but didn't find a
> concise answer...
>
> thanks,
> --
> Eyal Edri
>
--
Regards,
Alexander