My linux world » maven-dependency-plugin

maven-dependency-plugin


When you create an artifact, you can copy all your artifact dependencies in a directory.
To do that, you have to add the following plugin in your pom.xml :

 
<build>
  <plugins>
    (...)
 
    <plugin>
      <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
            </configuration>
          </execution>
        </executions>
    </plugin>
 
    (...)
 
  </plugins>
</build>

Copyright © 2023 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.

Fork me on GitHub