Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven assembly plugin and adding system dependencies to the classpath

Tags:

maven-2

I have some dependencies which I am providing myself. The jars are in the resources directory. In my pom they are scoped as system and I include the path to them. However, when I jar things up using the assembly plugin and use

<addClasspath>true</addClasspath>

It doesn't add the path of the system jars. How can I get them to be included automatically?

Thanks

like image 610
pondermatic Avatar asked Mar 27 '10 23:03

pondermatic


People also ask

What does the given command do Mvn dependency build classpath?

Description: This goal outputs a classpath string of dependencies from the local repository to a file or log.

What is the use of Maven Assembly plugin?

The Assembly Plugin for Maven enables developers to combine project output into a single distributable archive that also contains dependencies, modules, site documentation, and other files. Your project can easily build distribution "assemblies" using one of the prefabricated assembly descriptors.


1 Answers

Yeah, and that's why using system scope is a bad practice. Have a look at this previous answer (and also this one) for a solution.

like image 143
Pascal Thivent Avatar answered Sep 21 '22 12:09

Pascal Thivent