Created
April 30, 2020 08:53
-
-
Save nipafx/7f56f84b8b6a599a551ac8f28ec0be40 to your computer and use it in GitHub Desktop.
Configuring Maven's copy-dependencies MOJO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- executed during build --> | |
<plugin> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<version><!-- currently 3.1.2 --></version> | |
<executions> | |
<execution> | |
<!-- with this ID, the command above picks up the config --> | |
<id>default-cli</id> | |
<!-- if `process-sources` doesn't match your needs --> | |
<phase>package</phase> | |
<goals> | |
<goal>copy-dependencies</goal> | |
</goals> | |
<configuration> | |
<!-- if you prefer a different folder --> | |
<outputDirectory>dependencies</outputDirectory> | |
<!-- if you only need direct dependencies --> | |
<excludeTransitive>true</excludeTransitive> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- executed with `mvn dependency:copy-dependencies` --> | |
<pluginManagement> | |
<plugins> | |
<plugin> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<version>3.1.2 <!--update--></version> | |
<executions> | |
<execution> | |
<id>default-cli</id> | |
<goals> | |
<goal>copy-dependencies</goal> | |
</goals> | |
<configuration> | |
<outputDirectory>dependencies</outputDirectory> | |
<prependGroupId>true</prependGroupId> | |
<overWriteSnapshots>true</overWriteSnapshots> | |
<excludeTransitive>true</excludeTransitive> | |
<!--<includeScope>compile</includeScope>--> | |
<!--<excludeScope>test</excludeScope>--> | |
<useSubDirectoryPerScope>true</useSubDirectoryPerScope> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</pluginManagement> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment