Note that the "addClasspath" directive adds the project dependencies to the class path. Note that this requires an assembly descriptor src/main/assembly/dist.xml and example looks like this: Īnd since you are now assembling dependencies, you have better define the dependency in the pom.xml, like so: ģ) If you are delivering a bundle with an executable JAR file launcher, you will likely need to add a maven-jar-plugin configuration in addition to the maven-assembly-plugin: This will unpack all dependencies and merge them into one JAR file.Ģ) If you want to deliver a bundle (zip, tar.gz, etc) with the unpacked JAR files in the bundle (perhaps under lib/) then you need to look into the maven-assembly-plugin: There are a couple of ways of doing this.ġ) If you want an uber-jar (repacked with all dependencies), look into using and configuring the maven-shade-plugin: can anyone tell me a proper way to add my dependencies in jar? I can't believe that maven is so complex and I can't find an answer to my question everywhere. maven copy dependencies plugin but still not working with Eclipse Maven - m2e.assembly:single with my descriptor (an assemble.xml file) but it wasn't working.my only question is: How can I configure pom.xml in order to add all my dependencies in jar format? I downloaded and added each library into jar's /lib folder and the jar is running. To be sure that including all jars is ok. because it seems that unpacked are not working correct.
How can I configure pom.xml to include all my dependencies in. jar it doesn't have the dependencies included. The relevant repository section of your pom.I am using Eclipse Maven (m2e) inside Eclipse and I am running my project like this:Īfter I run the maven install it is working.
In all cases, to publish a package, you need: The option you choose determines the settings you add to your pom.xml file. Packages from different GitLab groups or in their own namespace.
Authenticate with a personal access token in Maven.Authenticate to the Package Registry with Maven.